WebKit Bugzilla
Attachment 368442 Details for
Bug 197361
: Crash when running test wpt/tests/element_click/bubbling.py::test_element_disappears_during_click
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-197361-20190428225038.patch (text/plain), 3.91 KB, created by
Devin Rousso
on 2019-04-28 22:50:39 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Devin Rousso
Created:
2019-04-28 22:50:39 PDT
Size:
3.91 KB
patch
obsolete
>diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 3433e25307281486aca95a901ae873c894eb6e03..99a9f9e663b011259695a6fb20c89dbf5827210e 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,20 @@ >+2019-04-28 Devin Rousso <drousso@apple.com> >+ >+ Crash when running test wpt/tests/element_click/bubbling.py::test_element_disappears_during_click >+ https://bugs.webkit.org/show_bug.cgi?id=197361 >+ <rdar://problem/49861407> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Don't assume that all elements have client rects (e.g. `getClientRects`). If the container >+ element isn't visible, then the child won't be either. >+ >+ * UIProcess/Automation/SimulatedInputDispatcher.cpp: >+ (WebKit::SimulatedInputDispatcher::resolveLocation): >+ (WebKit::SimulatedInputDispatcher::transitionInputSourceToState): >+ * UIProcess/Automation/WebAutomationSession.cpp: >+ (WebKit::WebAutomationSession::viewportInViewCenterPointOfElement): >+ > 2019-04-27 Chris Dumez <cdumez@apple.com> > > Improve safety of MachMessage class >diff --git a/Source/WebKit/UIProcess/Automation/SimulatedInputDispatcher.cpp b/Source/WebKit/UIProcess/Automation/SimulatedInputDispatcher.cpp >index 35eb71954fdcc7ade2c06539252494a03e9b5e9a..26a74e9c6541b652faeda6f3ad45e69df2bfdf3f 100644 >--- a/Source/WebKit/UIProcess/Automation/SimulatedInputDispatcher.cpp >+++ b/Source/WebKit/UIProcess/Automation/SimulatedInputDispatcher.cpp >@@ -222,7 +222,11 @@ void SimulatedInputDispatcher::resolveLocation(const WebCore::IntPoint& currentL > return; > } > >- ASSERT(inViewCenterPoint); >+ if (!inViewCenterPoint) { >+ completionHandler(WTF::nullopt, AUTOMATION_COMMAND_ERROR_WITH_NAME(ElementNotInteractable)); >+ return; >+ } >+ > destination.moveBy(inViewCenterPoint.value()); > completionHandler(destination, WTF::nullopt); > }); >@@ -269,7 +273,12 @@ void SimulatedInputDispatcher::transitionInputSourceToState(SimulatedInputSource > eventDispatchFinished(error); > return; > } >- RELEASE_ASSERT(location); >+ >+ if (!location) { >+ eventDispatchFinished(AUTOMATION_COMMAND_ERROR_WITH_NAME(ElementNotInteractable)); >+ return; >+ } >+ > b.location = location; > // The "dispatch a pointer{Down,Up,Move} action" algorithms (§17.4 Dispatching Actions). > if (!a.pressedMouseButton && b.pressedMouseButton) { >@@ -303,7 +312,12 @@ void SimulatedInputDispatcher::transitionInputSourceToState(SimulatedInputSource > eventDispatchFinished(error); > return; > } >- RELEASE_ASSERT(location); >+ >+ if (!location) { >+ eventDispatchFinished(AUTOMATION_COMMAND_ERROR_WITH_NAME(ElementNotInteractable)); >+ return; >+ } >+ > b.location = location; > // The "dispatch a pointer{Down,Up,Move} action" algorithms (§17.4 Dispatching Actions). > if (!a.pressedMouseButton && b.pressedMouseButton) { >diff --git a/Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp b/Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp >index ac745a6020ca3013afb8253e28c47569233f1ad9..9850f0ad4d745dce12a27d609bcfb91b1f895bf1 100644 >--- a/Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp >+++ b/Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp >@@ -1461,7 +1461,11 @@ void WebAutomationSession::viewportInViewCenterPointOfElement(WebPageProxy& page > return; > } > >- ASSERT(inViewCenterPoint); >+ if (!inViewCenterPoint) { >+ completionHandler(WTF::nullopt, AUTOMATION_COMMAND_ERROR_WITH_NAME(ElementNotInteractable)); >+ return; >+ } >+ > completionHandler(inViewCenterPoint, WTF::nullopt); > }; >
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 197361
: 368442