summaryrefslogtreecommitdiffstats
path: root/src/core/web_contents_delegate_qt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/web_contents_delegate_qt.cpp')
-rw-r--r--src/core/web_contents_delegate_qt.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/core/web_contents_delegate_qt.cpp b/src/core/web_contents_delegate_qt.cpp
index a6e1fb438..1121714eb 100644
--- a/src/core/web_contents_delegate_qt.cpp
+++ b/src/core/web_contents_delegate_qt.cpp
@@ -197,6 +197,16 @@ void WebContentsDelegateQt::DidStartNavigation(content::NavigationHandle *naviga
if (!navigation_handle->IsInMainFrame())
return;
+ // Suppress extra loadStarted signal for data URL with specified base URL.
+ if (navigation_handle->GetURL().SchemeIs(url::kDataScheme)) {
+ content::NavigationEntry *pending_entry = navigation_handle->GetWebContents()->GetController().GetPendingEntry();
+
+ if (pending_entry && !pending_entry->GetBaseURLForDataURL().is_empty() &&
+ navigation_handle->GetURL() == pending_entry->GetURL()) {
+ return;
+ }
+ }
+
// Error-pages are not reported as separate started navigations.
Q_ASSERT(!navigation_handle->IsErrorPage());