Title: [114710] branches/chromium/1084/Source/WebCore/css/CSSImportRule.cpp
Revision
114710
Author
[email protected]
Date
2012-04-19 18:40:15 -0700 (Thu, 19 Apr 2012)

Log Message

Merge 114350 - Stack overflow in CSS parser caused by recursive stylesheet import
https://bugs.webkit.org/show_bug.cgi?id=83545

Patch by David Barr <[email protected]> on 2012-04-16
Reviewed by Ryosuke Niwa.

Source/WebCore:

Test: http/tests/css/css-imports-redirect-cycle.html

* css/CSSImportRule.cpp:
(WebCore::StyleRuleImport::requestStyleSheet):

LayoutTests:

* http/tests/css/css-imports-redirect-cycle-expected.txt: Added.
* http/tests/css/css-imports-redirect-cycle.css: Added.
* http/tests/css/css-imports-redirect-cycle.html: Added.

BUG=122606
[email protected]
Review URL: https://chromiumcodereview.appspot.com/10143006

Modified Paths

Diff

Modified: branches/chromium/1084/Source/WebCore/css/CSSImportRule.cpp (114709 => 114710)


--- branches/chromium/1084/Source/WebCore/css/CSSImportRule.cpp	2012-04-20 01:14:26 UTC (rev 114709)
+++ branches/chromium/1084/Source/WebCore/css/CSSImportRule.cpp	2012-04-20 01:40:15 UTC (rev 114710)
@@ -140,7 +140,7 @@
     CSSStyleSheet* rootSheet = parentSheet;
     for (CSSStyleSheet* sheet = parentSheet; sheet; sheet = sheet->parentStyleSheet()) {
         // FIXME: This is wrong if the finalURL was updated via document::updateBaseURL.
-        if (absHref == sheet->finalURL().string())
+        if (absHref == sheet->finalURL().string() || absHref == sheet->href())
             return;
         rootSheet = sheet;
     }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to