This commit is contained in:
parent
c947912e62
commit
779671239f
@ -1,197 +0,0 @@
|
||||
From 7d56bbb4c1708f00f729bdfe2e8951c644c83194 Mon Sep 17 00:00:00 2001
|
||||
From: Kirill Burtsev <kirill.burtsev@qt.io>
|
||||
Date: Wed, 12 Feb 2020 16:15:34 +0100
|
||||
Subject: [PATCH] Clear previous page text selection on new navigation unconditionally
|
||||
|
||||
Remove code duplication on triggering new url load, and use direct
|
||||
code to clear SelectedText instead of CollapseSelection as it assumes
|
||||
focused frame and might be ignored.
|
||||
|
||||
Fixes: QTBUG-81574
|
||||
Change-Id: I01cf02967e118f407c8a3997e176d5b258478a5a
|
||||
---
|
||||
|
||||
diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp
|
||||
index 8cc8179..a7579f9 100644
|
||||
--- a/src/core/web_contents_adapter.cpp
|
||||
+++ b/src/core/web_contents_adapter.cpp
|
||||
@@ -67,6 +67,7 @@
|
||||
#include "base/task/sequence_manager/thread_controller_with_message_pump_impl.h"
|
||||
#include "base/values.h"
|
||||
#include "content/browser/renderer_host/render_view_host_impl.h"
|
||||
+#include "content/browser/renderer_host/text_input_manager.h"
|
||||
#include "content/browser/web_contents/web_contents_impl.h"
|
||||
#include "content/public/browser/browser_task_traits.h"
|
||||
#include "content/public/browser/child_process_security_policy.h"
|
||||
@@ -369,6 +370,23 @@
|
||||
}
|
||||
}
|
||||
|
||||
+static void Navigate(WebContentsAdapter *adapter, const content::NavigationController::LoadURLParams ¶ms)
|
||||
+{
|
||||
+ Q_ASSERT(adapter);
|
||||
+ adapter->webContents()->GetController().LoadURLWithParams(params);
|
||||
+ adapter->focusIfNecessary();
|
||||
+ adapter->resetSelection();
|
||||
+}
|
||||
+
|
||||
+static void NavigateTask(QWeakPointer<WebContentsAdapter> weakAdapter, const content::NavigationController::LoadURLParams ¶ms)
|
||||
+{
|
||||
+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
||||
+ const auto adapter = weakAdapter.toStrongRef();
|
||||
+ if (!adapter)
|
||||
+ return;
|
||||
+ Navigate(adapter.get(), params);
|
||||
+}
|
||||
+
|
||||
namespace {
|
||||
static QList<WebContentsAdapter *> recursive_guard_loading_adapters;
|
||||
|
||||
@@ -705,21 +723,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
- auto navigate = [](QWeakPointer<WebContentsAdapter> weakAdapter, const content::NavigationController::LoadURLParams ¶ms) {
|
||||
- const auto adapter = weakAdapter.toStrongRef();
|
||||
- if (!adapter)
|
||||
- return;
|
||||
- adapter->webContents()->GetController().LoadURLWithParams(params);
|
||||
- adapter->focusIfNecessary();
|
||||
- };
|
||||
-
|
||||
- QWeakPointer<WebContentsAdapter> weakThis(sharedFromThis());
|
||||
if (resizeNeeded) {
|
||||
// Schedule navigation on the event loop.
|
||||
base::PostTaskWithTraits(FROM_HERE, {content::BrowserThread::UI},
|
||||
- base::BindOnce(navigate, std::move(weakThis), std::move(params)));
|
||||
+ base::BindOnce(&NavigateTask, sharedFromThis().toWeakRef(), std::move(params)));
|
||||
} else {
|
||||
- navigate(std::move(weakThis), params);
|
||||
+ Navigate(this, params);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -752,9 +761,7 @@
|
||||
params.can_load_local_resources = true;
|
||||
params.transition_type = ui::PageTransitionFromInt(ui::PAGE_TRANSITION_TYPED | ui::PAGE_TRANSITION_FROM_API);
|
||||
params.override_user_agent = content::NavigationController::UA_OVERRIDE_TRUE;
|
||||
- m_webContents->GetController().LoadURLWithParams(params);
|
||||
- focusIfNecessary();
|
||||
- m_webContents->CollapseSelection();
|
||||
+ Navigate(this, params);
|
||||
}
|
||||
|
||||
void WebContentsAdapter::save(const QString &filePath, int savePageFormat)
|
||||
@@ -1676,6 +1683,17 @@
|
||||
return m_webContents->GetFocusedFrame() != nullptr;
|
||||
}
|
||||
|
||||
+void WebContentsAdapter::resetSelection()
|
||||
+{
|
||||
+ CHECK_INITIALIZED();
|
||||
+ // unconditionally clears the selection in contrast to CollapseSelection, which checks focus state first
|
||||
+ if (auto rwhv = static_cast<RenderWidgetHostViewQt *>(m_webContents->GetRenderWidgetHostView())) {
|
||||
+ if (auto mgr = rwhv->GetTextInputManager())
|
||||
+ if (auto selection = const_cast<content::TextInputManager::TextSelection *>(mgr->GetTextSelection(rwhv)))
|
||||
+ selection->SetSelection(base::string16(), 0, gfx::Range(), false);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
WebContentsAdapterClient::RenderProcessTerminationStatus
|
||||
WebContentsAdapterClient::renderProcessExitStatus(int terminationStatus) {
|
||||
auto status = WebContentsAdapterClient::RenderProcessTerminationStatus(-1);
|
||||
diff --git a/src/core/web_contents_adapter.h b/src/core/web_contents_adapter.h
|
||||
index 11f8f9c..f8f147f 100644
|
||||
--- a/src/core/web_contents_adapter.h
|
||||
+++ b/src/core/web_contents_adapter.h
|
||||
@@ -229,6 +229,7 @@
|
||||
void focusIfNecessary();
|
||||
bool isFindTextInProgress() const;
|
||||
bool hasFocusedFrame() const;
|
||||
+ void resetSelection();
|
||||
|
||||
// meant to be used within WebEngineCore only
|
||||
void initialize(content::SiteInstance *site);
|
||||
diff --git a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
|
||||
index 8cdcc9f..94b3f16 100644
|
||||
--- a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
|
||||
+++ b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
|
||||
@@ -700,7 +700,7 @@
|
||||
CursorTrackedPage(QWidget *parent = 0): QWebEnginePage(parent) {
|
||||
}
|
||||
|
||||
- QString selectedText() {
|
||||
+ QString jsSelectedText() {
|
||||
return evaluateJavaScriptSync(this, "window.getSelection().toString()").toString();
|
||||
}
|
||||
|
||||
@@ -716,42 +716,52 @@
|
||||
int isSelectionCollapsed() {
|
||||
return evaluateJavaScriptSync(this, "window.getSelection().getRangeAt(0).collapsed").toBool();
|
||||
}
|
||||
- bool hasSelection()
|
||||
- {
|
||||
- return !selectedText().isEmpty();
|
||||
- }
|
||||
};
|
||||
|
||||
void tst_QWebEnginePage::textSelection()
|
||||
{
|
||||
- QWebEngineView view;
|
||||
- CursorTrackedPage *page = new CursorTrackedPage(&view);
|
||||
- QString content("<html><body><p id=one>The quick brown fox</p>" \
|
||||
+ CursorTrackedPage page;
|
||||
+
|
||||
+ QString textToSelect("The quick brown fox");
|
||||
+ QString content = QString("<html><body><p id=one>%1</p>" \
|
||||
"<p id=two>jumps over the lazy dog</p>" \
|
||||
- "<p>May the source<br/>be with you!</p></body></html>");
|
||||
- page->setView(&view);
|
||||
- QSignalSpy loadSpy(&view, SIGNAL(loadFinished(bool)));
|
||||
- page->setHtml(content);
|
||||
+ "<p>May the source<br/>be with you!</p></body></html>").arg(textToSelect);
|
||||
+
|
||||
+ QSignalSpy loadSpy(&page, SIGNAL(loadFinished(bool)));
|
||||
+ page.setHtml(content);
|
||||
QTRY_COMPARE_WITH_TIMEOUT(loadSpy.count(), 1, 20000);
|
||||
|
||||
// these actions must exist
|
||||
- QVERIFY(page->action(QWebEnginePage::SelectAll) != 0);
|
||||
+ QVERIFY(page.action(QWebEnginePage::SelectAll) != 0);
|
||||
|
||||
// ..but SelectAll is disabled because the page has no focus due to disabled FocusOnNavigationEnabled.
|
||||
- QCOMPARE(page->action(QWebEnginePage::SelectAll)->isEnabled(), false);
|
||||
+ QCOMPARE(page.action(QWebEnginePage::SelectAll)->isEnabled(), false);
|
||||
|
||||
// Verify hasSelection returns false since there is no selection yet...
|
||||
- QCOMPARE(page->hasSelection(), false);
|
||||
+ QVERIFY(!page.hasSelection());
|
||||
+ QVERIFY(page.jsSelectedText().isEmpty());
|
||||
|
||||
// this will select the first paragraph
|
||||
QString selectScript = "var range = document.createRange(); " \
|
||||
"var node = document.getElementById(\"one\"); " \
|
||||
"range.selectNode(node); " \
|
||||
"getSelection().addRange(range);";
|
||||
- evaluateJavaScriptSync(page, selectScript);
|
||||
- QCOMPARE(page->selectedText().trimmed(), QString::fromLatin1("The quick brown fox"));
|
||||
+ evaluateJavaScriptSync(&page, selectScript);
|
||||
+
|
||||
// Make sure hasSelection returns true, since there is selected text now...
|
||||
- QCOMPARE(page->hasSelection(), true);
|
||||
+ QTRY_VERIFY(page.hasSelection());
|
||||
+ QCOMPARE(page.selectedText().trimmed(), textToSelect);
|
||||
+
|
||||
+ QCOMPARE(page.jsSelectedText().trimmed(), textToSelect);
|
||||
+
|
||||
+ // navigate away and check that selection is cleared
|
||||
+ page.load(QUrl("about:blank"));
|
||||
+ QTRY_COMPARE(loadSpy.count(), 2);
|
||||
+
|
||||
+ QVERIFY(!page.hasSelection());
|
||||
+ QVERIFY(page.selectedText().isEmpty());
|
||||
+
|
||||
+ QVERIFY(page.jsSelectedText().isEmpty());
|
||||
}
|
||||
|
||||
|
@ -1,48 +0,0 @@
|
||||
From c729361f9f8f6c0602d401d5e230ba63ab11a682 Mon Sep 17 00:00:00 2001
|
||||
From: Jüri Valdmann <juri.valdmann@qt.io>
|
||||
Date: Wed, 19 Feb 2020 14:15:34 +0100
|
||||
Subject: [PATCH] Fix recursive deadlock in sandbox::InitLibcLocaltimeFunctions
|
||||
|
||||
QtWebEngineProcess overrides the C library's localtime* functions by redefining
|
||||
the symbols in src/process/main.cpp and then using dlsym(RTLD_NEXT, ...) to
|
||||
fetch the original symbols in //sandbox/linux/services/libc_interceptor.cc. The
|
||||
functions InitLibcLocaltimeFunctions{,Impl} use pthread_once to guarantee that
|
||||
this symbol resolution happens only once.
|
||||
|
||||
If dlsym fails, for example because the C library is earlier in the search path
|
||||
than QtWebEngineCore, then InitLibcLocaltimeFunctionsImpl tries to print an
|
||||
error message with LOG(ERROR). However, printing a log message involves also
|
||||
printing the timestamp in the local time zone, using, of course, localtime_r.
|
||||
Thus, InitLibcLocaltimeFunctions depends on localtime_r depends on
|
||||
InitLibcLocaltimeFunctions, and we get a deadlock due to the recursive use of
|
||||
pthread_once.
|
||||
|
||||
This deadlock happens only for utility processes and not for zygotes or
|
||||
renderers, since the latter proxy the localtime* calls back to the main process.
|
||||
(See service_manager::ZygoteMain, where the first function call is to
|
||||
sandbox::SetAmZygoteOrRenderer, and compare with content::UtilityMain)
|
||||
|
||||
Task-number: QTBUG-82186
|
||||
Change-Id: I32009e8482b2634c47082a4c89393dc61c22507e
|
||||
---
|
||||
|
||||
diff --git a/src/3rdparty/chromium/sandbox/linux/services/libc_interceptor.cc b/chromium/sandbox/linux/services/libc_interceptor.cc
|
||||
index ed4dd02..fad77f9 100644
|
||||
--- a/src/3rdparty/chromium/sandbox/linux/services/libc_interceptor.cc
|
||||
+++ b/src/3rdparty/chromium/sandbox/linux/services/libc_interceptor.cc
|
||||
@@ -199,6 +199,7 @@
|
||||
g_libc_funcs->localtime64_r =
|
||||
reinterpret_cast<LocaltimeRFunction>(dlsym(RTLD_NEXT, "localtime64_r"));
|
||||
|
||||
+#if !defined(TOOLKIT_QT)
|
||||
if (!g_libc_funcs->localtime || !g_libc_funcs->localtime_r) {
|
||||
// https://bugs.chromium.org/p/chromium/issues/detail?id=16800
|
||||
//
|
||||
@@ -210,6 +211,7 @@
|
||||
" time related functions to misbehave. "
|
||||
"https://bugs.chromium.org/p/chromium/issues/detail?id=16800";
|
||||
}
|
||||
+#endif
|
||||
|
||||
if (!g_libc_funcs->localtime)
|
||||
g_libc_funcs->localtime = gmtime;
|
@ -1,56 +0,0 @@
|
||||
Author Bernhard M. Wiedemann <bwiedemann suse de>
|
||||
Date: 2020-04-07
|
||||
|
||||
https://bugzilla.opensuse.org/show_bug.cgi?id=1163766
|
||||
|
||||
seccomp filters disallow a new kernel syscall to get time
|
||||
used on i586
|
||||
|
||||
Index: qtwebengine-everywhere-src-5.14.1/src/3rdparty/chromium/sandbox/linux/system_headers/x86_32_linux_syscalls.h
|
||||
===================================================================
|
||||
--- qtwebengine-everywhere-src-5.14.1.orig/src/3rdparty/chromium/sandbox/linux/system_headers/x86_32_linux_syscalls.h
|
||||
+++ qtwebengine-everywhere-src-5.14.1/src/3rdparty/chromium/sandbox/linux/system_headers/x86_32_linux_syscalls.h
|
||||
@@ -1422,5 +1422,13 @@
|
||||
#define __NR_memfd_create 356
|
||||
#endif
|
||||
|
||||
+#if !defined(__NR_clock_gettime64)
|
||||
+#define __NR_clock_gettime64 403
|
||||
+#endif
|
||||
+
|
||||
+#if !defined(__NR_clock_nanosleep_time64)
|
||||
+#define __NR_clock_nanosleep_time64 407
|
||||
+#endif
|
||||
+
|
||||
#endif // SANDBOX_LINUX_SYSTEM_HEADERS_X86_32_LINUX_SYSCALLS_H_
|
||||
|
||||
Index: qtwebengine-everywhere-src-5.14.1/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
|
||||
===================================================================
|
||||
--- qtwebengine-everywhere-src-5.14.1.orig/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
|
||||
+++ qtwebengine-everywhere-src-5.14.1/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
|
||||
@@ -151,6 +151,11 @@ ResultExpr EvaluateSyscallImpl(int fs_de
|
||||
if (sysno == __NR_clock_gettime || sysno == __NR_clock_nanosleep) {
|
||||
return RestrictClockID();
|
||||
}
|
||||
+#if defined(__NR_clock_gettime64)
|
||||
+ if (sysno == __NR_clock_gettime64 || sysno == __NR_clock_nanosleep_time64) {
|
||||
+ return RestrictClockID();
|
||||
+ }
|
||||
+#endif
|
||||
|
||||
if (sysno == __NR_clone) {
|
||||
return RestrictCloneToThreadsAndEPERMFork();
|
||||
Index: qtwebengine-everywhere-src-5.14.1/src/3rdparty/chromium/services/service_manager/sandbox/linux/bpf_ime_policy_linux.cc
|
||||
===================================================================
|
||||
--- qtwebengine-everywhere-src-5.14.1.orig/src/3rdparty/chromium/services/service_manager/sandbox/linux/bpf_ime_policy_linux.cc
|
||||
+++ qtwebengine-everywhere-src-5.14.1/src/3rdparty/chromium/services/service_manager/sandbox/linux/bpf_ime_policy_linux.cc
|
||||
@@ -30,6 +30,9 @@ ResultExpr ImeProcessPolicy::EvaluateSys
|
||||
#if defined(__NR_clock_gettime)
|
||||
case __NR_clock_gettime:
|
||||
#endif
|
||||
+#if defined(__NR_clock_gettime64)
|
||||
+ case __NR_clock_gettime64:
|
||||
+#endif
|
||||
return Allow();
|
||||
default:
|
||||
auto* broker_process = SandboxLinux::GetInstance()->broker_process();
|
159
icu-v67.patch
159
icu-v67.patch
@ -1,159 +0,0 @@
|
||||
From 3f8dc4b2e5baf77b463334c769af85b79d8c1463 Mon Sep 17 00:00:00 2001
|
||||
From: Frank Tang <ftang@chromium.org>
|
||||
Date: Fri, 3 Apr 2020 23:13:54 -0700
|
||||
Subject: [PATCH] [intl] Remove soon-to-be removed getAllFieldPositions
|
||||
|
||||
Needed to land ICU67.1 soon.
|
||||
|
||||
Bug: v8:10393
|
||||
Change-Id: I3c7737ca600d6ccfdc46ffaddfb318ce60bc7618
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2136489
|
||||
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
|
||||
Commit-Queue: Frank Tang <ftang@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/master@{#67027}
|
||||
|
||||
Index: qtwebengine-everywhere-src-5.15.0-beta3/src/3rdparty/chromium/v8/src/objects/js-number-format.cc
|
||||
===================================================================
|
||||
--- qtwebengine-everywhere-src-5.15.0-beta3.orig/src/3rdparty/chromium/v8/src/objects/js-number-format.cc
|
||||
+++ qtwebengine-everywhere-src-5.15.0-beta3/src/3rdparty/chromium/v8/src/objects/js-number-format.cc
|
||||
@@ -1187,42 +1187,31 @@ MaybeHandle<JSNumberFormat> JSNumberForm
|
||||
}
|
||||
|
||||
namespace {
|
||||
-Maybe<icu::UnicodeString> IcuFormatNumber(
|
||||
+Maybe<bool> IcuFormatNumber(
|
||||
Isolate* isolate,
|
||||
const icu::number::LocalizedNumberFormatter& number_format,
|
||||
- Handle<Object> numeric_obj, icu::FieldPositionIterator* fp_iter) {
|
||||
+ Handle<Object> numeric_obj, icu::number::FormattedNumber* formatted) {
|
||||
// If it is BigInt, handle it differently.
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
- icu::number::FormattedNumber formatted;
|
||||
if (numeric_obj->IsBigInt()) {
|
||||
Handle<BigInt> big_int = Handle<BigInt>::cast(numeric_obj);
|
||||
Handle<String> big_int_string;
|
||||
ASSIGN_RETURN_ON_EXCEPTION_VALUE(isolate, big_int_string,
|
||||
BigInt::ToString(isolate, big_int),
|
||||
- Nothing<icu::UnicodeString>());
|
||||
- formatted = number_format.formatDecimal(
|
||||
+ Nothing<bool>());
|
||||
+ *formatted = number_format.formatDecimal(
|
||||
{big_int_string->ToCString().get(), big_int_string->length()}, status);
|
||||
} else {
|
||||
double number = numeric_obj->Number();
|
||||
- formatted = number_format.formatDouble(number, status);
|
||||
+ *formatted = number_format.formatDouble(number, status);
|
||||
}
|
||||
if (U_FAILURE(status)) {
|
||||
// This happen because of icu data trimming trim out "unit".
|
||||
// See https://bugs.chromium.org/p/v8/issues/detail?id=8641
|
||||
- THROW_NEW_ERROR_RETURN_VALUE(isolate,
|
||||
- NewTypeError(MessageTemplate::kIcuError),
|
||||
- Nothing<icu::UnicodeString>());
|
||||
- }
|
||||
- if (fp_iter) {
|
||||
- formatted.getAllFieldPositions(*fp_iter, status);
|
||||
+ THROW_NEW_ERROR_RETURN_VALUE(
|
||||
+ isolate, NewTypeError(MessageTemplate::kIcuError), Nothing<bool>());
|
||||
}
|
||||
- icu::UnicodeString result = formatted.toString(status);
|
||||
- if (U_FAILURE(status)) {
|
||||
- THROW_NEW_ERROR_RETURN_VALUE(isolate,
|
||||
- NewTypeError(MessageTemplate::kIcuError),
|
||||
- Nothing<icu::UnicodeString>());
|
||||
- }
|
||||
- return Just(result);
|
||||
+ return Just(true);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
@@ -1233,10 +1222,16 @@ MaybeHandle<String> JSNumberFormat::Form
|
||||
Handle<Object> numeric_obj) {
|
||||
DCHECK(numeric_obj->IsNumeric());
|
||||
|
||||
- Maybe<icu::UnicodeString> maybe_format =
|
||||
- IcuFormatNumber(isolate, number_format, numeric_obj, nullptr);
|
||||
+ icu::number::FormattedNumber formatted;
|
||||
+ Maybe<bool> maybe_format =
|
||||
+ IcuFormatNumber(isolate, number_format, numeric_obj, &formatted);
|
||||
MAYBE_RETURN(maybe_format, Handle<String>());
|
||||
- return Intl::ToString(isolate, maybe_format.FromJust());
|
||||
+ UErrorCode status = U_ZERO_ERROR;
|
||||
+ icu::UnicodeString result = formatted.toString(status);
|
||||
+ if (U_FAILURE(status)) {
|
||||
+ THROW_NEW_ERROR(isolate, NewTypeError(MessageTemplate::kIcuError), String);
|
||||
+ }
|
||||
+ return Intl::ToString(isolate, result);
|
||||
}
|
||||
|
||||
namespace {
|
||||
@@ -1349,12 +1344,18 @@ std::vector<NumberFormatSpan> FlattenReg
|
||||
}
|
||||
|
||||
namespace {
|
||||
-Maybe<int> ConstructParts(Isolate* isolate, const icu::UnicodeString& formatted,
|
||||
- icu::FieldPositionIterator* fp_iter,
|
||||
+Maybe<int> ConstructParts(Isolate* isolate,
|
||||
+ icu::number::FormattedNumber* formatted,
|
||||
Handle<JSArray> result, int start_index,
|
||||
Handle<Object> numeric_obj, bool style_is_unit) {
|
||||
+ UErrorCode status = U_ZERO_ERROR;
|
||||
+ icu::UnicodeString formatted_text = formatted->toString(status);
|
||||
+ if (U_FAILURE(status)) {
|
||||
+ THROW_NEW_ERROR_RETURN_VALUE(
|
||||
+ isolate, NewTypeError(MessageTemplate::kIcuError), Nothing<int>());
|
||||
+ }
|
||||
DCHECK(numeric_obj->IsNumeric());
|
||||
- int32_t length = formatted.length();
|
||||
+ int32_t length = formatted_text.length();
|
||||
int index = start_index;
|
||||
if (length == 0) return Just(index);
|
||||
|
||||
@@ -1363,13 +1364,14 @@ Maybe<int> ConstructParts(Isolate* isola
|
||||
// other region covers some part of the formatted string. It's possible
|
||||
// there's another field with exactly the same begin and end as this backdrop,
|
||||
// in which case the backdrop's field_id of -1 will give it lower priority.
|
||||
- regions.push_back(NumberFormatSpan(-1, 0, formatted.length()));
|
||||
+ regions.push_back(NumberFormatSpan(-1, 0, formatted_text.length()));
|
||||
|
||||
{
|
||||
- icu::FieldPosition fp;
|
||||
- while (fp_iter->next(fp)) {
|
||||
- regions.push_back(NumberFormatSpan(fp.getField(), fp.getBeginIndex(),
|
||||
- fp.getEndIndex()));
|
||||
+ icu::ConstrainedFieldPosition cfp;
|
||||
+ cfp.constrainCategory(UFIELD_CATEGORY_NUMBER);
|
||||
+ while (formatted->nextPosition(cfp, status)) {
|
||||
+ regions.push_back(
|
||||
+ NumberFormatSpan(cfp.getField(), cfp.getStart(), cfp.getLimit()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1391,7 +1393,7 @@ Maybe<int> ConstructParts(Isolate* isola
|
||||
Handle<String> substring;
|
||||
ASSIGN_RETURN_ON_EXCEPTION_VALUE(
|
||||
isolate, substring,
|
||||
- Intl::ToString(isolate, formatted, part.begin_pos, part.end_pos),
|
||||
+ Intl::ToString(isolate, formatted_text, part.begin_pos, part.end_pos),
|
||||
Nothing<int>());
|
||||
Intl::AddElement(isolate, result, index, field_type_string, substring);
|
||||
++index;
|
||||
@@ -1411,14 +1413,14 @@ MaybeHandle<JSArray> JSNumberFormat::For
|
||||
number_format->icu_number_formatter().raw();
|
||||
CHECK_NOT_NULL(fmt);
|
||||
|
||||
- icu::FieldPositionIterator fp_iter;
|
||||
- Maybe<icu::UnicodeString> maybe_format =
|
||||
- IcuFormatNumber(isolate, *fmt, numeric_obj, &fp_iter);
|
||||
+ icu::number::FormattedNumber formatted;
|
||||
+ Maybe<bool> maybe_format =
|
||||
+ IcuFormatNumber(isolate, *fmt, numeric_obj, &formatted);
|
||||
MAYBE_RETURN(maybe_format, Handle<JSArray>());
|
||||
|
||||
Handle<JSArray> result = factory->NewJSArray(0);
|
||||
Maybe<int> maybe_format_to_parts = ConstructParts(
|
||||
- isolate, maybe_format.FromJust(), &fp_iter, result, 0, numeric_obj,
|
||||
+ isolate, &formatted, result, 0, numeric_obj,
|
||||
number_format->style() == JSNumberFormat::Style::UNIT);
|
||||
MAYBE_RETURN(maybe_format_to_parts, Handle<JSArray>());
|
||||
|
@ -1,32 +1,3 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 24 10:19:13 UTC 2020 - Ismail Dönmez <idonmez@suse.com>
|
||||
|
||||
- Add icu-v67.patch to fix compilation with icu v67, this is a backport
|
||||
of https://github.com/v8/v8/commit/3f8dc4b2e5baf77b463334c769af85b79d8c1463
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Apr 9 08:21:02 UTC 2020 - Bernhard Wiedemann <bwiedemann@suse.com>
|
||||
|
||||
- Add fix1163766.patch to fix opensuse-welcome on i686 (boo#1163766)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Mar 30 13:49:40 UTC 2020 - Fabian Vogt <fvogt@suse.com>
|
||||
|
||||
- Add patch to fix build with GCC 10 (boo#1158516):
|
||||
* some-more-includes-gcc10.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Feb 21 13:36:31 UTC 2020 - Fabian Vogt <fabian@ritter-vogt.de>
|
||||
|
||||
- Fix a deadlock causing audio/video playback to fail (boo#1163744):
|
||||
* QTBUG-82186.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Feb 21 09:25:44 UTC 2020 - Fabian Vogt <fabian@ritter-vogt.de>
|
||||
|
||||
- Fix an issue with selections breaking replying in KMail:
|
||||
* QTBUG-81574.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jan 27 13:14:47 UTC 2020 - Fabian Vogt <fabian@ritter-vogt.de>
|
||||
|
||||
|
@ -70,15 +70,6 @@ Patch1: armv6-ffmpeg-no-thumb.patch
|
||||
Patch2: disable-gpu-when-using-nouveau-boo-1005323.diff
|
||||
# PATCH-FIX-UPSTREAM 0001-fix-build-after-y2038-changes-in-glibc.patch
|
||||
Patch3: 0001-fix-build-after-y2038-changes-in-glibc.patch
|
||||
# PATCH-FIX-UPSTREAM https://codereview.qt-project.org/c/qt/qtwebengine/+/290321
|
||||
Patch4: QTBUG-81574.patch
|
||||
# PATCH-FIX-UPSTREAM https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/291216
|
||||
Patch5: QTBUG-82186.patch
|
||||
# PATCH-FIX-OPENSUSE
|
||||
Patch6: some-more-includes-gcc10.patch
|
||||
Patch7: fix1163766.patch
|
||||
# PATCH-FIX-UPSTREAM https://chromium-review.googlesource.com/c/v8/v8/+/2136489
|
||||
Patch8: icu-v67.patch
|
||||
# http://www.chromium.org/blink not ported to PowerPC
|
||||
ExcludeArch: ppc ppc64 ppc64le s390 s390x
|
||||
# Try to fix i586 MemoryErrors with rpmlint
|
||||
|
@ -1,148 +0,0 @@
|
||||
From: Martin Liška <mliska@suse.cz>
|
||||
References: boo#1167465 boo#1158516
|
||||
|
||||
Index: qtwebengine-everywhere-src-5.14.1/src/3rdparty/chromium/base/trace_event/trace_event_memory_overhead.h
|
||||
===================================================================
|
||||
--- qtwebengine-everywhere-src-5.14.1.orig/src/3rdparty/chromium/base/trace_event/trace_event_memory_overhead.h
|
||||
+++ qtwebengine-everywhere-src-5.14.1/src/3rdparty/chromium/base/trace_event/trace_event_memory_overhead.h
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
+#include <string>
|
||||
#include <unordered_map>
|
||||
|
||||
#include "base/base_export.h"
|
||||
Index: qtwebengine-everywhere-src-5.14.1/src/3rdparty/chromium/media/cdm/supported_cdm_versions.h
|
||||
===================================================================
|
||||
--- qtwebengine-everywhere-src-5.14.1.orig/src/3rdparty/chromium/media/cdm/supported_cdm_versions.h
|
||||
+++ qtwebengine-everywhere-src-5.14.1/src/3rdparty/chromium/media/cdm/supported_cdm_versions.h
|
||||
@@ -6,6 +6,7 @@
|
||||
#define MEDIA_CDM_SUPPORTED_CDM_VERSIONS_H_
|
||||
|
||||
#include <array>
|
||||
+#include <cstddef>
|
||||
|
||||
#include "media/base/media_export.h"
|
||||
#include "media/cdm/api/content_decryption_module.h"
|
||||
Index: qtwebengine-everywhere-src-5.14.1/src/3rdparty/chromium/third_party/angle/include/platform/Platform.h
|
||||
===================================================================
|
||||
--- qtwebengine-everywhere-src-5.14.1.orig/src/3rdparty/chromium/third_party/angle/include/platform/Platform.h
|
||||
+++ qtwebengine-everywhere-src-5.14.1/src/3rdparty/chromium/third_party/angle/include/platform/Platform.h
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
#include <stdint.h>
|
||||
#include <array>
|
||||
+#include <cstddef>
|
||||
|
||||
#define EGL_PLATFORM_ANGLE_PLATFORM_METHODS_ANGLEX 0x3482
|
||||
|
||||
Index: qtwebengine-everywhere-src-5.14.1/src/3rdparty/chromium/third_party/perfetto/include/perfetto/base/task_runner.h
|
||||
===================================================================
|
||||
--- qtwebengine-everywhere-src-5.14.1.orig/src/3rdparty/chromium/third_party/perfetto/include/perfetto/base/task_runner.h
|
||||
+++ qtwebengine-everywhere-src-5.14.1/src/3rdparty/chromium/third_party/perfetto/include/perfetto/base/task_runner.h
|
||||
@@ -17,6 +17,7 @@
|
||||
#ifndef INCLUDE_PERFETTO_BASE_TASK_RUNNER_H_
|
||||
#define INCLUDE_PERFETTO_BASE_TASK_RUNNER_H_
|
||||
|
||||
+#include <cstdint>
|
||||
#include <functional>
|
||||
|
||||
#include "perfetto/base/export.h"
|
||||
Index: qtwebengine-everywhere-src-5.14.1/src/3rdparty/chromium/third_party/webrtc/audio/utility/channel_mixer.cc
|
||||
===================================================================
|
||||
--- qtwebengine-everywhere-src-5.14.1.orig/src/3rdparty/chromium/third_party/webrtc/audio/utility/channel_mixer.cc
|
||||
+++ qtwebengine-everywhere-src-5.14.1/src/3rdparty/chromium/third_party/webrtc/audio/utility/channel_mixer.cc
|
||||
@@ -8,6 +8,8 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
+#include <cstring>
|
||||
+
|
||||
#include "audio/utility/channel_mixer.h"
|
||||
|
||||
#include "audio/utility/channel_mixing_matrix.h"
|
||||
Index: qtwebengine-everywhere-src-5.14.1/src/3rdparty/chromium/third_party/webrtc/call/rtx_receive_stream.h
|
||||
===================================================================
|
||||
--- qtwebengine-everywhere-src-5.14.1.orig/src/3rdparty/chromium/third_party/webrtc/call/rtx_receive_stream.h
|
||||
+++ qtwebengine-everywhere-src-5.14.1/src/3rdparty/chromium/third_party/webrtc/call/rtx_receive_stream.h
|
||||
@@ -11,6 +11,7 @@
|
||||
#ifndef CALL_RTX_RECEIVE_STREAM_H_
|
||||
#define CALL_RTX_RECEIVE_STREAM_H_
|
||||
|
||||
+#include <cstdint>
|
||||
#include <map>
|
||||
|
||||
#include "call/rtp_packet_sink_interface.h"
|
||||
Index: qtwebengine-everywhere-src-5.14.1/src/3rdparty/chromium/third_party/webrtc/common_video/h264/pps_parser.h
|
||||
===================================================================
|
||||
--- qtwebengine-everywhere-src-5.14.1.orig/src/3rdparty/chromium/third_party/webrtc/common_video/h264/pps_parser.h
|
||||
+++ qtwebengine-everywhere-src-5.14.1/src/3rdparty/chromium/third_party/webrtc/common_video/h264/pps_parser.h
|
||||
@@ -11,6 +11,7 @@
|
||||
#ifndef COMMON_VIDEO_H264_PPS_PARSER_H_
|
||||
#define COMMON_VIDEO_H264_PPS_PARSER_H_
|
||||
|
||||
+#include <cstdint>
|
||||
#include "absl/types/optional.h"
|
||||
|
||||
namespace rtc {
|
||||
Index: qtwebengine-everywhere-src-5.14.1/src/3rdparty/chromium/third_party/webrtc/common_video/h264/sps_parser.h
|
||||
===================================================================
|
||||
--- qtwebengine-everywhere-src-5.14.1.orig/src/3rdparty/chromium/third_party/webrtc/common_video/h264/sps_parser.h
|
||||
+++ qtwebengine-everywhere-src-5.14.1/src/3rdparty/chromium/third_party/webrtc/common_video/h264/sps_parser.h
|
||||
@@ -11,6 +11,7 @@
|
||||
#ifndef COMMON_VIDEO_H264_SPS_PARSER_H_
|
||||
#define COMMON_VIDEO_H264_SPS_PARSER_H_
|
||||
|
||||
+#include <cstdint>
|
||||
#include "absl/types/optional.h"
|
||||
|
||||
namespace rtc {
|
||||
Index: qtwebengine-everywhere-src-5.14.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/clockdrift_detector.h
|
||||
===================================================================
|
||||
--- qtwebengine-everywhere-src-5.14.1.orig/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/clockdrift_detector.h
|
||||
+++ qtwebengine-everywhere-src-5.14.1/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/clockdrift_detector.h
|
||||
@@ -12,6 +12,7 @@
|
||||
#define MODULES_AUDIO_PROCESSING_AEC3_CLOCKDRIFT_DETECTOR_H_
|
||||
|
||||
#include <array>
|
||||
+#include <cstddef>
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
Index: qtwebengine-everywhere-src-5.14.1/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc
|
||||
===================================================================
|
||||
--- qtwebengine-everywhere-src-5.14.1.orig/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc
|
||||
+++ qtwebengine-everywhere-src-5.14.1/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <spa/param/video/raw-utils.h>
|
||||
#include <spa/support/type-map.h>
|
||||
|
||||
+#include <cstring>
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
|
||||
Index: qtwebengine-everywhere-src-5.14.1/src/3rdparty/chromium/third_party/webrtc/modules/include/module_common_types_public.h
|
||||
===================================================================
|
||||
--- qtwebengine-everywhere-src-5.14.1.orig/src/3rdparty/chromium/third_party/webrtc/modules/include/module_common_types_public.h
|
||||
+++ qtwebengine-everywhere-src-5.14.1/src/3rdparty/chromium/third_party/webrtc/modules/include/module_common_types_public.h
|
||||
@@ -11,6 +11,7 @@
|
||||
#ifndef MODULES_INCLUDE_MODULE_COMMON_TYPES_PUBLIC_H_
|
||||
#define MODULES_INCLUDE_MODULE_COMMON_TYPES_PUBLIC_H_
|
||||
|
||||
+#include <cstdint>
|
||||
#include <limits>
|
||||
|
||||
#include "absl/types/optional.h"
|
||||
Index: qtwebengine-everywhere-src-5.14.1/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/decoding_state.h
|
||||
===================================================================
|
||||
--- qtwebengine-everywhere-src-5.14.1.orig/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/decoding_state.h
|
||||
+++ qtwebengine-everywhere-src-5.14.1/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/decoding_state.h
|
||||
@@ -11,6 +11,7 @@
|
||||
#ifndef MODULES_VIDEO_CODING_DECODING_STATE_H_
|
||||
#define MODULES_VIDEO_CODING_DECODING_STATE_H_
|
||||
|
||||
+#include <cstdint>
|
||||
#include <map>
|
||||
#include <set>
|
||||
#include <vector>
|
Loading…
Reference in New Issue
Block a user