Changeset 248696 in webkit
- Timestamp:
- Aug 14, 2019 4:57:06 PM (5 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r248692 r248696 1 2019-08-14 Brian Burg <bburg@apple.com> 2 3 REGRESSION(r245320): Web Automation: Perform Actions hangs when pointerdown happens near top of page 4 https://bugs.webkit.org/show_bug.cgi?id=200728 5 <rdar://problem/54260518> 6 7 Reviewed by Devin Rousso. 8 9 In the last major refactoring for this code, it seems that the argument to 10 platformSimulateMouseInteraction was not unified to use viewport coordinates 11 in all code paths. This patch fixes both callers to *not* add in topContentInset, 12 and instead this is added back in when doing platform-specific event simulation. 13 14 This has no effect on iOS since it's guarded by ENABLE(WEBDRIVER_MOUSE_INTERACTIONS), 15 which is only built on macOS. 16 17 * UIProcess/Automation/WebAutomationSession.h: 18 * UIProcess/Automation/WebAutomationSession.cpp: 19 (WebKit::WebAutomationSession::performMouseInteraction): 20 * UIProcess/Automation/mac/WebAutomationSessionMac.mm: 21 (WebKit::WebAutomationSession::platformSimulateMouseInteraction): 22 1 23 2019-08-14 Andy Estes <aestes@apple.com> 2 24 -
trunk/Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp
r247058 r248696 1627 1627 1628 1628 x = std::min(std::max(0.0f, x), windowFrame.size().width()); 1629 y = std::min(std::max(0.0f, y + page->topContentInset()), windowFrame.size().height());1630 1631 WebCore::IntPoint positionInView= WebCore::IntPoint(static_cast<int>(x), static_cast<int>(y));1629 y = std::min(std::max(0.0f, y), windowFrame.size().height()); 1630 1631 WebCore::IntPoint locationInViewport = WebCore::IntPoint(static_cast<int>(x), static_cast<int>(y)); 1632 1632 1633 1633 auto parsedInteraction = Inspector::Protocol::AutomationHelpers::parseEnumValueFromString<Inspector::Protocol::Automation::MouseInteraction>(mouseInteractionString); … … 1655 1655 callbackInMap = WTFMove(mouseEventsFlushedCallback); 1656 1656 1657 platformSimulateMouseInteraction(page, parsedInteraction.value(), protocolMouseButtonToWebMouseEventButton(parsedButton.value()), positionInView, keyModifiers);1657 platformSimulateMouseInteraction(page, parsedInteraction.value(), protocolMouseButtonToWebMouseEventButton(parsedButton.value()), locationInViewport, keyModifiers); 1658 1658 1659 1659 // If the event location was previously clipped and does not hit test anything in the window, then it will not be processed. -
trunk/Source/WebKit/UIProcess/Automation/WebAutomationSession.h
r245796 r248696 245 245 // Platform-dependent implementations. 246 246 #if ENABLE(WEBDRIVER_MOUSE_INTERACTIONS) 247 void platformSimulateMouseInteraction(WebPageProxy&, MouseInteraction, WebMouseEvent::Button, const WebCore::IntPoint& locationInView , OptionSet<WebEvent::Modifier>);247 void platformSimulateMouseInteraction(WebPageProxy&, MouseInteraction, WebMouseEvent::Button, const WebCore::IntPoint& locationInViewport, OptionSet<WebEvent::Modifier>); 248 248 #endif 249 249 #if ENABLE(WEBDRIVER_TOUCH_INTERACTIONS) -
trunk/Source/WebKit/UIProcess/Automation/mac/WebAutomationSessionMac.mm
r241001 r248696 122 122 123 123 #if ENABLE(WEBDRIVER_MOUSE_INTERACTIONS) 124 void WebAutomationSession::platformSimulateMouseInteraction(WebPageProxy& page, MouseInteraction interaction, WebMouseEvent::Button button, const WebCore::IntPoint& locationInView , OptionSet<WebEvent::Modifier> keyModifiers)124 void WebAutomationSession::platformSimulateMouseInteraction(WebPageProxy& page, MouseInteraction interaction, WebMouseEvent::Button button, const WebCore::IntPoint& locationInViewport, OptionSet<WebEvent::Modifier> keyModifiers) 125 125 { 126 126 IntRect windowRect; 127 IntPoint locationInView = WebCore::IntPoint(locationInViewport.x(), locationInViewport.y() + page.topContentInset()); 127 128 page.rootViewToWindow(IntRect(locationInView, IntSize()), windowRect); 128 129 IntPoint locationInWindow = windowRect.location();
Note: See TracChangeset
for help on using the changeset viewer.