WebKit Bugzilla
Attachment 373480 Details for
Bug 199508
: REGRESSION(r244218): desmos.com: Cannot scroll formulas region when region is scrollable
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
non-cancelable-simulated-event-2.patch (text/plain), 5.51 KB, created by
Antti Koivisto
on 2019-07-04 23:55:36 PDT
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Antti Koivisto
Created:
2019-07-04 23:55:36 PDT
Size:
5.51 KB
patch
obsolete
>Index: Source/WebCore/ChangeLog >=================================================================== >--- Source/WebCore/ChangeLog (revision 247147) >+++ Source/WebCore/ChangeLog (working copy) >@@ -1,3 +1,25 @@ >+2019-07-04 Antti Koivisto <antti@apple.com> >+ >+ REGRESSION(r244218): desmos.com: Cannot scroll formulas region when region is scrollable >+ https://bugs.webkit.org/show_bug.cgi?id=199508 >+ <rdar://problem/50925173> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ The page invokes preventDefault on simulated mouse events which stops scrolling. >+ To fix, add a quirk that turns simulated mouse events non-cancelable. >+ >+ * dom/MouseEvent.h: >+ * dom/ios/MouseEventIOS.cpp: >+ (WebCore::MouseEvent::create): >+ * page/Quirks.cpp: >+ (WebCore::Quirks::simulatedMouseEventTypeForTarget const): >+ (WebCore::Quirks::shouldDispatchSimulatedMouseEventsOnTarget const): Deleted. >+ >+ To avoid adding more similar functions, and for future flexibility, make this one return the type too. >+ >+ * page/Quirks.h: >+ > 2019-07-04 Zalan Bujtas <zalan@apple.com> > > [ContentChangeObserver] didFinishTransition triggers a nested style recalc via isConsideredClickable >Index: Source/WebCore/dom/MouseEvent.h >=================================================================== >--- Source/WebCore/dom/MouseEvent.h (revision 247090) >+++ Source/WebCore/dom/MouseEvent.h (working copy) >@@ -54,7 +54,7 @@ public: > static Ref<MouseEvent> create(const AtomString& eventType, const MouseEventInit&); > > #if ENABLE(TOUCH_EVENTS) && PLATFORM(IOS_FAMILY) >- static Ref<MouseEvent> create(const PlatformTouchEvent&, unsigned touchIndex, Ref<WindowProxy>&&); >+ static Ref<MouseEvent> create(const PlatformTouchEvent&, unsigned touchIndex, Ref<WindowProxy>&&, IsCancelable = IsCancelable::Yes); > #endif > > virtual ~MouseEvent(); >Index: Source/WebCore/dom/ios/MouseEventIOS.cpp >=================================================================== >--- Source/WebCore/dom/ios/MouseEventIOS.cpp (revision 247090) >+++ Source/WebCore/dom/ios/MouseEventIOS.cpp (working copy) >@@ -48,9 +48,9 @@ static AtomString mouseEventType(Platfor > return nullAtom(); > } > >-Ref<MouseEvent> MouseEvent::create(const PlatformTouchEvent& event, unsigned index, Ref<WindowProxy>&& view) >+Ref<MouseEvent> MouseEvent::create(const PlatformTouchEvent& event, unsigned index, Ref<WindowProxy>&& view, IsCancelable cancelable) > { >- return adoptRef(*new MouseEvent(mouseEventType(event.touchPhaseAtIndex(index)), CanBubble::Yes, IsCancelable::Yes, IsComposed::Yes, event.timestamp().approximateMonotonicTime(), WTFMove(view), 0, event.touchLocationAtIndex(index), event.touchLocationAtIndex(index), { }, event.modifiers(), 0, 0, nullptr, 0, 0, nullptr, IsSimulated::No, IsTrusted::Yes)); >+ return adoptRef(*new MouseEvent(mouseEventType(event.touchPhaseAtIndex(index)), CanBubble::Yes, cancelable, IsComposed::Yes, event.timestamp().approximateMonotonicTime(), WTFMove(view), 0, event.touchLocationAtIndex(index), event.touchLocationAtIndex(index), { }, event.modifiers(), 0, 0, nullptr, 0, 0, nullptr, IsSimulated::No, IsTrusted::Yes)); > } > > } // namespace WebCore >Index: Source/WebCore/page/Quirks.cpp >=================================================================== >--- Source/WebCore/page/Quirks.cpp (revision 247090) >+++ Source/WebCore/page/Quirks.cpp (working copy) >@@ -284,18 +284,25 @@ bool Quirks::shouldDispatchSimulatedMous > return false; > } > >-bool Quirks::shouldDispatchSimulatedMouseEventsOnTarget(EventTarget* target) const >+Optional<Event::IsCancelable> Quirks::simulatedMouseEventTypeForTarget(EventTarget* target) const > { > if (!needsQuirks() || !shouldDispatchSimulatedMouseEvents()) >- return false; >+ return { }; > > // On Google Maps, we want to limit simulated mouse events to dragging the little man that allows entering into Street View. > auto& url = m_document->topDocument().url(); > auto host = url.host(); >- if (equalLettersIgnoringASCIICase(host, "www.google.com") && url.path().startsWithIgnoringASCIICase("/maps/")) >- return is<Element>(target) && downcast<Element>(target)->getAttribute("class") == "widget-expand-button-pegman-icon"; >- return true; >-} >+ if (equalLettersIgnoringASCIICase(host, "www.google.com") && url.path().startsWithIgnoringASCIICase("/maps/")) { >+ if (is<Element>(target) && downcast<Element>(target)->getAttribute("class") == "widget-expand-button-pegman-icon") >+ return Event::IsCancelable::Yes; >+ return { }; >+ } >+ >+ if (equalLettersIgnoringASCIICase(host, "desmos.com") || host.endsWithIgnoringASCIICase(".desmos.com")) >+ return Event::IsCancelable::No; >+ >+ return Event::IsCancelable::Yes; >+} > #endif > > bool Quirks::shouldAvoidResizingWhenInputViewBoundsChange() const >Index: Source/WebCore/page/Quirks.h >=================================================================== >--- Source/WebCore/page/Quirks.h (revision 247090) >+++ Source/WebCore/page/Quirks.h (working copy) >@@ -25,6 +25,7 @@ > > #pragma once > >+#include "Event.h" > #include <wtf/WeakPtr.h> > > namespace WebCore { >@@ -51,7 +52,7 @@ public: > bool hasBrokenEncryptedMediaAPISupportQuirk() const; > #if ENABLE(TOUCH_EVENTS) > bool shouldDispatchSimulatedMouseEvents() const; >- bool shouldDispatchSimulatedMouseEventsOnTarget(EventTarget*) const; >+ Optional<Event::IsCancelable> simulatedMouseEventTypeForTarget(EventTarget*) const; > #endif > bool shouldDisablePointerEventsQuirk() const; > bool needsInputModeNoneImplicitly(const HTMLElement&) const;
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 199508
: 373480