File: webpageicons_db_privacy.patch

package info (click to toggle)
qtwebkit-opensource-src 5.3.2%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 291,876 kB
  • ctags: 268,746
  • sloc: cpp: 1,358,098; python: 70,286; ansic: 42,964; perl: 35,473; ruby: 12,229; objc: 9,465; xml: 8,396; asm: 3,871; yacc: 2,397; sh: 1,647; makefile: 644; lex: 644; java: 110
file content (47 lines) | stat: -rw-r--r-- 2,206 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
From 2810aea1f6c9cca48b93130a7c245f9a2f85637e Mon Sep 17 00:00:00 2001
From: Florian Bruhin <git@the-compiler.org>
Date: Wed, 18 Mar 2015 18:47:19 +0100
Subject: Fix URLs visited during private browsing showing up in
 WebpageIcons.db.

Ported from http://trac.webkit.org/changeset/181565 by beidson@apple.com.

Upstream patch by Sam Weinig, reviewed by Brady Eidson.

* loader/icon/IconController.cpp:

(WebCore::IconController::startLoader): Bail early here if the page is using an ephemeral session.
(WebCore::IconController::continueLoadWithDecision): Instead of here.

Change-Id: I263bb6122606caa3488d641b127dd377012ee424
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
---
 Source/WebCore/loader/icon/IconController.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/Source/WebCore/loader/icon/IconController.cpp b/Source/WebCore/loader/icon/IconController.cpp
index 8f23f6d..a808352 100644
--- a/Source/WebCore/loader/icon/IconController.cpp
+++ b/Source/WebCore/loader/icon/IconController.cpp
@@ -159,6 +159,10 @@ void IconController::startLoader()
     }
 
     if (iconDatabase().supportsAsynchronousMode()) {
+        //  FIXME (<rdar://problem/9168605>) - We should support in-memory-only private browsing icons in asynchronous icon database mode.
+        if (iconDatabase().supportsAsynchronousMode() && m_frame->page()->settings()->privateBrowsingEnabled())
+            return;
+
         m_frame->loader()->documentLoader()->getIconLoadDecisionForIconURL(urlString);
         // Commit the icon url mapping to the database just in case we don't end up loading later.
         commitToDatabase(iconURL);
@@ -202,10 +206,6 @@ void IconController::continueLoadWithDecision(IconLoadDecision iconLoadDecision)
 {
     ASSERT(iconLoadDecision != IconLoadUnknown);
 
-    //  FIXME (<rdar://problem/9168605>) - We should support in-memory-only private browsing icons in asynchronous icon database mode.
-    if (iconDatabase().supportsAsynchronousMode() && m_frame->page()->settings()->privateBrowsingEnabled())
-        return;
-
     if (iconLoadDecision == IconLoadNo) {
         KURL iconURL(url());
         String urlString(iconURL.string());