WebKit Bugzilla
Attachment 360323 Details for
Bug 193891
: [Win][WebKitTestRunner] Error: test and reference images have different sizes. Test image is 784x561, reference image is 800x600
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-193891-20190128164225.patch (text/plain), 4.20 KB, created by
Fujii Hironori
on 2019-01-27 23:42:27 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Fujii Hironori
Created:
2019-01-27 23:42:27 PST
Size:
4.20 KB
patch
obsolete
>Subversion Revision: 240558 >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 7f994b58c3f8462ae6237f1f0b977cdab2a01608..dcd65888206e69f3b57858f6a84d0b5a39c25640 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,29 @@ >+2019-01-27 Fujii Hironori <Hironori.Fujii@sony.com> >+ >+ [Win][WebKitTestRunner] Error: test and reference images have different sizes. Test image is 784x561, reference image is 800x600 >+ https://bugs.webkit.org/show_bug.cgi?id=193891 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ There were three problems in window sizes of WebView and the host window. >+ 1. The sizes of pixel image output were incorrect. >+ 2. The host window is going to appear after window.resize was invoked. >+ 3. window.resize resized only the host window, not WebView. >+ >+ This change solves them with a following approach. >+ a. PlatformWebView::PlatformWebView creates the initial host window as zero size. >+ b. Changes the host window style from WS_OVERLAPPEDWINDOW to WS_POPUP >+ as well as DumpRenderTree in order to match the client area and the window area. >+ c. PlatformWebView::resizeTo simply calls PlatformWebView::setWindowFrame as well as Mac port and GTK port. >+ d. PlatformWebView::setWindowFrame changes both window sizes. >+ e. PlatformWebView::setWindowFrame moves the host window to the out side of screen if m_options.shouldShowWebView. >+ >+ * WebKitTestRunner/win/PlatformWebViewWin.cpp: >+ (WTR::PlatformWebView::PlatformWebView): Create the host window >+ and WebView as zero size. Use WS_POPUP instead of WS_OVERLAPPEDWINDOW. >+ (WTR::PlatformWebView::resizeTo): Calls PlatformWebView::setWindowFrame. >+ (WTR::PlatformWebView::setWindowFrame): Change both window sizes. >+ > 2018-12-15 Darin Adler <darin@apple.com> > > Replace many uses of String::format with more type-safe alternatives >diff --git a/Tools/WebKitTestRunner/win/PlatformWebViewWin.cpp b/Tools/WebKitTestRunner/win/PlatformWebViewWin.cpp >index f80c26e5a648d7e7ac3e87d71565af63b56589ab..2c3c3fd8989850c5cdca57e54231dae6473e3a3b 100644 >--- a/Tools/WebKitTestRunner/win/PlatformWebViewWin.cpp >+++ b/Tools/WebKitTestRunner/win/PlatformWebViewWin.cpp >@@ -67,20 +67,20 @@ PlatformWebView::PlatformWebView(WKPageConfigurationRef configuration, const Tes > { > registerWindowClass(); > >- RECT viewRect = {0, 0, 800, 600}; > m_window = ::CreateWindowEx( > WS_EX_TOOLWINDOW, > hostWindowClassName, > testRunnerWindowName, >- WS_OVERLAPPEDWINDOW, >- -viewRect.right, >- -viewRect.bottom, >- viewRect.right, >- viewRect.bottom, >+ WS_POPUP, >+ CW_USEDEFAULT, >+ 0, >+ 0, >+ 0, > 0, > 0, > GetModuleHandle(0), > 0); >+ RECT viewRect = { }; > m_view = WKViewCreate(viewRect, configuration, m_window); > WKViewSetIsInWindow(m_view, true); > >@@ -95,14 +95,10 @@ PlatformWebView::~PlatformWebView() > > void PlatformWebView::resizeTo(unsigned width, unsigned height, WebViewSizingMode) > { >- ::SetWindowPos( >- WKViewGetWindow(m_view), >- 0, >- 0, >- 0, >- width, >- height, >- SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOCOPYBITS); >+ WKRect frame = { }; >+ frame.size.width = width; >+ frame.size.height = height; >+ setWindowFrame(frame); > } > > WKPageRef PlatformWebView::page() >@@ -132,14 +128,26 @@ WKRect PlatformWebView::windowFrame() > > void PlatformWebView::setWindowFrame(WKRect frame, WebViewSizingMode) > { >+ ::SetWindowPos( >+ WKViewGetWindow(m_view), >+ 0, >+ 0, >+ 0, >+ frame.size.width, >+ frame.size.height, >+ SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOCOPYBITS); >+ >+ UINT flags = SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOCOPYBITS; >+ if (m_options.shouldShowWebView) >+ flags |= SWP_NOMOVE; > ::SetWindowPos( > m_window, > 0, >- frame.origin.x, >- frame.origin.y, >+ -frame.size.width, >+ -frame.size.height, > frame.size.width, > frame.size.height, >- SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOCOPYBITS); >+ flags); > } > > void PlatformWebView::didInitializeClients()
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 193891
: 360323