Changeset 244904 in webkit
- Timestamp:
- May 2, 2019 11:48:14 PM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r244900 r244904 1 2019-05-02 Antti Koivisto <antti@apple.com> 2 3 Add a quirk to make gmail navigation bar scrollable without mouse hover on iOS 4 https://bugs.webkit.org/show_bug.cgi?id=197529 5 <rdar://problem/49403416> 6 7 Reviewed by Simon Fraser. 8 9 * css/StyleResolver.cpp: 10 (WebCore::StyleResolver::adjustRenderStyle): 11 (WebCore::StyleResolver::adjustRenderStyleForSiteSpecificQuirks): 12 13 Turn 'overflow:hidden' to 'overflow:auto' on element with role="navigation". 14 This should be both reasonably targeted and robust. 15 16 * css/StyleResolver.h: 17 * page/Quirks.cpp: 18 (WebCore::Quirks::needsGMailOverflowScrollQuirk const): 19 * page/Quirks.h: 20 1 21 2019-05-02 Simon Fraser <simon.fraser@apple.com> 2 22 -
trunk/Source/WebCore/css/StyleResolver.cpp
r244408 r244904 77 77 #include "PaintWorkletGlobalScope.h" 78 78 #include "Pair.h" 79 #include "Quirks.h" 79 80 #include "RenderScrollbar.h" 80 81 #include "RenderStyleConstants.h" … … 1122 1123 style.setEffectiveTouchActions(computeEffectiveTouchActions(style, parentStyle.effectiveTouchActions())); 1123 1124 #endif 1125 1126 if (element) 1127 adjustRenderStyleForSiteSpecificQuirks(style, *element); 1128 } 1129 1130 void StyleResolver::adjustRenderStyleForSiteSpecificQuirks(RenderStyle& style, const Element& element) 1131 { 1132 if (document().quirks().needsGMailOverflowScrollQuirk()) { 1133 // This turns sidebar scrollable without mouse move event. 1134 if (style.overflowY() == Overflow::Hidden && element.attributeWithoutSynchronization(roleAttr) == "navigation") 1135 style.setOverflowY(Overflow::Auto); 1136 } 1124 1137 } 1125 1138 -
trunk/Source/WebCore/css/StyleResolver.h
r238771 r244904 320 320 321 321 void adjustRenderStyle(RenderStyle&, const RenderStyle& parentStyle, const RenderStyle* parentBoxStyle, const Element*); 322 void adjustRenderStyleForSiteSpecificQuirks(RenderStyle&, const Element&); 323 322 324 std::unique_ptr<GridPosition> adjustNamedGridItemPosition(const NamedGridAreaMap&, const NamedGridLinesMap&, const GridPosition&, GridPositionSide) const; 323 325 -
trunk/Source/WebCore/page/Quirks.cpp
r244894 r244904 288 288 } 289 289 290 } 290 bool Quirks::needsGMailOverflowScrollQuirk() const 291 { 292 #if PLATFORM(IOS_FAMILY) 293 if (!needsQuirks()) 294 return false; 295 296 if (!m_needsGMailOverflowScrollQuirk) 297 m_needsGMailOverflowScrollQuirk = equalLettersIgnoringASCIICase(m_document->url().host(), "mail.google.com"); 298 299 return *m_needsGMailOverflowScrollQuirk; 300 #else 301 return false; 302 #endif 303 } 304 305 306 } -
trunk/Source/WebCore/page/Quirks.h
r244894 r244904 55 55 WEBCORE_EXPORT bool isNeverRichlyEditableForTouchBar() const; 56 56 57 bool needsGMailOverflowScrollQuirk() const; 58 57 59 private: 58 60 bool needsQuirks() const; … … 62 64 mutable Optional<bool> m_hasBrokenEncryptedMediaAPISupportQuirk; 63 65 mutable Optional<bool> m_hasWebSQLSupportQuirk; 66 #if PLATFORM(IOS_FAMILY) 67 mutable Optional<bool> m_needsGMailOverflowScrollQuirk; 68 #endif 64 69 }; 65 70
Note: See TracChangeset
for help on using the changeset viewer.