summaryrefslogtreecommitdiffstats
path: root/src/core/web_contents_adapter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/web_contents_adapter.cpp')
-rw-r--r--src/core/web_contents_adapter.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp
index 739b3b423..3533c0743 100644
--- a/src/core/web_contents_adapter.cpp
+++ b/src/core/web_contents_adapter.cpp
@@ -454,10 +454,15 @@ QUrl WebContentsAdapter::activeUrl() const
QUrl WebContentsAdapter::requestedUrl() const
{
Q_D(const WebContentsAdapter);
- if (content::NavigationEntry* entry = d->webContents->GetController().GetVisibleEntry()) {
+ content::NavigationEntry* entry = d->webContents->GetController().GetVisibleEntry();
+ content::NavigationEntry* pendingEntry = d->webContents->GetController().GetPendingEntry();
+
+ if (entry) {
if (!entry->GetOriginalRequestURL().is_empty())
return toQt(entry->GetOriginalRequestURL());
- return toQt(entry->GetURL());
+
+ if (pendingEntry && pendingEntry == entry)
+ return toQt(entry->GetURL());
}
return QUrl();
}