WebKit Bugzilla
Attachment 368904 Details for
Bug 197529
: Add a quirk to make gmail navigation bar scrollable without mouse hover on iOS
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
gmail-quirk-3.patch (text/plain), 4.29 KB, created by
Antti Koivisto
on 2019-05-02 23:09:01 PDT
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Antti Koivisto
Created:
2019-05-02 23:09:01 PDT
Size:
4.29 KB
patch
obsolete
>Index: Source/WebCore/ChangeLog >=================================================================== >--- Source/WebCore/ChangeLog (revision 244882) >+++ Source/WebCore/ChangeLog (working copy) >@@ -1,3 +1,23 @@ >+2019-05-02 Antti Koivisto <antti@apple.com> >+ >+ Add a quirk to make gmail navigation bar scrollable without mouse hover on iOS >+ https://bugs.webkit.org/show_bug.cgi?id=197529 >+ <rdar://problem/49403416> >+ >+ Reviewed by Simon Fraser. >+ >+ * css/StyleResolver.cpp: >+ (WebCore::StyleResolver::adjustRenderStyle): >+ (WebCore::StyleResolver::adjustRenderStyleForSiteSpecificQuirks): >+ >+ Turn 'overflow:hidden' to 'overflow:auto' on element with role="navigation". >+ This should be both reasonably targeted and robust. >+ >+ * css/StyleResolver.h: >+ * page/Quirks.cpp: >+ (WebCore::Quirks::needsGMailOverflowScrollQuirk const): >+ * page/Quirks.h: >+ > 2019-05-02 Don Olmstead <don.olmstead@sony.com> > > [CMake] Refactor WEBKIT_MAKE_FORWARDING_HEADERS into WEBKIT_COPY_FILES >Index: Source/WebCore/css/StyleResolver.cpp >=================================================================== >--- Source/WebCore/css/StyleResolver.cpp (revision 244869) >+++ Source/WebCore/css/StyleResolver.cpp (working copy) >@@ -76,6 +76,7 @@ > #include "PageRuleCollector.h" > #include "PaintWorkletGlobalScope.h" > #include "Pair.h" >+#include "Quirks.h" > #include "RenderScrollbar.h" > #include "RenderStyleConstants.h" > #include "RenderTheme.h" >@@ -1121,6 +1122,18 @@ void StyleResolver::adjustRenderStyle(Re > #if ENABLE(POINTER_EVENTS) > style.setEffectiveTouchActions(computeEffectiveTouchActions(style, parentStyle.effectiveTouchActions())); > #endif >+ >+ if (element) >+ adjustRenderStyleForSiteSpecificQuirks(style, *element); >+} >+ >+void StyleResolver::adjustRenderStyleForSiteSpecificQuirks(RenderStyle& style, const Element& element) >+{ >+ if (document().quirks().needsGMailOverflowScrollQuirk()) { >+ // This turns sidebar scrollable without mouse move event. >+ if (style.overflowY() == Overflow::Hidden && element.attributeWithoutSynchronization(roleAttr) == "navigation") >+ style.setOverflowY(Overflow::Auto); >+ } > } > > static void checkForOrientationChange(RenderStyle* style) >Index: Source/WebCore/css/StyleResolver.h >=================================================================== >--- Source/WebCore/css/StyleResolver.h (revision 244869) >+++ Source/WebCore/css/StyleResolver.h (working copy) >@@ -319,6 +319,8 @@ private: > #endif > > void adjustRenderStyle(RenderStyle&, const RenderStyle& parentStyle, const RenderStyle* parentBoxStyle, const Element*); >+ void adjustRenderStyleForSiteSpecificQuirks(RenderStyle&, const Element&); >+ > std::unique_ptr<GridPosition> adjustNamedGridItemPosition(const NamedGridAreaMap&, const NamedGridLinesMap&, const GridPosition&, GridPositionSide) const; > > void adjustStyleForInterCharacterRuby(); >Index: Source/WebCore/page/Quirks.cpp >=================================================================== >--- Source/WebCore/page/Quirks.cpp (revision 244869) >+++ Source/WebCore/page/Quirks.cpp (working copy) >@@ -265,4 +265,20 @@ bool Quirks::shouldDisablePointerEventsQ > return false; > } > >+bool Quirks::needsGMailOverflowScrollQuirk() const >+{ >+#if PLATFORM(IOS_FAMILY) >+ if (!needsQuirks()) >+ return false; >+ >+ if (!m_needsGMailOverflowScrollQuirk) >+ m_needsGMailOverflowScrollQuirk = equalLettersIgnoringASCIICase(m_document->url().host(), "mail.google.com"); >+ >+ return *m_needsGMailOverflowScrollQuirk; >+#else >+ return false; >+#endif >+} >+ >+ > } >Index: Source/WebCore/page/Quirks.h >=================================================================== >--- Source/WebCore/page/Quirks.h (revision 244869) >+++ Source/WebCore/page/Quirks.h (working copy) >@@ -52,6 +52,8 @@ public: > WEBCORE_EXPORT bool isTouchBarUpdateSupressedForHiddenContentEditable() const; > WEBCORE_EXPORT bool isNeverRichlyEditableForTouchBar() const; > >+ bool needsGMailOverflowScrollQuirk() const; >+ > private: > bool needsQuirks() const; > >@@ -59,6 +61,9 @@ private: > > mutable Optional<bool> m_hasBrokenEncryptedMediaAPISupportQuirk; > mutable Optional<bool> m_hasWebSQLSupportQuirk; >+#if PLATFORM(IOS_FAMILY) >+ mutable Optional<bool> m_needsGMailOverflowScrollQuirk; >+#endif > }; > > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 197529
:
368818
| 368904