Changeset 248499 in webkit
- Timestamp:
- Aug 10, 2019 3:38:00 AM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r248497 r248499 1 2019-08-10 Antti Koivisto <antti@apple.com> 2 3 Can’t sort videos on a YouTube channel page on iPad 4 https://bugs.webkit.org/show_bug.cgi?id=200573 5 <rdar://problem/53415195> 6 7 Reviewed by Darin Adler. 8 9 Add a quirk to make touch events non-cancelable (preventDefault() does nothing). 10 11 * page/Quirks.cpp: 12 (WebCore::Quirks::shouldMakeTouchEventNonCancelableForTarget const): 13 * page/Quirks.h: 14 1 15 2019-08-10 Devin Rousso <drousso@apple.com> 2 16 -
trunk/Source/WebCore/page/Quirks.cpp
r248463 r248499 348 348 return Event::IsCancelable::Yes; 349 349 } 350 351 bool Quirks::shouldMakeTouchEventNonCancelableForTarget(EventTarget* target) const 352 { 353 if (!needsQuirks()) 354 return false; 355 356 auto host = m_document->topDocument().url().host(); 357 358 if (equalLettersIgnoringASCIICase(host, "www.youtube.com")) { 359 if (is<Element>(target)) { 360 unsigned depth = 3; 361 for (auto* element = downcast<Element>(target); element && depth; element = element->parentElement(), --depth) { 362 if (element->localName() == "paper-item" && element->classList().contains("yt-dropdown-menu")) 363 return true; 364 } 365 } 366 } 367 368 return false; 369 } 350 370 #endif 351 371 -
trunk/Source/WebCore/page/Quirks.h
r248463 r248499 55 55 bool shouldDispatchedSimulatedMouseEventsAssumeDefaultPrevented(EventTarget*) const; 56 56 Optional<Event::IsCancelable> simulatedMouseEventTypeForTarget(EventTarget*) const; 57 bool shouldMakeTouchEventNonCancelableForTarget(EventTarget*) const; 57 58 #endif 58 59 bool shouldDisablePointerEventsQuirk() const;
Note: See TracChangeset
for help on using the changeset viewer.