Diff
Modified: trunk/LayoutTests/ChangeLog (252356 => 252357)
--- trunk/LayoutTests/ChangeLog 2019-11-12 08:12:40 UTC (rev 252356)
+++ trunk/LayoutTests/ChangeLog 2019-11-12 08:26:33 UTC (rev 252357)
@@ -1,3 +1,18 @@
+2019-11-12 Fujii Hironori <[email protected]>
+
+ [Win] UIScriptController::zoomToScale not implemented
+ https://bugs.webkit.org/show_bug.cgi?id=180424
+
+ Reviewed by Alex Christensen.
+
+ * platform/win/TestExpectations:
+ * platform/wincairo/TestExpectations:
+ Unmarked skipped tests for webkit.org/b/180424.
+ Marked fast/visual-viewport/client-coordinates-relative-to-layout-viewport.html,
+ fast/visual-viewport/client-rects-relative-to-layout-viewport.html
+ and fast/visual-viewport/zoomed-fixed-scroll-down-then-up.html as
+ Failure.
+
2019-11-11 Ryosuke Niwa <[email protected]>
iOS: fast/scrolling/ios/scrollTo-at-page-load.html is flaky
Modified: trunk/LayoutTests/platform/win/TestExpectations (252356 => 252357)
--- trunk/LayoutTests/platform/win/TestExpectations 2019-11-12 08:12:40 UTC (rev 252356)
+++ trunk/LayoutTests/platform/win/TestExpectations 2019-11-12 08:26:33 UTC (rev 252357)
@@ -224,10 +224,6 @@
fast/events/autoscroll-with-software-keyboard.html [ Skip ]
fast/events/autoscroll-when-input-is-offscreen.html [ Skip ]
-# UIScriptController::zoomToScale is not supported.
-fast/visual-viewport/client-coordinates-relative-to-layout-viewport.html [ Skip ]
-fast/visual-viewport/client-rects-relative-to-layout-viewport.html [ Skip ]
-
# UIScriptController::removeViewFromWindow/addViewToWindow is not supported.
pageoverlay/overlay-remove-reinsert-view.html [ Skip ]
@@ -691,21 +687,8 @@
http/wpt/webauthn/ [ Skip ]
imported/w3c/web-platform-tests/credential-management/ [ Skip ]
-# UIScriptController::zoomToScale is not implemented on Windows.
-webkit.org/b/180424 fast/visual-viewport/resize-event-fired.html [ Skip ]
-webkit.org/b/180424 fast/visual-viewport/rtl-zoomed-rects.html [ Skip ]
-webkit.org/b/180424 fast/visual-viewport/scroll-event-fired.html [ Skip ]
-webkit.org/b/180424 fast/visual-viewport/viewport-dimensions-exclude-custom-scrollbars.html [ Skip ]
-webkit.org/b/180424 fast/visual-viewport/viewport-dimensions-exclude-scrollbars.html [ Skip ]
-webkit.org/b/180424 fast/visual-viewport/viewport-dimensions-iframe.html [ Skip ]
-webkit.org/b/180424 fast/visual-viewport/viewport-dimensions-under-page-zoom.html [ Skip ]
-webkit.org/b/180424 fast/visual-viewport/viewport-dimensions.html [ Skip ]
-webkit.org/b/180424 fast/visual-viewport/zoomed-fixed-header-and-footer.html [ Skip ]
-webkit.org/b/180424 fast/visual-viewport/zoomed-fixed-scroll-down-then-up.html [ Skip ]
-webkit.org/b/180424 fast/visual-viewport/zoomed-fixed.html [ Skip ]
-webkit.org/b/180424 fast/visual-viewport/zoomed-rects.html [ Skip ]
-webkit.org/b/180424 fast/zooming/client-rect-in-fixed-zoomed.html [ Skip ]
-webkit.org/b/180424 fast/zooming/uiscript-zooming.html [ Skip ]
+fast/visual-viewport/client-coordinates-relative-to-layout-viewport.html [ Failure ]
+fast/visual-viewport/zoomed-fixed-scroll-down-then-up.html [ Failure ]
################################################################################
########### End Missing Functionality Prevents Testing ##############
Modified: trunk/LayoutTests/platform/wincairo/TestExpectations (252356 => 252357)
--- trunk/LayoutTests/platform/wincairo/TestExpectations 2019-11-12 08:12:40 UTC (rev 252356)
+++ trunk/LayoutTests/platform/wincairo/TestExpectations 2019-11-12 08:26:33 UTC (rev 252357)
@@ -530,21 +530,8 @@
streams/reference-implementation/writable-stream.html [ Failure ]
streams/shadowing-Promise.html [ Failure ]
-# UIScriptController::zoomToScale() is not implemented.
-webkit.org/b/180424 fast/visual-viewport/resize-event-fired.html [ Skip ]
-webkit.org/b/180424 fast/visual-viewport/rtl-zoomed-rects.html [ Skip ]
-webkit.org/b/180424 fast/visual-viewport/scroll-event-fired.html [ Skip ]
-webkit.org/b/180424 fast/visual-viewport/viewport-dimensions-exclude-custom-scrollbars.html [ Skip ]
-webkit.org/b/180424 fast/visual-viewport/viewport-dimensions-exclude-scrollbars.html [ Skip ]
-webkit.org/b/180424 fast/visual-viewport/viewport-dimensions-iframe.html [ Skip ]
-webkit.org/b/180424 fast/visual-viewport/viewport-dimensions-under-page-zoom.html [ Skip ]
-webkit.org/b/180424 fast/visual-viewport/viewport-dimensions.html [ Skip ]
-webkit.org/b/180424 fast/visual-viewport/zoomed-fixed-header-and-footer.html [ Skip ]
-webkit.org/b/180424 fast/visual-viewport/zoomed-fixed-scroll-down-then-up.html [ Skip ]
-webkit.org/b/180424 fast/visual-viewport/zoomed-fixed.html [ Skip ]
-webkit.org/b/180424 fast/visual-viewport/zoomed-rects.html [ Skip ]
-webkit.org/b/180424 fast/zooming/client-rect-in-fixed-zoomed.html [ Skip ]
-webkit.org/b/180424 fast/zooming/uiscript-zooming.html [ Skip ]
+fast/visual-viewport/client-rects-relative-to-layout-viewport.html [ Failure ]
+fast/visual-viewport/zoomed-fixed-scroll-down-then-up.html [ Failure ]
# eventSender.scheduleAsynchronousClick is not a function.
fast/events/popup-blocking-click-in-iframe.html [ Skip ]
@@ -1554,7 +1541,6 @@
fast/text [ Skip ]
fast/tokenizer [ Skip ]
fast/transforms [ Skip ]
-fast/visual-viewport [ Skip ]
fast/workers/worker-exception-during-navigation.html [ Pass Failure ]
fast/writing-mode [ Skip ]
fast/xmlhttprequest [ Skip ]
Modified: trunk/Tools/ChangeLog (252356 => 252357)
--- trunk/Tools/ChangeLog 2019-11-12 08:12:40 UTC (rev 252356)
+++ trunk/Tools/ChangeLog 2019-11-12 08:26:33 UTC (rev 252357)
@@ -1,3 +1,28 @@
+2019-11-12 Fujii Hironori <[email protected]>
+
+ [Win] UIScriptController::zoomToScale not implemented
+ https://bugs.webkit.org/show_bug.cgi?id=180424
+
+ Reviewed by Alex Christensen.
+
+ * DumpRenderTree/PlatformWin.cmake:
+ * DumpRenderTree/win/UIScriptControllerWin.cpp: Added.
+ (WTR::UIScriptController::create):
+ (WTR::UIScriptControllerWin::doAsyncTask):
+ (WTR::UIScriptControllerWin::zoomToScale):
+ (WTR::UIScriptControllerWin::zoomScale const):
+ * DumpRenderTree/win/UIScriptControllerWin.h: Added.
+ (WTR::UIScriptControllerWin::UIScriptControllerWin):
+ * TestRunnerShared/UIScriptContext/UIScriptController.cpp:
+ * WebKitTestRunner/PlatformWin.cmake:
+ * WebKitTestRunner/win/UIScriptControllerWin.cpp: Added.
+ (WTR::UIScriptController::create):
+ (WTR::UIScriptControllerWin::doAsyncTask):
+ (WTR::UIScriptControllerWin::zoomToScale):
+ (WTR::UIScriptControllerWin::zoomScale const):
+ * WebKitTestRunner/win/UIScriptControllerWin.h: Added.
+ (WTR::UIScriptControllerWin::UIScriptControllerWin):
+
2019-11-12 Carlos Garcia Campos <[email protected]>
[GTK] WebDriver: implement new window command
Modified: trunk/Tools/DumpRenderTree/PlatformWin.cmake (252356 => 252357)
--- trunk/Tools/DumpRenderTree/PlatformWin.cmake 2019-11-12 08:12:40 UTC (rev 252356)
+++ trunk/Tools/DumpRenderTree/PlatformWin.cmake 2019-11-12 08:26:33 UTC (rev 252357)
@@ -21,6 +21,7 @@
win/TextInputController.cpp
win/TextInputControllerWin.cpp
win/UIDelegate.cpp
+ win/UIScriptControllerWin.cpp
win/WorkQueueItemWin.cpp
)
Added: trunk/Tools/DumpRenderTree/win/UIScriptControllerWin.cpp (0 => 252357)
--- trunk/Tools/DumpRenderTree/win/UIScriptControllerWin.cpp (rev 0)
+++ trunk/Tools/DumpRenderTree/win/UIScriptControllerWin.cpp 2019-11-12 08:26:33 UTC (rev 252357)
@@ -0,0 +1,73 @@
+/*
+ * Copyright (C) 2019 Sony Interactive Entertainment Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "UIScriptControllerWin.h"
+
+#include "DumpRenderTreeWin.h"
+#include "UIScriptContext.h"
+#include <WebCore/COMPtr.h>
+#include <WebKitLegacy/WebKit.h>
+
+namespace WTR {
+
+Ref<UIScriptController> UIScriptController::create(UIScriptContext& context)
+{
+ return adoptRef(*new UIScriptControllerWin(context));
+}
+
+void UIScriptControllerWin::doAsyncTask(JSValueRef callback)
+{
+ unsigned callbackID = m_context->prepareForAsyncTask(callback, CallbackTypeNonPersistent);
+
+ callOnMainThread([this, protectedThis = makeRef(*this), callbackID ] {
+ if (!m_context)
+ return;
+ m_context->asyncTaskComplete(callbackID);
+ });
+}
+
+void UIScriptControllerWin::zoomToScale(double scale, JSValueRef callback)
+{
+ doAsyncTask(callback);
+
+ COMPtr<IWebView> webView;
+ if (FAILED(frame->webView(&webView)))
+ return;
+
+ COMPtr<IWebViewPrivate2> webView2(Query, webView);
+ if (!webView2)
+ return;
+
+ webView2->scaleWebView(scale, { 0, 0 });
+}
+
+double UIScriptControllerWin::zoomScale() const
+{
+ // No API to get the page scale factor
+ return 1;
+}
+
+}
Added: trunk/Tools/DumpRenderTree/win/UIScriptControllerWin.h (0 => 252357)
--- trunk/Tools/DumpRenderTree/win/UIScriptControllerWin.h (rev 0)
+++ trunk/Tools/DumpRenderTree/win/UIScriptControllerWin.h 2019-11-12 08:26:33 UTC (rev 252357)
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2019 Sony Interactive Entertainment Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "UIScriptController.h"
+
+namespace WTR {
+
+class UIScriptControllerWin : public UIScriptController {
+public:
+ explicit UIScriptControllerWin(UIScriptContext& context)
+ : UIScriptController(context)
+ {
+ }
+
+ void doAsyncTask(JSValueRef) override;
+ void zoomToScale(double, JSValueRef) override;
+ double zoomScale() const override;
+};
+
+}
Modified: trunk/Tools/TestRunnerShared/UIScriptContext/UIScriptController.cpp (252356 => 252357)
--- trunk/Tools/TestRunnerShared/UIScriptContext/UIScriptController.cpp 2019-11-12 08:12:40 UTC (rev 252356)
+++ trunk/Tools/TestRunnerShared/UIScriptContext/UIScriptController.cpp 2019-11-12 08:26:33 UTC (rev 252357)
@@ -58,7 +58,7 @@
return nullptr;
}
-#if !PLATFORM(GTK) && !PLATFORM(COCOA)
+#if !PLATFORM(GTK) && !PLATFORM(COCOA) && !PLATFORM(WIN)
Ref<UIScriptController> UIScriptController::create(UIScriptContext& context)
{
return adoptRef(*new UIScriptController(context));
Modified: trunk/Tools/WebKitTestRunner/PlatformWin.cmake (252356 => 252357)
--- trunk/Tools/WebKitTestRunner/PlatformWin.cmake 2019-11-12 08:12:40 UTC (rev 252356)
+++ trunk/Tools/WebKitTestRunner/PlatformWin.cmake 2019-11-12 08:26:33 UTC (rev 252357)
@@ -4,6 +4,7 @@
win/EventSenderProxyWin.cpp
win/PlatformWebViewWin.cpp
win/TestControllerWin.cpp
+ win/UIScriptControllerWin.cpp
win/main.cpp
)
Added: trunk/Tools/WebKitTestRunner/win/UIScriptControllerWin.cpp (0 => 252357)
--- trunk/Tools/WebKitTestRunner/win/UIScriptControllerWin.cpp (rev 0)
+++ trunk/Tools/WebKitTestRunner/win/UIScriptControllerWin.cpp 2019-11-12 08:26:33 UTC (rev 252357)
@@ -0,0 +1,64 @@
+/*
+ * Copyright (C) 2019 Sony Interactive Entertainment Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "UIScriptControllerWin.h"
+
+#include "PlatformWebView.h"
+#include "TestController.h"
+#include "UIScriptContext.h"
+
+namespace WTR {
+
+Ref<UIScriptController> UIScriptController::create(UIScriptContext& context)
+{
+ return adoptRef(*new UIScriptControllerWin(context));
+}
+
+void UIScriptControllerWin::doAsyncTask(JSValueRef callback)
+{
+ unsigned callbackID = m_context->prepareForAsyncTask(callback, CallbackTypeNonPersistent);
+
+ callOnMainThread([this, protectedThis = makeRef(*this), callbackID ] {
+ if (!m_context)
+ return;
+ m_context->asyncTaskComplete(callbackID);
+ });
+}
+
+void UIScriptControllerWin::zoomToScale(double scale, JSValueRef callback)
+{
+ auto page = TestController::singleton().mainWebView()->page();
+ WKPageSetScaleFactor(page, scale, WKPointMake(0, 0));
+ doAsyncTask(callback);
+}
+
+double UIScriptControllerWin::zoomScale() const
+{
+ auto page = TestController::singleton().mainWebView()->page();
+ return WKPageGetScaleFactor(page);
+}
+
+} // namespace WTR
Added: trunk/Tools/WebKitTestRunner/win/UIScriptControllerWin.h (0 => 252357)
--- trunk/Tools/WebKitTestRunner/win/UIScriptControllerWin.h (rev 0)
+++ trunk/Tools/WebKitTestRunner/win/UIScriptControllerWin.h 2019-11-12 08:26:33 UTC (rev 252357)
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2019 Sony Interactive Entertainment Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "PlatformWebView.h"
+#include "TestController.h"
+#include "UIScriptController.h"
+
+namespace WTR {
+
+class UIScriptControllerWin : public UIScriptController {
+public:
+ explicit UIScriptControllerWin(UIScriptContext& context)
+ : UIScriptController(context)
+ {
+ }
+
+ void doAsyncTask(JSValueRef) override;
+ void zoomToScale(double, JSValueRef) override;
+ double zoomScale() const override;
+};
+
+} // namespace WTR