forked from jengelh/wxWidgets-3_2
Add patch fix_webkit_tests.patch
This commit is contained in:
parent
579f71d092
commit
179764d63d
73
fix_webkit_tests.patch
Normal file
73
fix_webkit_tests.patch
Normal 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());
|
||||
}
|
||||
|
@ -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>
|
||||
|
||||
|
@ -85,6 +85,7 @@ 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
|
||||
Patch4: fix_webkit_tests.patch
|
||||
%if "%{flavor}" == "doc"
|
||||
BuildRequires: doxygen
|
||||
BuildRequires: fdupes
|
||||
|
Loading…
Reference in New Issue
Block a user