Changeset 47383 in webkit
- Timestamp:
- Aug 17, 2009, 1:21:11 PM (16 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r47379 r47383 1 2009-08-17 Dan Bernstein <mitz@apple.com> 2 3 Reviewed by Darin Adler. 4 5 REGRESSION (r47255): MediaWiki's (including Wikipedia) navigation pane 6 appears below the main content 7 https://bugs.webkit.org/show_bug.cgi?id=28350 8 9 A particular version of the MediaWiki software detects WebKit through 10 user agent sniffing and imports a style sheet called KHTMLFixes.css, 11 which contains a single rule that was meant to work around some KHTML 12 bug, but currently has the sole effect of causing the float containing 13 the main article content to extend all the way to the left and thus push 14 down the left navigation pane. 15 16 * css/CSSImportRule.cpp: 17 (WebCore::CSSImportRule::setCSSStyleSheet): If site specific hacks are 18 enabled, check if the imported style sheet is the MediaWiki 19 KHTMLFixes.css. If so, remove the offending rule. 20 1 21 2009-08-17 Brent Fulgham <bfulgham@webkit.org> 2 22 -
trunk/WebCore/css/CSSImportRule.cpp
r39441 r47383 2 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) 3 3 * (C) 2002-2003 Dirk Mueller (mueller@kde.org) 4 * Copyright (C) 2002, 2005, 2006, 2008 Apple Inc. All rights reserved.4 * Copyright (C) 2002, 2005, 2006, 2008, 2009 Apple Inc. All rights reserved. 5 5 * 6 6 * This library is free software; you can redistribute it and/or … … 27 27 #include "Document.h" 28 28 #include "MediaList.h" 29 #include "Settings.h" 30 #include <wtf/StdLibExtras.h> 29 31 30 32 namespace WebCore { … … 61 63 CSSStyleSheet* parent = parentStyleSheet(); 62 64 bool strict = !parent || parent->useStrictParsing(); 63 m_styleSheet->parseString(sheet->sheetText(strict), strict); 65 String sheetText = sheet->sheetText(strict); 66 m_styleSheet->parseString(sheetText, strict); 67 68 if (strict && parent && parent->doc() && parent->doc()->settings() && parent->doc()->settings()->needsSiteSpecificQuirks()) { 69 // Work around <https://bugs.webkit.org/show_bug.cgi?id=28350>. 70 DEFINE_STATIC_LOCAL(const String, slashKHTMLFixesDotCss, ("/KHTMLFixes.css")); 71 DEFINE_STATIC_LOCAL(const String, mediaWikiKHTMLFixesStyleSheet, ("/* KHTML fix stylesheet */\n/* work around the horizontal scrollbars */\n#column-content { margin-left: 0; }\n\n")); 72 if (url.endsWith(slashKHTMLFixesDotCss) && sheetText == mediaWikiKHTMLFixesStyleSheet) { 73 ASSERT(m_styleSheet->length() == 1); 74 ExceptionCode ec; 75 m_styleSheet->deleteRule(0, ec); 76 } 77 } 78 64 79 m_loading = false; 65 80
Note:
See TracChangeset
for help on using the changeset viewer.