WebKit Bugzilla
Attachment 360511 Details for
Bug 193991
: [Mac] Update window scale API usage
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
proposed fix
scaleSPI.txt (text/plain), 3.28 KB, created by
Alexey Proskuryakov
on 2019-01-29 15:29:33 PST
(
hide
)
Description:
proposed fix
Filename:
MIME Type:
Creator:
Alexey Proskuryakov
Created:
2019-01-29 15:29:33 PST
Size:
3.28 KB
patch
obsolete
>Index: Tools/ChangeLog >=================================================================== >--- Tools/ChangeLog (revision 240686) >+++ Tools/ChangeLog (working copy) >@@ -1,3 +1,17 @@ >+2019-01-29 Alexey Proskuryakov <ap@apple.com> >+ >+ [Mac] Update window scale API usage >+ https://bugs.webkit.org/show_bug.cgi?id=193991 >+ rdar://problem/47614795 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * DumpRenderTree/mac/DumpRenderTree.mm: >+ (changeWindowScaleIfNeeded): >+ * DumpRenderTree/mac/DumpRenderTreeWindow.h: >+ * WebKitTestRunner/mac/PlatformWebViewMac.mm: >+ (WTR::PlatformWebView::changeWindowScaleIfNeeded): >+ > 2019-01-29 Aakash Jain <aakash_jain@apple.com> > > [ews-build] Add build step to print bot Configuration >Index: Tools/DumpRenderTree/mac/DumpRenderTree.mm >=================================================================== >--- Tools/DumpRenderTree/mac/DumpRenderTree.mm (revision 240684) >+++ Tools/DumpRenderTree/mac/DumpRenderTree.mm (working copy) >@@ -1619,7 +1619,11 @@ static void changeWindowScaleIfNeeded(co > return; > // When the new scale factor is set on the window first, WebView doesn't see it as a new scale and stops propagating the behavior change to WebCore::Page. > gTestRunner->setBackingScaleFactor(requiredScaleFactor); >- [[[mainFrame webView] window] _setWindowResolution:requiredScaleFactor displayIfChanged:YES]; >+ NSWindow *window = [[mainFrame webView] window]; >+ if ([window respondsToSelector:@selector(_setWindowResolution:)]) >+ [window _setWindowResolution:requiredScaleFactor]; >+ else >+ [window _setWindowResolution:requiredScaleFactor displayIfChanged:YES]; > } > #endif > >Index: Tools/DumpRenderTree/mac/DumpRenderTreeWindow.h >=================================================================== >--- Tools/DumpRenderTree/mac/DumpRenderTreeWindow.h (revision 240684) >+++ Tools/DumpRenderTree/mac/DumpRenderTreeWindow.h (working copy) >@@ -39,6 +39,9 @@ > > @interface NSWindow (Details) > >+- (void)_setWindowResolution:(CGFloat)resolution; >+ >+// FIXME: Remove once the variant above exists on all platforms we need (cf. rdar://problem/47614795). > - (void)_setWindowResolution:(CGFloat)resolution displayIfChanged:(BOOL)displayIfChanged; > > @end >Index: Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm >=================================================================== >--- Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm (revision 240684) >+++ Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm (working copy) >@@ -52,6 +52,8 @@ enum { > > // FIXME: Move to NSWindowSPI.h. > @interface NSWindow () >+- (void)_setWindowResolution:(CGFloat)resolution; >+// FIXME: Remove once the variant above exists on all platforms we need (cf. rdar://problem/47614795). > - (void)_setWindowResolution:(CGFloat)resolution displayIfChanged:(BOOL)displayIfChanged; > @end > >@@ -238,7 +240,10 @@ void PlatformWebView::changeWindowScaleI > if (currentScale == newScale) > return; > >- [m_window _setWindowResolution:newScale displayIfChanged:YES]; >+ if ([m_window respondsToSelector:@selector(_setWindowResolution:)]) >+ [m_window _setWindowResolution:newScale]; >+ else >+ [m_window _setWindowResolution:newScale displayIfChanged:YES]; > #if WK_API_ENABLED > [m_view _setOverrideDeviceScaleFactor:newScale]; > #endif
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 193991
: 360511