Title: [259706] trunk/Source/WebCore
- Revision
- 259706
- Author
- grao...@webkit.org
- Date
- 2020-04-08 00:46:26 -0700 (Wed, 08 Apr 2020)
Log Message
[iPadOS] Unable to toggle subpages on sites.google.com
https://bugs.webkit.org/show_bug.cgi?id=210143
<rdar://problem/58653069>
Reviewed by Brent Fulgham.
If a site built with sites.google.com has some sub-pages, tapping on the right-pointing arrow will not disclose the sub-pages due to preventDefault() being called
on the touchend event handler. We work around this issue by adding a new quirk that will prevent a given touch event type from being dispatched on a given element.
This quirk is only true for sites.google.com and the right-pointing arrow for the sub-pages disclosure.
* page/Quirks.cpp:
(WebCore::Quirks::shouldPreventDispatchOfTouchEvent const):
* page/Quirks.h:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (259705 => 259706)
--- trunk/Source/WebCore/ChangeLog 2020-04-08 06:19:23 UTC (rev 259705)
+++ trunk/Source/WebCore/ChangeLog 2020-04-08 07:46:26 UTC (rev 259706)
@@ -1,3 +1,19 @@
+2020-04-07 Antoine Quint <grao...@apple.com>
+
+ [iPadOS] Unable to toggle subpages on sites.google.com
+ https://bugs.webkit.org/show_bug.cgi?id=210143
+ <rdar://problem/58653069>
+
+ Reviewed by Brent Fulgham.
+
+ If a site built with sites.google.com has some sub-pages, tapping on the right-pointing arrow will not disclose the sub-pages due to preventDefault() being called
+ on the touchend event handler. We work around this issue by adding a new quirk that will prevent a given touch event type from being dispatched on a given element.
+ This quirk is only true for sites.google.com and the right-pointing arrow for the sub-pages disclosure.
+
+ * page/Quirks.cpp:
+ (WebCore::Quirks::shouldPreventDispatchOfTouchEvent const):
+ * page/Quirks.h:
+
2020-04-07 Tyler Wilcock <twilc...@protonmail.com>
[css-values-4] Support font-relative lh and rlh unit
Modified: trunk/Source/WebCore/page/Quirks.cpp (259705 => 259706)
--- trunk/Source/WebCore/page/Quirks.cpp 2020-04-08 06:19:23 UTC (rev 259705)
+++ trunk/Source/WebCore/page/Quirks.cpp 2020-04-08 07:46:26 UTC (rev 259706)
@@ -435,6 +435,20 @@
auto host = m_document->topDocument().url().host();
return equalLettersIgnoringASCIICase(host, "shutterstock.com") || host.endsWithIgnoringASCIICase(".shutterstock.com");
}
+
+bool Quirks::shouldPreventDispatchOfTouchEvent(const AtomString& touchEventType, EventTarget* target) const
+{
+ if (!needsQuirks())
+ return false;
+
+ if (is<Element>(target) && touchEventType == eventNames().touchendEvent && equalLettersIgnoringASCIICase(m_document->topDocument().url().host(), "sites.google.com")) {
+ auto& classList = downcast<Element>(*target).classList();
+ return classList.contains("DPvwYc") && classList.contains("sm8sCf");
+ }
+
+ return false;
+}
+
#endif
bool Quirks::shouldAvoidResizingWhenInputViewBoundsChange() const
Modified: trunk/Source/WebCore/page/Quirks.h (259705 => 259706)
--- trunk/Source/WebCore/page/Quirks.h 2020-04-08 06:19:23 UTC (rev 259705)
+++ trunk/Source/WebCore/page/Quirks.h 2020-04-08 07:46:26 UTC (rev 259706)
@@ -57,6 +57,7 @@
Optional<Event::IsCancelable> simulatedMouseEventTypeForTarget(EventTarget*) const;
bool shouldMakeTouchEventNonCancelableForTarget(EventTarget*) const;
bool shouldPreventPointerMediaQueryFromEvaluatingToCoarse() const;
+ bool shouldPreventDispatchOfTouchEvent(const AtomString&, EventTarget*) const;
#endif
bool shouldDisablePointerEventsQuirk() const;
bool needsInputModeNoneImplicitly(const HTMLElement&) const;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes