1
0
forked from pool/wxWidgets-3_2

Compare commits

...

4 Commits

Author SHA256 Message Date
Markéta Calábková
b63a34ce33 fix spec comments 2024-10-07 13:14:02 +02:00
Markéta Calábková
fcc6671690 Merge remote-tracking branch 'upstream/master' 2024-10-07 13:11:04 +02:00
Markéta Calábková
179764d63d Add patch fix_webkit_tests.patch 2024-10-07 12:52:58 +02:00
Markéta Calábková
579f71d092 add patch doxygen111.patch 2024-10-01 11:41:19 +02:00
3 changed files with 82 additions and 0 deletions

73
fix_webkit_tests.patch Normal file
View File

@ -0,0 +1,73 @@
From 1622a5c9c2f123ef27fc3a52938162a68892e725 Mon Sep 17 00:00:00 2001
From: Scott Talbert <swt@techie.net>
Date: Thu, 1 Feb 2024 20:36:50 -0500
Subject: [PATCH 1/4] Fix WebView tests with WebKitGTK 2.43+
It seems that WebKitGTK is now failing to navigate to about: URLs unless
they are about:blank or about:srcdoc, so use about:srcdoc as the
alternate URL to fix the WebView tests.
Ref: https://github.com/WebKit/WebKit/commit/3c3163e71f647db507949ecebad35d0f2ffb33f3
---
tests/controls/webtest.cpp | 4 ++++
1 file changed, 4 insertions(+)
Index: wxWidgets-3.2.6/samples/webview/webview.cpp
===================================================================
--- wxWidgets-3.2.6.orig/samples/webview/webview.cpp
+++ wxWidgets-3.2.6/samples/webview/webview.cpp
@@ -992,38 +992,38 @@ void WebFrame::OnToolsClicked(wxCommandE
}
m_histMenuItems.clear();
- wxVector<wxSharedPtr<wxWebViewHistoryItem> > back = m_browser->GetBackwardHistory();
- wxVector<wxSharedPtr<wxWebViewHistoryItem> > forward = m_browser->GetForwardHistory();
+ // We can't use empty labels for the menu items, so use this helper to give
+ // them at least some name if we don't have anything better.
+ const auto makeLabel = [](const wxString& title)
+ {
+ return title.empty() ? "(untitled)" : title;
+ };
wxMenuItem* item;
- unsigned int i;
- for(i = 0; i < back.size(); i++)
+ for ( const auto& histItem : m_browser->GetBackwardHistory() )
{
- wxString title = back[i]->GetTitle();
- if ( title.empty() )
+ wxString title = histItem->GetTitle()
+ if ( title.empty() )
title = "(untitled)";
- item = m_tools_history_menu->AppendRadioItem(wxID_ANY, title);
- m_histMenuItems[item->GetId()] = back[i];
+ item = m_tools_history_menu->AppendRadioItem(wxID_ANY, makeLabel(title));
+ m_histMenuItems[item->GetId()] = histItem;
Bind(wxEVT_MENU, &WebFrame::OnHistory, this, item->GetId());
}
- wxString title = m_browser->GetCurrentTitle();
- if ( title.empty() )
- title = "(untitled)";
- item = m_tools_history_menu->AppendRadioItem(wxID_ANY, title);
+ item = m_tools_history_menu->AppendRadioItem(wxID_ANY, makeLabel(m_browser->GetCurrentTitle()));
item->Check();
//No need to connect the current item
m_histMenuItems[item->GetId()] = wxSharedPtr<wxWebViewHistoryItem>(new wxWebViewHistoryItem(m_browser->GetCurrentURL(), m_browser->GetCurrentTitle()));
- for(i = 0; i < forward.size(); i++)
+ for ( const auto& histItem : m_browser->GetForwardHistory() )
{
- wxString title = forward[i]->GetTitle();
+ wxString title = histItem->GetTitle()
if ( title.empty() )
title = "(untitled)";
- item = m_tools_history_menu->AppendRadioItem(wxID_ANY, title);
- m_histMenuItems[item->GetId()] = forward[i];
+ item = m_tools_history_menu->AppendRadioItem(wxID_ANY, makeLabel(title));
+ m_histMenuItems[item->GetId()] = histItem;
Bind(wxEVT_TOOL, &WebFrame::OnHistory, this, item->GetId());
}

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Oct 7 10:36:47 UTC 2024 - Markéta Machová <mmachova@suse.com>
- Add upstream fix_webkit_tests.patch to fix webview tests with
WebKitGTK 2.43+.
-------------------------------------------------------------------
Tue Oct 1 09:33:13 UTC 2024 - Markéta Machová <mmachova@suse.com>

View File

@ -83,7 +83,10 @@ Source6: wxpython-mkdiff.sh
Patch0: soversion.diff
Patch1: autoconf-2_72.diff
Patch2: textfiletest-fix-file-exists.diff
# PATCH-FIX-UPSTREAM https://github.com/wxWidgets/wxWidgets/pull/24814 Fix docs generation for datetime with doxygen 1.11.0
Patch3: doxygen111.patch
# PATCH-FIX-UPSTREAM https://github.com/wxWidgets/wxWidgets/pull/24276 Fix WebView tests with WebKitGTK 2.43+
Patch4: fix_webkit_tests.patch
%if "%{flavor}" == "doc"
BuildRequires: doxygen
BuildRequires: fdupes