Title: [100614] trunk/Source
Revision
100614
Author
[email protected]
Date
2011-11-17 06:23:49 -0800 (Thu, 17 Nov 2011)

Log Message

[Qt] Layer violation: WebCore::dnsPrefetch uses QWebSettings::globalSettings()
https://bugs.webkit.org/show_bug.cgi?id=72596

Reviewed by Kenneth Rohde Christiansen.

Source/WebCore:

We don't need to use QWebSettings here, because we now propagate the DNS prefetch
setting to WebCore::Settings and the rest of WebCore checks the setting before calling
WebCore::prefetchDNS.

* platform/network/qt/DnsPrefetchHelper.cpp:
(WebCore::prefetchDNS): Removed the use of QWebSettings.
* platform/network/qt/DnsPrefetchHelper.h: Remove offending qwebsettings.h inclusion.

Source/WebKit/qt:

* Api/qwebsettings.cpp:
(QWebSettingsPrivate::apply): Propagate the DNS prefetch setting to WebCore::Settings.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (100613 => 100614)


--- trunk/Source/WebCore/ChangeLog	2011-11-17 14:22:48 UTC (rev 100613)
+++ trunk/Source/WebCore/ChangeLog	2011-11-17 14:23:49 UTC (rev 100614)
@@ -1,5 +1,20 @@
 2011-11-17  Simon Hausmann  <[email protected]>
 
+        [Qt] Layer violation: WebCore::dnsPrefetch uses QWebSettings::globalSettings()
+        https://bugs.webkit.org/show_bug.cgi?id=72596
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        We don't need to use QWebSettings here, because we now propagate the DNS prefetch
+        setting to WebCore::Settings and the rest of WebCore checks the setting before calling
+        WebCore::prefetchDNS.
+
+        * platform/network/qt/DnsPrefetchHelper.cpp:
+        (WebCore::prefetchDNS): Removed the use of QWebSettings.
+        * platform/network/qt/DnsPrefetchHelper.h: Remove offending qwebsettings.h inclusion.
+
+2011-11-17  Simon Hausmann  <[email protected]>
+
         [Qt] Layer violation: Image::loadPlatformResource uses QWebSettings::webGraphic
         https://bugs.webkit.org/show_bug.cgi?id=72594
 

Modified: trunk/Source/WebCore/platform/network/qt/DnsPrefetchHelper.cpp (100613 => 100614)


--- trunk/Source/WebCore/platform/network/qt/DnsPrefetchHelper.cpp	2011-11-17 14:22:48 UTC (rev 100613)
+++ trunk/Source/WebCore/platform/network/qt/DnsPrefetchHelper.cpp	2011-11-17 14:23:49 UTC (rev 100614)
@@ -26,10 +26,8 @@
 // this is called on mouse over a href and on page loading
 void prefetchDNS(const String& hostname)
 {
-    if (QWebSettings::globalSettings()->testAttribute(QWebSettings::DnsPrefetchEnabled)) {
-        static DnsPrefetchHelper dnsPrefetchHelper;
-        dnsPrefetchHelper.lookup(QString(hostname));
-    }
+    static DnsPrefetchHelper dnsPrefetchHelper;
+    dnsPrefetchHelper.lookup(QString(hostname));
 }
 
 }

Modified: trunk/Source/WebCore/platform/network/qt/DnsPrefetchHelper.h (100613 => 100614)


--- trunk/Source/WebCore/platform/network/qt/DnsPrefetchHelper.h	2011-11-17 14:22:48 UTC (rev 100613)
+++ trunk/Source/WebCore/platform/network/qt/DnsPrefetchHelper.h	2011-11-17 14:23:49 UTC (rev 100614)
@@ -25,7 +25,6 @@
 #include <QSet>
 #include <QString>
 #include <QTime>
-#include "qwebsettings.h"
 
 namespace WebCore {
 

Modified: trunk/Source/WebKit/qt/Api/qwebsettings.cpp (100613 => 100614)


--- trunk/Source/WebKit/qt/Api/qwebsettings.cpp	2011-11-17 14:22:48 UTC (rev 100613)
+++ trunk/Source/WebKit/qt/Api/qwebsettings.cpp	2011-11-17 14:23:49 UTC (rev 100614)
@@ -141,6 +141,10 @@
                                       global->attributes.value(QWebSettings::AutoLoadImages));
         settings->setLoadsImagesAutomatically(value);
 
+        value = attributes.value(QWebSettings::DnsPrefetchEnabled,
+                                 global->attributes.value(QWebSettings::DnsPrefetchEnabled));
+        settings->setDNSPrefetchingEnabled(value);
+
         value = attributes.value(QWebSettings::_javascript_Enabled,
                                       global->attributes.value(QWebSettings::_javascript_Enabled));
         settings->setScriptEnabled(value);

Modified: trunk/Source/WebKit/qt/ChangeLog (100613 => 100614)


--- trunk/Source/WebKit/qt/ChangeLog	2011-11-17 14:22:48 UTC (rev 100613)
+++ trunk/Source/WebKit/qt/ChangeLog	2011-11-17 14:23:49 UTC (rev 100614)
@@ -1,5 +1,15 @@
 2011-11-17  Simon Hausmann  <[email protected]>
 
+        [Qt] Layer violation: WebCore::dnsPrefetch uses QWebSettings::globalSettings()
+        https://bugs.webkit.org/show_bug.cgi?id=72596
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        * Api/qwebsettings.cpp:
+        (QWebSettingsPrivate::apply): Propagate the DNS prefetch setting to WebCore::Settings.
+
+2011-11-17  Simon Hausmann  <[email protected]>
+
         [Qt] Layer violation: Image::loadPlatformResource uses QWebSettings::webGraphic
         https://bugs.webkit.org/show_bug.cgi?id=72594
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to