Commit 83571990 authored by mitz@apple.com's avatar mitz@apple.com
Browse files

<rdar://problem/7709115> REGRESSION: toolbar is missing at http://www.glom.org/

https://bugs.webkit.org/show_bug.cgi?id=35507

Reviewed by Alexey Proskuryakov.

* css/CSSImportRule.cpp:
(WebCore::CSSImportRule::setCSSStyleSheet): Extend the change made in
<http://trac.webkit.org/changeset/48818> to detect the two variants of
KHTMLFixes.css in @import rules as well as in <link> elements.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55935 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent dc9d96ff
2010-03-12 Dan Bernstein <mitz@apple.com>
Reviewed by Alexey Proskuryakov.
<rdar://problem/7709115> REGRESSION: toolbar is missing at http://www.glom.org/
https://bugs.webkit.org/show_bug.cgi?id=35507
* css/CSSImportRule.cpp:
(WebCore::CSSImportRule::setCSSStyleSheet): Extend the change made in
<http://trac.webkit.org/changeset/48818> to detect the two variants of
KHTMLFixes.css in @import rules as well as in <link> elements.
2010-03-12 Gavin Barraclough <barraclough@apple.com>
 
Reviewed by Geoff Garen.
......
......@@ -88,7 +88,10 @@ void CSSImportRule::setCSSStyleSheet(const String& href, const KURL& baseURL, co
// Work around <https://bugs.webkit.org/show_bug.cgi?id=28350>.
DEFINE_STATIC_LOCAL(const String, slashKHTMLFixesDotCss, ("/KHTMLFixes.css"));
DEFINE_STATIC_LOCAL(const String, mediaWikiKHTMLFixesStyleSheet, ("/* KHTML fix stylesheet */\n/* work around the horizontal scrollbars */\n#column-content { margin-left: 0; }\n\n"));
if (baseURL.string().endsWith(slashKHTMLFixesDotCss) && sheetText == mediaWikiKHTMLFixesStyleSheet) {
// There are two variants of KHTMLFixes.css. One is equal to mediaWikiKHTMLFixesStyleSheet,
// while the other lacks the second trailing newline.
if (baseURL.string().endsWith(slashKHTMLFixesDotCss) && !sheetText.isNull() && mediaWikiKHTMLFixesStyleSheet.startsWith(sheetText)
&& sheetText.length() >= mediaWikiKHTMLFixesStyleSheet.length() - 1) {
ASSERT(m_styleSheet->length() == 1);
ExceptionCode ec;
m_styleSheet->deleteRule(0, ec);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment