| Differences between
and this patch
- Tools/ChangeLog +11 lines
Lines 1-3 Tools/ChangeLog_sec1
1
2015-01-06  Alexey Proskuryakov  <ap@apple.com>
2
3
        [Mac WK2] Test snapshots are 1600x1200 on Retina devices
4
        https://bugs.webkit.org/show_bug.cgi?id=139884
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        * WebKitTestRunner/mac/PlatformWebViewMac.mm: (WTR::PlatformWebView::windowSnapshotImage):
9
        Tell CGWindowListCreateImage to use the correct resolution. I don't really understand
10
        what the "nominal resolution" is, but this appears to work in practice.
11
1
2015-01-05  Joseph Pecoraro  <pecoraro@apple.com>
12
2015-01-05  Joseph Pecoraro  <pecoraro@apple.com>
2
13
3
        Remove some stale class names in check-for-inappropriate-objc-class-names
14
        Remove some stale class names in check-for-inappropriate-objc-class-names
- Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm -1 / +8 lines
Lines 230-236 void PlatformWebView::makeWebViewFirstRe Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm_sec1
230
WKRetainPtr<WKImageRef> PlatformWebView::windowSnapshotImage()
230
WKRetainPtr<WKImageRef> PlatformWebView::windowSnapshotImage()
231
{
231
{
232
    [m_view display];
232
    [m_view display];
233
    RetainPtr<CGImageRef> windowSnapshotImage = adoptCF(CGWindowListCreateImage(CGRectNull, kCGWindowListOptionIncludingWindow, [m_window windowNumber], kCGWindowImageBoundsIgnoreFraming | kCGWindowImageShouldBeOpaque));
233
    CGWindowImageOption options = kCGWindowImageBoundsIgnoreFraming | kCGWindowImageShouldBeOpaque;
234
235
#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
236
    if ([m_window backingScaleFactor] == 1)
237
        options |= kCGWindowImageNominalResolution;
238
#endif
239
240
    RetainPtr<CGImageRef> windowSnapshotImage = adoptCF(CGWindowListCreateImage(CGRectNull, kCGWindowListOptionIncludingWindow, [m_window windowNumber], options));
234
241
235
    // windowSnapshotImage will be in GenericRGB, as we've set the main display's color space to GenericRGB.
242
    // windowSnapshotImage will be in GenericRGB, as we've set the main display's color space to GenericRGB.
236
    return adoptWK(WKImageCreateFromCGImage(windowSnapshotImage.get(), 0));
243
    return adoptWK(WKImageCreateFromCGImage(windowSnapshotImage.get(), 0));

Return to Bug 139884