Title: [91506] branches/safari-534.51-branch

Diff

Modified: branches/safari-534.51-branch/LayoutTests/ChangeLog (91505 => 91506)


--- branches/safari-534.51-branch/LayoutTests/ChangeLog	2011-07-21 21:44:39 UTC (rev 91505)
+++ branches/safari-534.51-branch/LayoutTests/ChangeLog	2011-07-21 21:46:43 UTC (rev 91506)
@@ -1,5 +1,21 @@
 2011-07-21  Lucas Forschler  <[email protected]>
 
+    Merged 89397.
+    
+    2011-06-21  Matthew Delaney  <[email protected]>
+
+        Reviewed by Simon Fraser.
+
+        beginTransparencyLayer leaves context color out of sync, bleeds color into text
+        https://bugs.webkit.org/show_bug.cgi?id=63093
+
+        * fast/css/color-leakage.html: Added pixel regression test that previously would have the
+          border's color spilling into the text.
+        * platform/mac/fast/css/color-leakage-expected.png: Added.
+        * platform/mac/fast/css/color-leakage-expected.txt: Added.
+
+2011-07-21  Lucas Forschler  <[email protected]>
+
     Merged 89313.
 
     2011-06-20  Tim Horton  <[email protected]>

Copied: branches/safari-534.51-branch/LayoutTests/fast/css/color-leakage.html (from rev 89397, trunk/LayoutTests/fast/css/color-leakage.html) (0 => 91506)


--- branches/safari-534.51-branch/LayoutTests/fast/css/color-leakage.html	                        (rev 0)
+++ branches/safari-534.51-branch/LayoutTests/fast/css/color-leakage.html	2011-07-21 21:46:43 UTC (rev 91506)
@@ -0,0 +1,25 @@
+<html>
+  <head>
+  <!-- The Ahem font rendered in this test should be displayed black, not blue. -->
+    <style>
+      @font-face {
+        font-family: 'Ahem';
+        src: url('resources/Ahem.ttf');
+      }
+      div {
+        display: block;
+        font-family: Ahem;
+        font-size: 30px;
+        color: black;
+        border-top: 5px solid blue;
+        border-bottom: 5px solid rgba(0,0,0,0.9);
+        width: 650px;
+      }
+    </style>
+</head>
+<body>
+  <div>
+    This should be black.
+  </div>
+</body>
+</html>

Copied: branches/safari-534.51-branch/LayoutTests/platform/mac/fast/css/color-leakage-expected.png (from rev 89397, trunk/LayoutTests/platform/mac/fast/css/color-leakage-expected.png)


(Binary files differ)

Copied: branches/safari-534.51-branch/LayoutTests/platform/mac/fast/css/color-leakage-expected.txt (from rev 89397, trunk/LayoutTests/platform/mac/fast/css/color-leakage-expected.txt) (0 => 91506)


--- branches/safari-534.51-branch/LayoutTests/platform/mac/fast/css/color-leakage-expected.txt	                        (rev 0)
+++ branches/safari-534.51-branch/LayoutTests/platform/mac/fast/css/color-leakage-expected.txt	2011-07-21 21:46:43 UTC (rev 91506)
@@ -0,0 +1,8 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderBlock {DIV} at (0,0) size 650x40 [border: (5px solid #0000FF) none (5px solid #000000E6) none]
+        RenderText {#text} at (0,5) size 630x30
+          text run at (0,5) width 630: "This should be black."

Modified: branches/safari-534.51-branch/Source/WebCore/ChangeLog (91505 => 91506)


--- branches/safari-534.51-branch/Source/WebCore/ChangeLog	2011-07-21 21:44:39 UTC (rev 91505)
+++ branches/safari-534.51-branch/Source/WebCore/ChangeLog	2011-07-21 21:46:43 UTC (rev 91506)
@@ -1,5 +1,23 @@
 2011-07-21  Lucas Forschler  <[email protected]>
 
+    Merged 89397.
+
+    2011-06-21  Matthew Delaney  <[email protected]>
+
+        Reviewed by Simon Fraser.
+
+        beginTransparencyLayer leaves context color out of sync, bleeds color into text
+        https://bugs.webkit.org/show_bug.cgi?id=63093
+
+        Test: fast/css/color-leakage.html
+
+        * platform/graphics/cg/GraphicsContextCG.cpp: Swap out CGContextSave/Restore with
+        GraphicsContext::save/restore to keep the context in sync with its CG context
+        (WebCore::GraphicsContext::beginTransparencyLayer): Added save(), removed redundant calls.
+        (WebCore::GraphicsContext::endTransparencyLayer): Added restore(), removed redundant calls.
+
+2011-07-21  Lucas Forschler  <[email protected]>
+
     Merged 89313.
 
     2011-06-20  Tim Horton  <[email protected]>

Modified: branches/safari-534.51-branch/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp (91505 => 91506)


--- branches/safari-534.51-branch/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp	2011-07-21 21:44:39 UTC (rev 91505)
+++ branches/safari-534.51-branch/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp	2011-07-21 21:46:43 UTC (rev 91506)
@@ -893,8 +893,10 @@
 {
     if (paintingDisabled())
         return;
+
+    save();
+
     CGContextRef context = platformContext();
-    CGContextSaveGState(context);
     CGContextSetAlpha(context, opacity);
     CGContextBeginTransparencyLayer(context, 0);
     m_data->beginTransparencyLayer();
@@ -907,9 +909,9 @@
         return;
     CGContextRef context = platformContext();
     CGContextEndTransparencyLayer(context);
-    CGContextRestoreGState(context);
     m_data->endTransparencyLayer();
-    m_data->m_userToDeviceTransformKnownToBeIdentity = false;
+
+    restore();
 }
 
 void GraphicsContext::setPlatformShadow(const FloatSize& offset, float blur, const Color& color, ColorSpace colorSpace)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to