summaryrefslogtreecommitdiffstats
path: root/src/core/web_contents_delegate_qt.cpp
diff options
context:
space:
mode:
authorPeter Varga <pvarga@inf.u-szeged.hu>2017-12-07 16:09:25 +0100
committerPeter Varga <pvarga@inf.u-szeged.hu>2017-12-13 08:16:20 +0000
commitfda2f858bef4d25c711f02fbb0f2aa0127a6c3b5 (patch)
tree38f643647e177aeb17b42f65fe4308e0b088d787 /src/core/web_contents_delegate_qt.cpp
parent260e9dd9b98c2bc90229f7d2f7aba8cc0029d24d (diff)
Fix favicon update from JavaScript
Task-number: QTBUG-64967 Change-Id: Ida79d6cdb682d510e9a2e91e3e3ca263acf34a99 Reviewed-by: Viktor Engelmann <viktor.engelmann@qt.io>
Diffstat (limited to 'src/core/web_contents_delegate_qt.cpp')
-rw-r--r--src/core/web_contents_delegate_qt.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/web_contents_delegate_qt.cpp b/src/core/web_contents_delegate_qt.cpp
index 26da6348a..4fe877e67 100644
--- a/src/core/web_contents_delegate_qt.cpp
+++ b/src/core/web_contents_delegate_qt.cpp
@@ -289,6 +289,9 @@ void WebContentsDelegateQt::DidUpdateFaviconURL(const std::vector<content::Favic
faviconCandidates.append(toFaviconInfo(candidate));
}
+ // Favicon URL can be changed from JavaScript too. Thus we need to reset
+ // the current candidate icon list to not handle previous icon as a candidate.
+ m_faviconManager->resetCandidates();
m_faviconManager->update(faviconCandidates);
}