Bug 1514962 - Use nsDisplayItem::GetPaddingRect(). r=mattwoodrow
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Tue, 18 Dec 2018 07:06:12 +0000
changeset 451398 bfd9d5e58fe0180617996ebe00c623ea2bccdcb6
parent 451397 21b1d3d8658407cea5de05ef0a9f82a62db94b2a
child 451399 b77b6244ebc95356c4bb552ba4524531967f9838
push id75034
push userhikezoe@mozilla.com
push dateWed, 19 Dec 2018 20:53:37 +0000
treeherderautoland@bfd9d5e58fe0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
bugs1514962
milestone66.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 1514962 - Use nsDisplayItem::GetPaddingRect(). r=mattwoodrow Depends on D14833 Differential Revision: https://phabricator.services.mozilla.com/D14834
layout/painting/nsDisplayList.cpp
--- a/layout/painting/nsDisplayList.cpp
+++ b/layout/painting/nsDisplayList.cpp
@@ -5017,18 +5017,17 @@ nsDisplayBorder::nsDisplayBorder(nsDispl
                                  nsIFrame* aFrame)
     : nsDisplayItem(aBuilder, aFrame) {
   MOZ_COUNT_CTOR(nsDisplayBorder);
 
   mBounds = CalculateBounds<nsRect>(*mFrame->StyleBorder());
 }
 
 bool nsDisplayBorder::IsInvisibleInRect(const nsRect& aRect) const {
-  nsRect paddingRect =
-      mFrame->GetPaddingRect() - mFrame->GetPosition() + ToReferenceFrame();
+  nsRect paddingRect = GetPaddingRect();
   const nsStyleBorder* styleBorder;
   if (paddingRect.Contains(aRect) &&
       !(styleBorder = mFrame->StyleBorder())->IsBorderImageLoaded() &&
       !nsLayoutUtils::HasNonZeroCorner(styleBorder->mBorderRadius)) {
     // aRect is entirely inside the content rect, and no part
     // of the border is rendered inside the content rect, so we are not
     // visible
     // Skip this if there's a border-image (which draws a background