Backout b35294da2c4b (bug 764117) due to OSX reftest orange.
authorRyan VanderMeulen <ryanvm@gmail.com>
Wed, 20 Jun 2012 22:56:36 -0400
changeset 97228 68be2d36dd3fd9b78afd5acac17b7ceaa36593e4
parent 97227 1eb62e8e0946a26f4fb2e0ae8386b8cb4b3e9a67
child 97229 34be3078ae5e17a67a584e769af63e31dcccdf22
push id22962
push useremorley@mozilla.com
push dateThu, 21 Jun 2012 10:59:14 +0000
treeherdermozilla-central@10e019421e6b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs764117
milestone16.0a1
backs outb35294da2c4bc65d3838a3108c616a5ef93c8e2e
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backout b35294da2c4b (bug 764117) due to OSX reftest orange.
layout/base/nsCSSRenderingBorders.cpp
--- a/layout/base/nsCSSRenderingBorders.cpp
+++ b/layout/base/nsCSSRenderingBorders.cpp
@@ -45,19 +45,21 @@
  *   |- separate corners?
  *   |- dashed side mask
  *   |
  *   -> can border be drawn in 1 pass? (e.g., solid border same color all around)
  *      |- DrawBorderSides with all 4 sides
  *   -> more than 1 pass?
  *      |- for each corner
  *         |- clip to DoCornerClipSubPath
+ *         |- PushGroup
  *         |- for each side adjacent to corner
  *            |- clip to DoSideClipSubPath
  *            |- DrawBorderSides with one side
+ *         |- PopGroup
  *      |- for each side
  *         |- DoSideClipWithoutCornersSubPath
  *         |- DrawDashedSide || DrawBorderSides with one side
  */
 
 static void ComputeBorderCornerDimensions(const gfxRect& aOuterRect,
                                           const gfxRect& aInnerRect,
                                           const gfxCornerSizes& aRadii,
@@ -1629,26 +1631,28 @@ nsCSSBorderRenderer::DrawBorders()
       DoCornerSubPath(corner);
       mContext->Clip();
 
       if (simpleCornerStyle) {
         // we don't need a group for this corner, the sides are the same,
         // but we weren't able to render just a solid block for the corner.
         DrawBorderSides(sideBits);
       } else {
-        // Sides are different.  We could draw using OPERATOR_ADD to
-        // get correct color blending behaviour at the seam.  We'd need
+        // Sides are different.  We need to draw using OPERATOR_ADD to
+        // get correct color blending behaviour at the seam.  We need
         // to do it in an offscreen surface to ensure that we're
         // always compositing on transparent black.  If the colors
         // don't have transparency and the current destination surface
         // has an alpha channel, we could just clear the region and
         // avoid the temporary, but that situation doesn't happen all
         // that often in practice (we double buffer to no-alpha
-        // surfaces). We choose just to seam though, as the performance
-        // advantages outweigh the modest aesthetic improvement.
+        // surfaces).
+
+        mContext->PushGroup(gfxASurface::CONTENT_COLOR_ALPHA);
+        mContext->SetOperator(gfxContext::OPERATOR_ADD);
 
         for (int cornerSide = 0; cornerSide < 2; cornerSide++) {
           mozilla::css::Side side = mozilla::css::Side(sides[cornerSide]);
           PRUint8 style = mBorderStyles[side];
 
           SF("corner: %d cornerSide: %d side: %d style: %d\n", corner, cornerSide, side, style);
 
           mContext->Save();
@@ -1656,16 +1660,20 @@ nsCSSBorderRenderer::DrawBorders()
           mContext->NewPath();
           DoSideClipSubPath(side);
           mContext->Clip();
 
           DrawBorderSides(1 << side);
 
           mContext->Restore();
         }
+
+        mContext->PopGroupToSource();
+        mContext->SetOperator(gfxContext::OPERATOR_OVER);
+        mContext->Paint();
       }
 
       mContext->Restore();
 
       SN();
     }
 
     // in the case of a single-unit border, we already munged the