⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 240700 in webkit


Ignore:
Timestamp:
Jan 29, 2019, 6:01:21 PM (8 years ago)
Author:
ap@apple.com
Message:

[Mac] Update window scale API usage
​https://bugs.webkit.org/show_bug.cgi?id=193991
rdar://problem/47614795

Reviewed by Tim Horton.

  • DumpRenderTree/mac/DumpRenderTree.mm:

(changeWindowScaleIfNeeded):

  • DumpRenderTree/mac/DumpRenderTreeWindow.h:
  • WebKitTestRunner/mac/PlatformWebViewMac.mm:

(WTR::PlatformWebView::changeWindowScaleIfNeeded):

Location:
trunk/Tools
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r240695 r240700  
     12019-01-29  Alexey Proskuryakov  <ap@apple.com>
     2
     3        [Mac] Update window scale API usage
     4        https://bugs.webkit.org/show_bug.cgi?id=193991
     5        rdar://problem/47614795
     6
     7        Reviewed by Tim Horton.
     8
     9        * DumpRenderTree/mac/DumpRenderTree.mm:
     10        (changeWindowScaleIfNeeded):
     11        * DumpRenderTree/mac/DumpRenderTreeWindow.h:
     12        * WebKitTestRunner/mac/PlatformWebViewMac.mm:
     13        (WTR::PlatformWebView::changeWindowScaleIfNeeded):
     14
    1152019-01-29  Chris Dumez  <cdumez@apple.com>
    216
  • trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm

    r240444 r240700  
    16201620    // 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.
    16211621    gTestRunner->setBackingScaleFactor(requiredScaleFactor);
    1622     [[[mainFrame webView] window] _setWindowResolution:requiredScaleFactor displayIfChanged:YES];
     1622    NSWindow *window = [[mainFrame webView] window];
     1623    if ([window respondsToSelector:@selector(_setWindowResolution:)])
     1624        [window _setWindowResolution:requiredScaleFactor];
     1625    else
     1626        [window _setWindowResolution:requiredScaleFactor displayIfChanged:YES];
    16231627}
    16241628#endif
  • trunk/Tools/DumpRenderTree/mac/DumpRenderTreeWindow.h

    r237266 r240700  
    4040@interface NSWindow (Details)
    4141
     42- (void)_setWindowResolution:(CGFloat)resolution;
     43
     44// FIXME: Remove once the variant above exists on all platforms we need (cf. rdar://problem/47614795).
    4245- (void)_setWindowResolution:(CGFloat)resolution displayIfChanged:(BOOL)displayIfChanged;
    4346
  • trunk/Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm

    r238939 r240700  
    5353// FIXME: Move to NSWindowSPI.h.
    5454@interface NSWindow ()
     55- (void)_setWindowResolution:(CGFloat)resolution;
     56// FIXME: Remove once the variant above exists on all platforms we need (cf. rdar://problem/47614795).
    5557- (void)_setWindowResolution:(CGFloat)resolution displayIfChanged:(BOOL)displayIfChanged;
    5658@end
    … …  
    239241        return;
    240242
    241     [m_window _setWindowResolution:newScale displayIfChanged:YES];
     243    if ([m_window respondsToSelector:@selector(_setWindowResolution:)])
     244        [m_window _setWindowResolution:newScale];
     245    else
     246        [m_window _setWindowResolution:newScale displayIfChanged:YES];
    242247#if WK_API_ENABLED
    243248    [m_view _setOverrideDeviceScaleFactor:newScale];
Note: See TracChangeset for help on using the changeset viewer.