summaryrefslogtreecommitdiffstats
path: root/src/core/web_contents_adapter.cpp
diff options
context:
space:
mode:
authorIlia Kirianovskii <ilia.kirianovskii@lgepartner.com>2016-02-16 11:35:48 +0300
committerJoerg Bornemann <joerg.bornemann@qt.io>2016-05-13 09:10:44 +0000
commitf2370c0d09998f382364a9a58932cf717c28a764 (patch)
tree380a64678506ee6392e85d31d9487a834af664a9 /src/core/web_contents_adapter.cpp
parentb052dcaf308d761fa8df39a09f0296b808c928b5 (diff)
Fix CXX :visited selector
This patch fixes highlighting of visited links and now Acid3 test completely works (100 of 100). The reason is that VisitedLinkMaster must be initialized before a new RenderView will be created. Otherwise, it will not handle content::NOTIFICATION_RENDERER_PROCESS_CREATED event and therefore VisitedLinkSlave will be left uninitialized (salt_ is zero). Because of this reason CSS :visited selector was broken and didn't work. Change-Id: I769cd5dbae2ffb95fd128df634a54e562b9cc91d Reviewed-by: Ilia Kirianovskii <ilia.kirianovskii@lgepartner.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src/core/web_contents_adapter.cpp')
-rw-r--r--src/core/web_contents_adapter.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp
index 30c589c56..66d133f60 100644
--- a/src/core/web_contents_adapter.cpp
+++ b/src/core/web_contents_adapter.cpp
@@ -394,6 +394,12 @@ void WebContentsAdapter::initialize(WebContentsAdapterClient *adapterClient)
// This should only be necessary after having restored the history to a new WebContentsAdapter.
d->webContents->GetController().LoadIfNecessary();
+ // Create an instance of WebEngineVisitedLinksManager to catch the first
+ // content::NOTIFICATION_RENDERER_PROCESS_CREATED event. This event will
+ // force to initialize visited links in VisitedLinkSlave.
+ // It must be done before creating a RenderView.
+ d->browserContextAdapter->visitedLinksManager();
+
// Create a RenderView with the initial empty document
content::RenderViewHost *rvh = d->webContents->GetRenderViewHost();
Q_ASSERT(rvh);