Bug 722117 - "ASSERTION: CalcDifference() returned bigger hint than MaxDifference()" with blink. r=roc
authorMats Palmgren <matspal@gmail.com>
Sun, 29 Jan 2012 09:48:20 +0100
changeset 86906 a5569fc4c390ee079155f6adf158ea18819721f8
parent 86905 59d8d92f9f3c08443ab3437f8eabcf90b1a7a616
child 86907 87e6229b40730867ff2c850727bc8480a6e5bc31
child 87185 95b5009ae49f73e69873ba60d54ec954831c7382
child 87806 cffa39f708c003c341cdeb6111a01f88a4813a62
push id805
push userakeybl@mozilla.com
push dateWed, 01 Feb 2012 18:17:35 +0000
treeherdermozilla-aurora@6fb3bf232436 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs722117
milestone12.0a1
Bug 722117 - "ASSERTION: CalcDifference() returned bigger hint than MaxDifference()" with blink. r=roc
layout/style/crashtests/722117.html
layout/style/crashtests/crashtests.list
layout/style/nsStyleContext.cpp
layout/style/nsStyleStruct.cpp
new file mode 100644
--- /dev/null
+++ b/layout/style/crashtests/722117.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html><html><body>
+<script>
+function doTest() {
+  document.body.style.MozTextBlink = 'blink';
+}
+document.addEventListener("MozReftestInvalidate", doTest, false);
+</script>
+</body></html>
--- a/layout/style/crashtests/crashtests.list
+++ b/layout/style/crashtests/crashtests.list
@@ -70,8 +70,9 @@ load 645142.html
 load 611922-1.html
 == 645951-1.html 645951-1-ref.html
 load 665209-1.html
 asserts(2) load 671799-1.html
 asserts(2) load 671799-2.html
 load 690990-1.html
 load 696188-1.html
 load 700116.html
+load 722117.html
--- a/layout/style/nsStyleContext.cpp
+++ b/layout/style/nsStyleContext.cpp
@@ -462,32 +462,32 @@ nsStyleContext::CalcStyleDifference(nsSt
   DO_STRUCT_DIFFERENCE(Quotes);
 
   maxHint = nsChangeHint(NS_STYLE_HINT_REFLOW | nsChangeHint_UpdateEffects);
   DO_STRUCT_DIFFERENCE(SVGReset);
   DO_STRUCT_DIFFERENCE(SVG);
 
   maxHint = nsChangeHint(NS_STYLE_HINT_REFLOW | NS_STYLE_HINT_UPDATE_OVERFLOW);
   DO_STRUCT_DIFFERENCE(Border);
+  DO_STRUCT_DIFFERENCE(TextReset);
       
   // Changes to 'z-index' cause SyncFrameView.
   maxHint = nsChangeHint(NS_STYLE_HINT_REFLOW | nsChangeHint_SyncFrameView);
   DO_STRUCT_DIFFERENCE(Position);
 
   // At this point, we know that the worst kind of damage we could do is
   // a reflow.
   maxHint = NS_STYLE_HINT_REFLOW;
 
   // The following structs cause (as their maximal difference) a reflow
   // to occur.  REFLOW Structs: Font, Margin, Padding, List, Position,
   // TextReset
   DO_STRUCT_DIFFERENCE(Font);
   DO_STRUCT_DIFFERENCE(Margin);
   DO_STRUCT_DIFFERENCE(Padding);
-  DO_STRUCT_DIFFERENCE(TextReset);
 
   // Outline needs to update the overflow and repaint.
   maxHint = NS_STYLE_HINT_UPDATE_OVERFLOW;
   DO_STRUCT_DIFFERENCE(Outline);
 
   // Most backgrounds only require a repaint, but backgrounds using -moz-element
   // need to reset SVG effects, too.
   maxHint = nsChangeHint(nsChangeHint_RepaintFrame | nsChangeHint_UpdateEffects);
--- a/layout/style/nsStyleStruct.cpp
+++ b/layout/style/nsStyleStruct.cpp
@@ -2781,17 +2781,17 @@ nsChangeHint nsStyleTextReset::CalcDiffe
   }
   return NS_STYLE_HINT_NONE;
 }
 
 #ifdef DEBUG
 /* static */
 nsChangeHint nsStyleTextReset::MaxDifference()
 {
-  return NS_STYLE_HINT_REFLOW;
+  return nsChangeHint(NS_STYLE_HINT_REFLOW |  NS_STYLE_HINT_UPDATE_OVERFLOW);
 }
 #endif
 
 static nsChangeHint
 CalcShadowDifference(nsCSSShadowArray* lhs,
                      nsCSSShadowArray* rhs)
 {
   if (lhs == rhs)