Bug 719177 - Changes to 'border-image-outset' only needs to update the overflow areas and repaint but does not need a reflow. r=roc
authorMats Palmgren <matspal@gmail.com>
Sat, 28 Jan 2012 04:35:59 +0100
changeset 85640 07bd73451aa40ee4d59ecce7cddbd57cb5811651
parent 85639 13739446fc8e01c8dd7db32645e4a341b2ea1099
child 85641 2cae7e5c62ae63554993a8f32cea553846c6e4a4
push id21940
push userjdrew@mozilla.com
push dateSun, 29 Jan 2012 02:43:03 +0000
treeherdermozilla-central@ec666b4c8d84 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs719177
milestone12.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 719177 - Changes to 'border-image-outset' only needs to update the overflow areas and repaint but does not need a reflow. r=roc
layout/style/nsStyleStruct.cpp
--- a/layout/style/nsStyleStruct.cpp
+++ b/layout/style/nsStyleStruct.cpp
@@ -540,20 +540,22 @@ nsStyleBorder::Destroy(nsPresContext* aC
 nsChangeHint nsStyleBorder::CalcDifference(const nsStyleBorder& aOther) const
 {
   // Note that differences in mBorder don't affect rendering (which should only
   // use mComputedBorder), so don't need to be tested for here.
   // XXXbz we should be able to return a more specific change hint for
   // at least GetActualBorder() differences...
   if (mTwipsPerPixel != aOther.mTwipsPerPixel ||
       GetActualBorder() != aOther.GetActualBorder() ||
-      mFloatEdge != aOther.mFloatEdge ||
-      mBorderImageOutset != aOther.mBorderImageOutset)
+      mFloatEdge != aOther.mFloatEdge)
     return NS_STYLE_HINT_REFLOW;
 
+  if (mBorderImageOutset != aOther.mBorderImageOutset)
+    return NS_STYLE_HINT_UPDATE_OVERFLOW;
+
   nsChangeHint shadowDifference =
     CalcShadowDifference(mBoxShadow, aOther.mBoxShadow);
   if (NS_IsHintSubset(nsChangeHint_RepaintFrame, shadowDifference))
     return shadowDifference;
 
   // Note that mBorderStyle stores not only the border style but also
   // color-related flags.  Given that we've already done an mComputedBorder
   // comparison, border-style differences can only lead to a Repaint hint.  So
@@ -570,18 +572,17 @@ nsChangeHint nsStyleBorder::CalcDifferen
     return nsChangeHint_RepaintFrame;
 
   if (IsBorderImageLoaded() || aOther.IsBorderImageLoaded()) {
     if (mBorderImageSource  != aOther.mBorderImageSource  ||
         mBorderImageRepeatH != aOther.mBorderImageRepeatH ||
         mBorderImageRepeatV != aOther.mBorderImageRepeatV ||
         mBorderImageSlice   != aOther.mBorderImageSlice   ||
         mBorderImageFill    != aOther.mBorderImageFill    ||
-        mBorderImageWidth   != aOther.mBorderImageWidth   ||
-        mBorderImageOutset  != aOther.mBorderImageOutset)
+        mBorderImageWidth   != aOther.mBorderImageWidth)
       return nsChangeHint_RepaintFrame;
   }
 
   // Note that at this point if mBorderColors is non-null so is
   // aOther.mBorderColors
   if (mBorderColors) {
     NS_FOR_CSS_SIDES(ix) {
       if (!nsBorderColors::Equal(mBorderColors[ix],