https://bugs.webkit.org/show_bug.cgi?id=83545
Patch by David Barr <davidbarr@chromium.org> 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.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114350
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-04-16 David Barr <davidbarr@chromium.org>
+
+ Stack overflow in CSS parser caused by recursive stylesheet import
+ https://bugs.webkit.org/show_bug.cgi?id=83545
+
+ Reviewed by Ryosuke Niwa.
+
+ * 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.
+
2012-04-16 Takashi Toyoshima <toyoshim@chromium.org>
Unreviewed, skip one more worker WebSocket test.
--- /dev/null
+@import url("../resources/redirect.php?url=../css/css-imports-redirect-cycle.css");
--- /dev/null
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+if (window.layoutTestController)
+ layoutTestController.dumpAsText();
+</script>
+<link href="css-imports-redirect-cycle.css" rel="stylesheet">
+</head>
+<body></body>
+</html>
+2012-04-16 David Barr <davidbarr@chromium.org>
+
+ Stack overflow in CSS parser caused by recursive stylesheet import
+ https://bugs.webkit.org/show_bug.cgi?id=83545
+
+ Reviewed by Ryosuke Niwa.
+
+ Test: http/tests/css/css-imports-redirect-cycle.html
+
+ * css/CSSImportRule.cpp:
+ (WebCore::StyleRuleImport::requestStyleSheet):
+
2012-04-16 Kent Tamura <tkent@chromium.org>
Rename LocalizedNumberICU.h to ICULocale.h
StyleSheetInternal* rootSheet = m_parentStyleSheet;
for (StyleSheetInternal* sheet = m_parentStyleSheet; 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->originalURL())
return;
rootSheet = sheet;
}