Changeset 149343 in webkit


Ignore:
Timestamp:
Apr 29, 2013, 6:03:52 PM (13 years ago)
Author:
Simon Fraser
Message:

Don't do CGContext flipping when painting subframes in WebKit1 on post-MountainLion OSes
https://bugs.webkit.org/show_bug.cgi?id=115392
<rdar://problem/13421519>

Reviewed by Beth Dakin.

Sync up with AppKit behavior changes that could cause subviews to be flipped when
painted.

  • platform/mac/WidgetMac.mm:

(WebCore::Widget::paint):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r149342 r149343  
     12013-04-29  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Don't do CGContext flipping when painting subframes in WebKit1 on post-MountainLion OSes
     4        https://bugs.webkit.org/show_bug.cgi?id=115392
     5        <rdar://problem/13421519>
     6
     7        Reviewed by Beth Dakin.
     8
     9        Sync up with AppKit behavior changes that could cause subviews to be flipped when
     10        painted.
     11
     12        * platform/mac/WidgetMac.mm:
     13        (WebCore::Widget::paint):
     14
    1152013-04-29  Chris Fleizach  <cfleizach@apple.com>
    216
  • trunk/Source/WebCore/platform/mac/WidgetMac.mm

    r95749 r149343  
    242242        // Set up the translation and (flipped) orientation of the graphics context. In normal drawing, AppKit does it as it descends down
    243243        // the view hierarchy.
    244         CGContextTranslateCTM(cgContext, viewFrame.origin.x - viewBounds.origin.x, viewFrame.origin.y + viewFrame.size.height + viewBounds.origin.y);
    245         CGContextScaleCTM(cgContext, 1, -1);
     244        bool shouldFlipContext = true;
     245#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
     246        shouldFlipContext = false;
     247#endif
     248        if (shouldFlipContext) {
     249            CGContextTranslateCTM(cgContext, viewFrame.origin.x - viewBounds.origin.x, viewFrame.origin.y + viewFrame.size.height + viewBounds.origin.y);
     250            CGContextScaleCTM(cgContext, 1, -1);
     251        } else
     252            CGContextTranslateCTM(cgContext, viewFrame.origin.x - viewBounds.origin.x, viewFrame.origin.y + viewBounds.origin.y);
    246253
    247254        BEGIN_BLOCK_OBJC_EXCEPTIONS;
Note: See TracChangeset for help on using the changeset viewer.