Title: [149343] trunk/Source/WebCore
Revision
149343
Author
[email protected]
Date
2013-04-29 18:03:52 -0700 (Mon, 29 Apr 2013)

Log 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):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (149342 => 149343)


--- trunk/Source/WebCore/ChangeLog	2013-04-30 00:46:42 UTC (rev 149342)
+++ trunk/Source/WebCore/ChangeLog	2013-04-30 01:03:52 UTC (rev 149343)
@@ -1,3 +1,17 @@
+2013-04-29  Simon Fraser  <[email protected]>
+
+        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):
+
 2013-04-29  Chris Fleizach  <[email protected]>
 
         WEB SPEECH: need to identify the default voice per language

Modified: trunk/Source/WebCore/platform/mac/WidgetMac.mm (149342 => 149343)


--- trunk/Source/WebCore/platform/mac/WidgetMac.mm	2013-04-30 00:46:42 UTC (rev 149342)
+++ trunk/Source/WebCore/platform/mac/WidgetMac.mm	2013-04-30 01:03:52 UTC (rev 149343)
@@ -241,8 +241,15 @@
         NSRect viewBounds = [view bounds];
         // Set up the translation and (flipped) orientation of the graphics context. In normal drawing, AppKit does it as it descends down
         // the view hierarchy.
-        CGContextTranslateCTM(cgContext, viewFrame.origin.x - viewBounds.origin.x, viewFrame.origin.y + viewFrame.size.height + viewBounds.origin.y);
-        CGContextScaleCTM(cgContext, 1, -1);
+        bool shouldFlipContext = true;
+#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
+        shouldFlipContext = false;
+#endif
+        if (shouldFlipContext) {
+            CGContextTranslateCTM(cgContext, viewFrame.origin.x - viewBounds.origin.x, viewFrame.origin.y + viewFrame.size.height + viewBounds.origin.y);
+            CGContextScaleCTM(cgContext, 1, -1);
+        } else
+            CGContextTranslateCTM(cgContext, viewFrame.origin.x - viewBounds.origin.x, viewFrame.origin.y + viewBounds.origin.y);
 
         BEGIN_BLOCK_OBJC_EXCEPTIONS;
         {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to