WebKit Bugzilla
Attachment 368916 Details for
Bug 197555
: Add a quirk to make youtube 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
youtube-quirk.patch (text/plain), 3.73 KB, created by
Antti Koivisto
on 2019-05-03 02:30:39 PDT
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Antti Koivisto
Created:
2019-05-03 02:30:39 PDT
Size:
3.73 KB
patch
obsolete
>Index: Source/WebCore/ChangeLog >=================================================================== >--- Source/WebCore/ChangeLog (revision 244905) >+++ Source/WebCore/ChangeLog (working copy) >@@ -1,3 +1,20 @@ >+2019-05-03 Antti Koivisto <antti@apple.com> >+ >+ Add a quirk to make youtube navigation bar scrollable without mouse hover on iOS >+ https://bugs.webkit.org/show_bug.cgi?id=197555 >+ <rdar://problem/49582231> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * css/StyleResolver.cpp: >+ (WebCore::StyleResolver::adjustRenderStyleForSiteSpecificQuirks): >+ >+ Turn 'overflow:hidden' into 'overflow:auto' on element with id="guide-inner-content". >+ >+ * page/Quirks.cpp: >+ (WebCore::Quirks::needsYouTubeOverflowScrollQuirk const): >+ * page/Quirks.h: >+ > 2019-05-02 Antti Koivisto <antti@apple.com> > > Add a quirk to make gmail navigation bar scrollable without mouse hover on iOS >Index: Source/WebCore/css/StyleResolver.cpp >=================================================================== >--- Source/WebCore/css/StyleResolver.cpp (revision 244904) >+++ Source/WebCore/css/StyleResolver.cpp (working copy) >@@ -1131,7 +1131,14 @@ void StyleResolver::adjustRenderStyleFor > { > if (document().quirks().needsGMailOverflowScrollQuirk()) { > // This turns sidebar scrollable without mouse move event. >- if (style.overflowY() == Overflow::Hidden && element.attributeWithoutSynchronization(roleAttr) == "navigation") >+ static NeverDestroyed<AtomicString> roleValue("navigation", AtomicString::ConstructFromLiteral); >+ if (style.overflowY() == Overflow::Hidden && element.attributeWithoutSynchronization(roleAttr) == roleValue) >+ style.setOverflowY(Overflow::Auto); >+ } >+ if (document().quirks().needsYouTubeOverflowScrollQuirk()) { >+ // This turns sidebar scrollable without hover. >+ static NeverDestroyed<AtomicString> idValue("guide-inner-content", AtomicString::ConstructFromLiteral); >+ if (style.overflowY() == Overflow::Hidden && element.idForStyleResolution() == idValue) > style.setOverflowY(Overflow::Auto); > } > } >Index: Source/WebCore/page/Quirks.cpp >=================================================================== >--- Source/WebCore/page/Quirks.cpp (revision 244904) >+++ Source/WebCore/page/Quirks.cpp (working copy) >@@ -287,6 +287,7 @@ bool Quirks::needsInputModeNoneImplicitl > #endif > } > >+// FIXME: Remove after the site is fixed, <rdar://problem/50374200> > bool Quirks::needsGMailOverflowScrollQuirk() const > { > #if PLATFORM(IOS_FAMILY) >@@ -302,5 +303,21 @@ bool Quirks::needsGMailOverflowScrollQui > #endif > } > >+// FIXME: Remove after the site is fixed, <rdar://problem/50374311> >+bool Quirks::needsYouTubeOverflowScrollQuirk() const >+{ >+#if PLATFORM(IOS_FAMILY) >+ if (!needsQuirks()) >+ return false; >+ >+ if (!m_needsYouTubeOverflowScrollQuirk) >+ m_needsYouTubeOverflowScrollQuirk = equalLettersIgnoringASCIICase(m_document->url().host(), "www.youtube.com"); >+ >+ return *m_needsYouTubeOverflowScrollQuirk; >+#else >+ return false; >+#endif >+} >+ > > } >Index: Source/WebCore/page/Quirks.h >=================================================================== >--- Source/WebCore/page/Quirks.h (revision 244904) >+++ Source/WebCore/page/Quirks.h (working copy) >@@ -55,6 +55,7 @@ public: > WEBCORE_EXPORT bool isNeverRichlyEditableForTouchBar() const; > > bool needsGMailOverflowScrollQuirk() const; >+ bool needsYouTubeOverflowScrollQuirk() const; > > private: > bool needsQuirks() const; >@@ -65,6 +66,7 @@ private: > mutable Optional<bool> m_hasWebSQLSupportQuirk; > #if PLATFORM(IOS_FAMILY) > mutable Optional<bool> m_needsGMailOverflowScrollQuirk; >+ mutable Optional<bool> m_needsYouTubeOverflowScrollQuirk; > #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 197555
: 368916