Title: [114453] branches/safari-534.57-branch/Source/WebCore

Diff

Modified: branches/safari-534.57-branch/Source/WebCore/ChangeLog (114452 => 114453)


--- branches/safari-534.57-branch/Source/WebCore/ChangeLog	2012-04-17 22:48:21 UTC (rev 114452)
+++ branches/safari-534.57-branch/Source/WebCore/ChangeLog	2012-04-17 22:51:13 UTC (rev 114453)
@@ -1,3 +1,26 @@
+2012-04-12  Lucas Forschler  <[email protected]>
+
+    Merge 113415
+
+    2012-04-05  Adele Peterson  <[email protected]>
+
+            <rdar://problem/11133179> and https://bugs.webkit.org/show_bug.cgi?id=74129
+            REGRESSION (SnowLeopard, 5.1.4): All WK2 horizontal scrollbars look broken
+
+            Patch by Dan Bernstein, Reviewed by Beth Dakin.
+
+            This code assumed that the current CTM wouldn't have extraneous operations built into it, 
+            but this bug is evidence that that assumption was wrong. We should just get the base CTM instead 
+            and apply the device scale factor to it.
+
+            No tests added since the SnowLeopard-style scrollbars aren't testable in our regression tests right now.
+
+            * platform/graphics/GraphicsContext.cpp:
+            (WebCore::GraphicsContext::platformApplyDeviceScaleFactor):
+            (WebCore::GraphicsContext::applyDeviceScaleFactor):
+            * platform/graphics/GraphicsContext.h: (GraphicsContext):
+            * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::platformApplyDeviceScaleFactor):
+
 2012-04-17  Lucas Forschler  <[email protected]>
 
     Merge 111977

Modified: branches/safari-534.57-branch/Source/WebCore/platform/graphics/GraphicsContext.cpp (114452 => 114453)


--- branches/safari-534.57-branch/Source/WebCore/platform/graphics/GraphicsContext.cpp	2012-04-17 22:48:21 UTC (rev 114452)
+++ branches/safari-534.57-branch/Source/WebCore/platform/graphics/GraphicsContext.cpp	2012-04-17 22:51:13 UTC (rev 114453)
@@ -749,7 +749,11 @@
 void GraphicsContext::applyDeviceScaleFactor(float deviceScaleFactor)
 {
     scale(FloatSize(deviceScaleFactor, deviceScaleFactor));
+#if !defined(BUILDING_ON_SNOW_LEOPARD)
     platformApplyDeviceScaleFactor();
+#else
+    platformApplyDeviceScaleFactor(deviceScaleFactor);
+#endif
 }
 
 }

Modified: branches/safari-534.57-branch/Source/WebCore/platform/graphics/GraphicsContext.h (114452 => 114453)


--- branches/safari-534.57-branch/Source/WebCore/platform/graphics/GraphicsContext.h	2012-04-17 22:48:21 UTC (rev 114452)
+++ branches/safari-534.57-branch/Source/WebCore/platform/graphics/GraphicsContext.h	2012-04-17 22:51:13 UTC (rev 114453)
@@ -419,7 +419,11 @@
         // This function applies the device scale factor to the context, making the context capable of
         // acting as a base-level context for a HiDPI environment.
         void applyDeviceScaleFactor(float);
+#if !defined(BUILDING_ON_SNOW_LEOPARD)
         void platformApplyDeviceScaleFactor();
+#else
+        void platformApplyDeviceScaleFactor(float);
+#endif
 
 #if OS(WINCE) && !PLATFORM(QT)
         void setBitmap(PassRefPtr<SharedBitmap>);

Modified: branches/safari-534.57-branch/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp (114452 => 114453)


--- branches/safari-534.57-branch/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp	2012-04-17 22:48:21 UTC (rev 114452)
+++ branches/safari-534.57-branch/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp	2012-04-17 22:51:13 UTC (rev 114453)
@@ -65,9 +65,11 @@
 
 #endif
 
-// Undocumented CGContextSetCTM function, available at least since 10.4.
 extern "C" {
     CG_EXTERN void CGContextSetCTM(CGContextRef, CGAffineTransform);
+#ifdef BUILDING_ON_SNOW_LEOPARD
+    CG_EXTERN CGAffineTransform CGContextGetBaseCTM(CGContextRef);
+#endif
 };
 
 using namespace std;
@@ -1513,12 +1515,20 @@
     CGContextSetBlendMode(platformContext(), target);
 }
 
+#if !defined(BUILDING_ON_SNOW_LEOPARD)
 void GraphicsContext::platformApplyDeviceScaleFactor()
+#else
+void GraphicsContext::platformApplyDeviceScaleFactor(float deviceScaleFactor)
+#endif
 {
     // CoreGraphics expects the base CTM of a HiDPI context to have the scale factor applied to it.
     // Failing to change the base level CTM will cause certain CG features, such as focus rings,
     // to draw with a scale factor of 1 rather than the actual scale factor.
+#if !defined(BUILDING_ON_SNOW_LEOPARD)
     wkSetBaseCTM(platformContext(), getCTM());
+#else
+    wkSetBaseCTM(platformContext(), CGAffineTransformScale(CGContextGetBaseCTM(platformContext()), deviceScaleFactor, deviceScaleFactor));
+#endif
 }
 
 }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to