Changeset 93653 in webkit


Ignore:
Timestamp:
Aug 23, 2011 4:18:34 PM (13 years ago)
Author:
caryclark@google.com
Message:

Turn WebCanvas into CGContext before drawing scrollbar (DRT using Skia on Mac)
https://bugs.webkit.org/show_bug.cgi?id=66803

This fixes the WebKit Canaries, in particular avoids a crash on tests
like css1/basic/comments.html.

Reviewed by James Robinson.

  • DumpRenderTree/chromium/WebThemeEngineDRTMac.mm:

(WebThemeEngineDRTMac::paintNSScrollerScrollbarThumb):
The NSGraphicsContext call graphicsContextWithGraphicsPort takes a void*
parameter, so it took a WebCanvas* (mapped to SkCanvas* in Skia-land)
and treated it as if it were a CGContextRef.

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r93649 r93653  
     12011-08-23  Cary Clark  <caryclark@google.com>
     2
     3        Turn WebCanvas into CGContext before drawing scrollbar (DRT using Skia on Mac)
     4        https://bugs.webkit.org/show_bug.cgi?id=66803
     5
     6        This fixes the WebKit Canaries, in particular avoids a crash on tests
     7        like css1/basic/comments.html.
     8
     9        Reviewed by James Robinson.
     10
     11        * DumpRenderTree/chromium/WebThemeEngineDRTMac.mm:
     12        (WebThemeEngineDRTMac::paintNSScrollerScrollbarThumb):
     13        The NSGraphicsContext call graphicsContextWithGraphicsPort takes a void*
     14        parameter, so it took a WebCanvas* (mapped to SkCanvas* in Skia-land)
     15        and treated it as if it were a CGContextRef.
     16
    1172011-08-23  Patrick Gansterer  <paroga@webkit.org>
    218
  • trunk/Tools/DumpRenderTree/chromium/WebThemeEngineDRTMac.mm

    r88015 r93653  
    177177
    178178    NSGraphicsContext* previousGraphicsContext = [NSGraphicsContext currentContext];
    179     NSGraphicsContext* nsGraphicsContext = [NSGraphicsContext graphicsContextWithGraphicsPort:canvas flipped:YES];
     179#if WEBKIT_USING_SKIA
     180    gfx::SkiaBitLocker bitLocker(canvas);
     181    CGContextRef cgContext = bitLocker.cgContext();
     182#else
     183    CGContextRef cgContext = canvas;
     184#endif
     185    NSGraphicsContext* nsGraphicsContext = [NSGraphicsContext graphicsContextWithGraphicsPort:cgContext flipped:YES];
    180186    [NSGraphicsContext setCurrentContext:nsGraphicsContext];
    181187
Note: See TracChangeset for help on using the changeset viewer.