Diff
Modified: trunk/Source/WebKit/ChangeLog (249061 => 249062)
--- trunk/Source/WebKit/ChangeLog 2019-08-23 19:25:31 UTC (rev 249061)
+++ trunk/Source/WebKit/ChangeLog 2019-08-23 19:35:02 UTC (rev 249062)
@@ -1,3 +1,25 @@
+2019-08-23 Brian Burg <bb...@apple.com>
+
+ REGRESSION(r248713): WebDriver commands which target the implicit main frame now hit an ASSERT
+ https://bugs.webkit.org/show_bug.cgi?id=200793
+ <rdar://problem/54516988>
+
+ Reviewed by Chris Dumez.
+
+ SimulatedInputDispatcher and its callers need to support Optional<FrameIdentifier>
+ and WTF::nullopt as an encoding for the implicit main frame.
+
+ * UIProcess/Automation/SimulatedInputDispatcher.h:
+ * UIProcess/Automation/SimulatedInputDispatcher.cpp:
+ (WebKit::SimulatedInputDispatcher::resolveLocation):
+ (WebKit::SimulatedInputDispatcher::run):
+
+ * UIProcess/Automation/WebAutomationSession.h:
+ * UIProcess/Automation/WebAutomationSession.cpp:
+ (WebKit::WebAutomationSession::viewportInViewCenterPointOfElement):
+ (WebKit::WebAutomationSession::performInteractionSequence):
+ (WebKit::WebAutomationSession::cancelInteractionSequence):
+
2019-08-20 Jiewen Tan <jiewen_...@apple.com>
[WebAuthn] Support NFC authenticators for iOS
Modified: trunk/Source/WebKit/UIProcess/Automation/SimulatedInputDispatcher.cpp (249061 => 249062)
--- trunk/Source/WebKit/UIProcess/Automation/SimulatedInputDispatcher.cpp 2019-08-23 19:25:31 UTC (rev 249061)
+++ trunk/Source/WebKit/UIProcess/Automation/SimulatedInputDispatcher.cpp 2019-08-23 19:35:02 UTC (rev 249062)
@@ -216,7 +216,7 @@
break;
}
case MouseMoveOrigin::Element: {
- m_client.viewportInViewCenterPointOfElement(m_page, m_frameID.value(), nodeHandle.value(), [destination = location.value(), completionHandler = WTFMove(completionHandler)](Optional<WebCore::IntPoint> inViewCenterPoint, Optional<AutomationCommandError> error) mutable {
+ m_client.viewportInViewCenterPointOfElement(m_page, m_frameID, nodeHandle.value(), [destination = location.value(), completionHandler = WTFMove(completionHandler)](Optional<WebCore::IntPoint> inViewCenterPoint, Optional<AutomationCommandError> error) mutable {
if (error) {
completionHandler(WTF::nullopt, error);
return;
@@ -382,7 +382,7 @@
}
}
-void SimulatedInputDispatcher::run(WebCore::FrameIdentifier frameID, Vector<SimulatedInputKeyFrame>&& keyFrames, HashSet<Ref<SimulatedInputSource>>& inputSources, AutomationCompletionHandler&& completionHandler)
+void SimulatedInputDispatcher::run(Optional<WebCore::FrameIdentifier> frameID, Vector<SimulatedInputKeyFrame>&& keyFrames, HashSet<Ref<SimulatedInputSource>>& inputSources, AutomationCompletionHandler&& completionHandler)
{
ASSERT(!isActive());
if (isActive()) {
Modified: trunk/Source/WebKit/UIProcess/Automation/SimulatedInputDispatcher.h (249061 => 249062)
--- trunk/Source/WebKit/UIProcess/Automation/SimulatedInputDispatcher.h 2019-08-23 19:25:31 UTC (rev 249061)
+++ trunk/Source/WebKit/UIProcess/Automation/SimulatedInputDispatcher.h 2019-08-23 19:35:02 UTC (rev 249062)
@@ -134,7 +134,7 @@
#if ENABLE(WEBDRIVER_KEYBOARD_INTERACTIONS)
virtual void simulateKeyboardInteraction(WebPageProxy&, KeyboardInteraction, WTF::Variant<VirtualKey, CharKey>&&, AutomationCompletionHandler&&) = 0;
#endif
- virtual void viewportInViewCenterPointOfElement(WebPageProxy&, WebCore::FrameIdentifier, const String& nodeHandle, Function<void (Optional<WebCore::IntPoint>, Optional<AutomationCommandError>)>&&) = 0;
+ virtual void viewportInViewCenterPointOfElement(WebPageProxy&, Optional<WebCore::FrameIdentifier>, const String& nodeHandle, Function<void (Optional<WebCore::IntPoint>, Optional<AutomationCommandError>)>&&) = 0;
};
static Ref<SimulatedInputDispatcher> create(WebPageProxy& page, SimulatedInputDispatcher::Client& client)
@@ -144,7 +144,7 @@
~SimulatedInputDispatcher();
- void run(WebCore::FrameIdentifier, Vector<SimulatedInputKeyFrame>&& keyFrames, HashSet<Ref<SimulatedInputSource>>& inputSources, AutomationCompletionHandler&&);
+ void run(Optional<WebCore::FrameIdentifier>, Vector<SimulatedInputKeyFrame>&& keyFrames, HashSet<Ref<SimulatedInputSource>>& inputSources, AutomationCompletionHandler&&);
void cancel();
bool isActive() const;
Modified: trunk/Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp (249061 => 249062)
--- trunk/Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp 2019-08-23 19:25:31 UTC (rev 249061)
+++ trunk/Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp 2019-08-23 19:35:02 UTC (rev 249062)
@@ -1462,7 +1462,7 @@
}
// MARK: SimulatedInputDispatcher::Client API
-void WebAutomationSession::viewportInViewCenterPointOfElement(WebPageProxy& page, FrameIdentifier frameID, const String& nodeHandle, Function<void (Optional<WebCore::IntPoint>, Optional<AutomationCommandError>)>&& completionHandler)
+void WebAutomationSession::viewportInViewCenterPointOfElement(WebPageProxy& page, Optional<FrameIdentifier> frameID, const String& nodeHandle, Function<void (Optional<WebCore::IntPoint>, Optional<AutomationCommandError>)>&& completionHandler)
{
WTF::CompletionHandler<void(Optional<String>, WebCore::IntRect, Optional<WebCore::IntPoint>, bool)> didComputeElementLayoutHandler = [completionHandler = WTFMove(completionHandler)](Optional<String> errorType, WebCore::IntRect, Optional<WebCore::IntPoint> inViewCenterPoint, bool) mutable {
if (errorType) {
@@ -1922,7 +1922,7 @@
}
// Delegate the rest of ยง17.4 Dispatching Actions to the dispatcher.
- inputDispatcher.run(frameID.value(), WTFMove(keyFrames), m_inputSources, [protectedThis = makeRef(*this), callback = WTFMove(callback)](Optional<AutomationCommandError> error) {
+ inputDispatcher.run(frameID, WTFMove(keyFrames), m_inputSources, [protectedThis = makeRef(*this), callback = WTFMove(callback)](Optional<AutomationCommandError> error) {
if (error)
callback->sendFailure(error.value().toProtocolString());
else
@@ -1951,7 +1951,7 @@
SimulatedInputDispatcher& inputDispatcher = inputDispatcherForPage(*page);
inputDispatcher.cancel();
- inputDispatcher.run(frameID.value(), WTFMove(keyFrames), m_inputSources, [protectedThis = makeRef(*this), callback = WTFMove(callback)](Optional<AutomationCommandError> error) {
+ inputDispatcher.run(frameID, WTFMove(keyFrames), m_inputSources, [protectedThis = makeRef(*this), callback = WTFMove(callback)](Optional<AutomationCommandError> error) {
if (error)
callback->sendFailure(error.value().toProtocolString());
else
Modified: trunk/Source/WebKit/UIProcess/Automation/WebAutomationSession.h (249061 => 249062)
--- trunk/Source/WebKit/UIProcess/Automation/WebAutomationSession.h 2019-08-23 19:25:31 UTC (rev 249061)
+++ trunk/Source/WebKit/UIProcess/Automation/WebAutomationSession.h 2019-08-23 19:35:02 UTC (rev 249062)
@@ -153,7 +153,7 @@
#if ENABLE(WEBDRIVER_KEYBOARD_INTERACTIONS)
void simulateKeyboardInteraction(WebPageProxy&, KeyboardInteraction, WTF::Variant<VirtualKey, CharKey>&&, AutomationCompletionHandler&&) final;
#endif
- void viewportInViewCenterPointOfElement(WebPageProxy&, WebCore::FrameIdentifier, const String& nodeHandle, Function<void (Optional<WebCore::IntPoint>, Optional<AutomationCommandError>)>&&) final;
+ void viewportInViewCenterPointOfElement(WebPageProxy&, Optional<WebCore::FrameIdentifier>, const String& nodeHandle, Function<void (Optional<WebCore::IntPoint>, Optional<AutomationCommandError>)>&&) final;
#endif // ENABLE(WEBDRIVER_ACTIONS_API)