forked from jengelh/wxWidgets-3_2
Compare commits
1 Commits
Author | SHA256 | Date | |
---|---|---|---|
2df551cde5 |
@ -1,73 +0,0 @@
|
||||
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());
|
||||
}
|
||||
|
@ -1,8 +1,7 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 7 10:36:47 UTC 2024 - Markéta Machová <mmachova@suse.com>
|
||||
Mon Oct 7 14:14:45 UTC 2024 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
- Add upstream fix_webkit_tests.patch to fix webview tests with
|
||||
WebKitGTK 2.43+.
|
||||
- Use webkit2gtk-4.1 pkgconfig file instead of 4.0
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Oct 1 09:33:13 UTC 2024 - Markéta Machová <mmachova@suse.com>
|
||||
|
@ -83,10 +83,7 @@ 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
|
||||
@ -112,7 +109,7 @@ BuildRequires: pkgconfig(gtk+-2.0)
|
||||
%if "%toolkit" == "gtk3"
|
||||
BuildRequires: pkgconfig(gtk+-3.0)
|
||||
%if %{with webview}
|
||||
BuildRequires: pkgconfig(webkit2gtk-4.0)
|
||||
BuildRequires: pkgconfig(webkit2gtk-4.1)
|
||||
%endif
|
||||
%endif
|
||||
%if "%toolkit" == "qt"
|
||||
|
Loading…
Reference in New Issue
Block a user