Changeset 251827 in webkit
- Timestamp:
- Oct 30, 2019 6:41:11 PM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r251826 r251827 1 2019-10-30 Jer Noble <jer.noble@apple.com> 2 3 Add fullscreen style quirk for reddit.com 4 https://bugs.webkit.org/show_bug.cgi?id=203635 5 <rdar://problem/55813774> 6 7 Reviewed by Eric Carlson. 8 9 Reddit.com expects the UA stylesheet to give the fullscreen element 10 a "width:100%; height:100%;" style. 11 12 * css/CSSDefaultStyleSheets.cpp: 13 (WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement): 14 * page/Quirks.cpp: 15 (WebCore::Quirks::needsFullWidthHeightFullscreenStyleQuirk const): 16 * page/Quirks.h: 17 1 18 2019-10-30 Yusuke Suzuki <ysuzuki@apple.com> 2 19 -
trunk/Source/WebCore/css/CSSDefaultStyleSheets.cpp
r250916 r251827 48 48 #include "MediaQueryEvaluator.h" 49 49 #include "Page.h" 50 #include "Quirks.h" 50 51 #include "RenderTheme.h" 51 52 #include "RuleSet.h" … … 278 279 #if ENABLE(FULLSCREEN_API) 279 280 if (!fullscreenStyleSheet && element.document().fullscreenManager().isFullscreen()) { 280 String fullscreenRules = String(fullscreenUserAgentStyleSheet, sizeof(fullscreenUserAgentStyleSheet)) + RenderTheme::singleton().extraFullScreenStyleSheet(); 281 fullscreenStyleSheet = parseUASheet(fullscreenRules); 281 StringBuilder fullscreenRules; 282 fullscreenRules.appendCharacters(fullscreenUserAgentStyleSheet, sizeof(fullscreenUserAgentStyleSheet)); 283 fullscreenRules.append(RenderTheme::singleton().extraFullScreenStyleSheet()); 284 if (element.document().quirks().needsFullWidthHeightFullscreenStyleQuirk()) 285 fullscreenRules.append(":-webkit-full-screen { width:100%; height:100%; }"); 286 fullscreenStyleSheet = parseUASheet(fullscreenRules.toString()); 282 287 addToDefaultStyle(*fullscreenStyleSheet); 283 288 } -
trunk/Source/WebCore/page/Quirks.cpp
r251508 r251827 595 595 } 596 596 597 } 597 bool Quirks::needsFullWidthHeightFullscreenStyleQuirk() const 598 { 599 if (!needsQuirks()) 600 return false; 601 602 if (m_needsFullWidthHeightFullscreenStyleQuirk) 603 return m_needsFullWidthHeightFullscreenStyleQuirk.value(); 604 605 auto domain = m_document->securityOrigin().domain().convertToASCIILowercase(); 606 607 m_needsFullWidthHeightFullscreenStyleQuirk = domain == "reddit.com" || domain.endsWith(".reddit.com"); 608 609 return m_needsFullWidthHeightFullscreenStyleQuirk.value(); 610 } 611 612 } -
trunk/Source/WebCore/page/Quirks.h
r251508 r251827 81 81 82 82 bool needsPreloadAutoQuirk() const; 83 bool needsFullWidthHeightFullscreenStyleQuirk() const; 83 84 84 85 private: … … 93 94 94 95 mutable Optional<bool> m_hasBrokenEncryptedMediaAPISupportQuirk; 96 mutable Optional<bool> m_needsFullWidthHeightFullscreenStyleQuirk; 95 97 #if PLATFORM(IOS_FAMILY) 96 98 mutable Optional<bool> m_needsGMailOverflowScrollQuirk;
Note: See TracChangeset
for help on using the changeset viewer.