Title: [121270] trunk/Source/WebCore
Revision
121270
Author
commit-qu...@webkit.org
Date
2012-06-26 11:34:54 -0700 (Tue, 26 Jun 2012)

Log Message

Do early-return when author and user styles are disabled.
https://bugs.webkit.org/show_bug.cgi?id=89947

Patch by Joe Thomas <joetho...@motorola.com> on 2012-06-26
Reviewed by Andreas Kling.

* dom/Document.cpp:
(WebCore::Document::collectActiveStylesheets):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (121269 => 121270)


--- trunk/Source/WebCore/ChangeLog	2012-06-26 18:27:44 UTC (rev 121269)
+++ trunk/Source/WebCore/ChangeLog	2012-06-26 18:34:54 UTC (rev 121270)
@@ -1,3 +1,13 @@
+2012-06-26  Joe Thomas  <joetho...@motorola.com>
+
+        Do early-return when author and user styles are disabled.
+        https://bugs.webkit.org/show_bug.cgi?id=89947
+
+        Reviewed by Andreas Kling.
+
+        * dom/Document.cpp:
+        (WebCore::Document::collectActiveStylesheets):
+
 2012-06-26  James Robinson  <jam...@chromium.org>
 
         [chromium] Remove dead compositor-related API from GraphicsContext3DPrivate / Extensions3DChromium

Modified: trunk/Source/WebCore/dom/Document.cpp (121269 => 121270)


--- trunk/Source/WebCore/dom/Document.cpp	2012-06-26 18:27:44 UTC (rev 121269)
+++ trunk/Source/WebCore/dom/Document.cpp	2012-06-26 18:34:54 UTC (rev 121270)
@@ -3401,14 +3401,11 @@
 
 void Document::collectActiveStylesheets(Vector<RefPtr<StyleSheet> >& sheets)
 {
-    bool matchAuthorAndUserStyles = true;
-    if (Settings* settings = this->settings())
-        matchAuthorAndUserStyles = settings->authorAndUserStylesEnabled();
+    if (settings() && !settings()->authorAndUserStylesEnabled())
+        return;
 
     StyleSheetCandidateListHashSet::iterator begin = m_styleSheetCandidateNodes.begin();
     StyleSheetCandidateListHashSet::iterator end = m_styleSheetCandidateNodes.end();
-    if (!matchAuthorAndUserStyles)
-        end = begin;
     for (StyleSheetCandidateListHashSet::iterator it = begin; it != end; ++it) {
         Node* n = *it;
         StyleSheet* sheet = 0;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to