Bug 1209765 (Part 6) - Support sync decoding and track draw results when drawing borders in nsColumnSetFrame. r=tn
authorSeth Fowler <mark.seth.fowler@gmail.com>
Thu, 22 Oct 2015 19:54:49 -0700
changeset 304340 d2f43ff4b3bc8718cae4bfaab8a4b195d169c8ca
parent 304339 4f5af19b23d6652f1e795b7bb0163868f9d7c872
child 304341 36e9b73330386414407a86c1ac8e91c848099398
push id1001
push userraliiev@mozilla.com
push dateMon, 18 Jan 2016 19:06:03 +0000
treeherdermozilla-release@8b89261f3ac4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstn
bugs1209765
milestone44.0a1
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
Bug 1209765 (Part 6) - Support sync decoding and track draw results when drawing borders in nsColumnSetFrame. r=tn
layout/generic/nsColumnSetFrame.cpp
--- a/layout/generic/nsColumnSetFrame.cpp
+++ b/layout/generic/nsColumnSetFrame.cpp
@@ -1,15 +1,16 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* rendering object for css3 multi-column layout */
 
+#include "mozilla/unused.h"
 #include "nsColumnSetFrame.h"
 #include "nsCSSRendering.h"
 #include "nsDisplayList.h"
 
 using namespace mozilla;
 using namespace mozilla::layout;
 
 /**
@@ -131,19 +132,27 @@ nsColumnSetFrame::PaintColumnRule(nsRend
     } else {
       nscoord edgeOfPrev = prevFrame->GetRect().XMost() + aPt.x;
       nscoord edgeOfNext = nextFrame->GetRect().X() + aPt.x;
       linePt = nsPoint((edgeOfPrev + edgeOfNext - ruleSize.width) / 2,
                        contentRect.y);
     }
 
     nsRect lineRect(linePt, ruleSize);
-    nsCSSRendering::PaintBorderWithStyleBorder(presContext, *aCtx, this,
-        aDirtyRect, lineRect, border, StyleContext(),
-        skipSides);
+
+    // Assert that we're not drawing a border-image here; if we were, we
+    // couldn't ignore the DrawResult that PaintBorderWithStyleBorder returns.
+    MOZ_ASSERT(border.mBorderImageSource.GetType() == eStyleImageType_Null);
+
+    unused <<
+      nsCSSRendering::PaintBorderWithStyleBorder(presContext, *aCtx, this,
+                                                 aDirtyRect, lineRect, border,
+                                                 StyleContext(),
+                                                 PaintBorderFlags::SYNC_DECODE_IMAGES,
+                                                 skipSides);
 
     child = nextSibling;
     nextSibling = nextSibling->GetNextSibling();
   }
 }
 
 static nscoord
 GetAvailableContentISize(const nsHTMLReflowState& aReflowState)