Changeset 242780 in webkit
- Timestamp:
- Mar 11, 2019 11:09:58 PM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r242779 r242780 1 2019-03-12 Ryosuke Niwa <rniwa@webkit.org> 2 3 Remove MediaWiki site specific quirks 4 https://bugs.webkit.org/show_bug.cgi?id=195597 5 6 Reviewed by Simon Fraser. 7 8 r47383 added a site specific quirk for the KHTML workaround in MediaWiki. 9 10 Blink since removed this workaround: 11 https://github.com/chromium/chromium/commit/ecf84fc9c1a51c8ede7adfd0b0cba446d9a8caa0 12 13 Given Chrome has been shipping without this quirk for six years, it's safe to assume 14 this site specific quirk is no longer neeed for Web compatibility. 15 16 * css/StyleSheetContents.cpp: 17 (WebCore::StyleSheetContents::parseAuthorStyleSheet): 18 * css/parser/CSSParserContext.cpp: 19 (WebCore::CSSParserContext::CSSParserContext): 20 (WebCore::operator==): 21 * css/parser/CSSParserContext.h: 22 (WebCore::CSSParserContextHash::hash): 23 1 24 2019-03-11 Ryosuke Niwa <rniwa@webkit.org> 2 25 -
trunk/Source/WebCore/css/StyleSheetContents.cpp
r228453 r242780 338 338 } 339 339 340 CSSParser p(parserContext()); 341 p.parseSheet(this, sheetText, CSSParser::RuleParsing::Deferred); 342 343 if (m_parserContext.needsSiteSpecificQuirks && isStrictParserMode(m_parserContext.mode)) { 344 // Work around <https://bugs.webkit.org/show_bug.cgi?id=28350>. 345 static NeverDestroyed<const String> mediaWikiKHTMLFixesStyleSheet(MAKE_STATIC_STRING_IMPL("/* KHTML fix stylesheet */\n/* work around the horizontal scrollbars */\n#column-content { margin-left: 0; }\n\n")); 346 // There are two variants of KHTMLFixes.css. One is equal to mediaWikiKHTMLFixesStyleSheet, 347 // while the other lacks the second trailing newline. 348 if (baseURL().string().endsWith("/KHTMLFixes.css") && !sheetText.isNull() && mediaWikiKHTMLFixesStyleSheet.get().startsWith(sheetText) 349 && sheetText.length() >= mediaWikiKHTMLFixesStyleSheet.get().length() - 1) 350 clearRules(); 351 } 340 CSSParser(parserContext()).parseSheet(this, sheetText, CSSParser::RuleParsing::Deferred); 352 341 } 353 342 -
trunk/Source/WebCore/css/parser/CSSParserContext.cpp
r237932 r242780 45 45 , mode(mode) 46 46 { 47 #if PLATFORM(IOS_FAMILY)48 // FIXME: Force the site specific quirk below to work on iOS. Investigating other site specific quirks49 // to see if we can enable the preference all together is to be handled by:50 // <rdar://problem/8493309> Investigate Enabling Site Specific Quirks in MobileSafari and UIWebView51 needsSiteSpecificQuirks = true;52 #endif53 47 } 54 48 … … 60 54 , hasDocumentSecurityOrigin(sheetBaseURL.isNull() || document.securityOrigin().canRequest(baseURL)) 61 55 { 62 63 needsSiteSpecificQuirks = document.settings().needsSiteSpecificQuirks();64 56 enforcesCSSMIMETypeInNoQuirksMode = document.settings().enforceCSSMIMETypeInNoQuirksMode(); 65 57 useLegacyBackgroundSizeShorthandBehavior = document.settings().useLegacyBackgroundSizeShorthandBehavior(); … … 75 67 deferredCSSParserEnabled = document.settings().deferredCSSParserEnabled(); 76 68 useSystemAppearance = document.page() ? document.page()->useSystemAppearance() : false; 77 78 #if PLATFORM(IOS_FAMILY)79 // FIXME: Force the site specific quirk below to work on iOS. Investigating other site specific quirks80 // to see if we can enable the preference all together is to be handled by:81 // <rdar://problem/8493309> Investigate Enabling Site Specific Quirks in MobileSafari and UIWebView82 needsSiteSpecificQuirks = true;83 #endif84 69 } 85 70 … … 93 78 && a.textAutosizingEnabled == b.textAutosizingEnabled 94 79 #endif 95 && a.needsSiteSpecificQuirks == b.needsSiteSpecificQuirks96 80 && a.enforcesCSSMIMETypeInNoQuirksMode == b.enforcesCSSMIMETypeInNoQuirksMode 97 81 && a.useLegacyBackgroundSizeShorthandBehavior == b.useLegacyBackgroundSizeShorthandBehavior -
trunk/Source/WebCore/css/parser/CSSParserContext.h
r238771 r242780 50 50 bool textAutosizingEnabled { false }; 51 51 #endif 52 bool needsSiteSpecificQuirks { false };53 52 bool enforcesCSSMIMETypeInNoQuirksMode { true }; 54 53 bool useLegacyBackgroundSizeShorthandBehavior { false }; … … 95 94 & key.textAutosizingEnabled << 1 96 95 #endif 97 & key.needsSiteSpecificQuirks << 2 98 & key.enforcesCSSMIMETypeInNoQuirksMode << 3 99 & key.useLegacyBackgroundSizeShorthandBehavior << 4 100 & key.springTimingFunctionEnabled << 5 101 & key.constantPropertiesEnabled << 6 102 & key.colorFilterEnabled << 7 103 & key.deferredCSSParserEnabled << 8 104 & key.hasDocumentSecurityOrigin << 9 105 & key.useSystemAppearance << 10 96 & key.enforcesCSSMIMETypeInNoQuirksMode << 2 97 & key.useLegacyBackgroundSizeShorthandBehavior << 3 98 & key.springTimingFunctionEnabled << 4 99 & key.constantPropertiesEnabled << 5 100 & key.colorFilterEnabled << 6 101 & key.deferredCSSParserEnabled << 7 102 & key.hasDocumentSecurityOrigin << 8 103 & key.useSystemAppearance << 9 106 104 #if ENABLE(ATTACHMENT_ELEMENT) 107 & key.attachmentEnabled << 1 1105 & key.attachmentEnabled << 10 108 106 #endif 109 & key.mode << 1 2; // Keep this last.107 & key.mode << 11; // Keep this last. 110 108 hash ^= WTF::intHash(bits); 111 109 return hash;
Note: See TracChangeset
for help on using the changeset viewer.