Bug 1187851 patch 6 - Make dynamic changes to filter change fixed position containing block for descendants. r=roc
authorL. David Baron <dbaron@dbaron.org>
Wed, 24 Feb 2016 16:08:31 -0800
changeset 321812 c88f281bf19ae0a9b115a7a127e62758555e02f3
parent 321811 4f03658208cc64bc1c1195804933c0ada4e4aec5
child 321813 ee63c83bf27218fa1381956ecfe66548eae9d1b9
push id5913
push userjlund@mozilla.com
push dateMon, 25 Apr 2016 16:57:49 +0000
treeherdermozilla-beta@dcaf0a6fa115 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs1187851
milestone47.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 1187851 patch 6 - Make dynamic changes to filter change fixed position containing block for descendants. r=roc MozReview-Commit-ID: DDSadc3yzDL
layout/reftests/w3c-css/submitted/filters/reftest.list
layout/style/nsStyleStruct.cpp
layout/style/nsStyleStruct.h
--- a/layout/reftests/w3c-css/submitted/filters/reftest.list
+++ b/layout/reftests/w3c-css/submitted/filters/reftest.list
@@ -1,2 +1,2 @@
-fails == filter-containing-block-dynamic-1a.html filter-containing-block-dynamic-1-ref.html # bug 1187851
-fails == filter-containing-block-dynamic-1b.html filter-containing-block-dynamic-1-ref.html # bug 1187851
+== filter-containing-block-dynamic-1a.html filter-containing-block-dynamic-1-ref.html
+== filter-containing-block-dynamic-1b.html filter-containing-block-dynamic-1-ref.html
--- a/layout/style/nsStyleStruct.cpp
+++ b/layout/style/nsStyleStruct.cpp
@@ -1301,16 +1301,21 @@ void nsStyleSVGReset::Destroy(nsPresCont
   aContext->PresShell()->
     FreeByObjectID(mozilla::eArenaObjectID_nsStyleSVGReset, this);
 }
 
 nsChangeHint nsStyleSVGReset::CalcDifference(const nsStyleSVGReset& aOther) const
 {
   nsChangeHint hint = nsChangeHint(0);
 
+  if (HasFilters() != aOther.HasFilters()) {
+    // A change from/to being a containing block for position:fixed.
+    NS_UpdateHint(hint, nsChangeHint_UpdateContainingBlock);
+  }
+
   if (mClipPath != aOther.mClipPath ||
       mFilters != aOther.mFilters) {
     NS_UpdateHint(hint, nsChangeHint_UpdateEffects);
     NS_UpdateHint(hint, nsChangeHint_RepaintFrame);
     // We only actually need to update the overflow area for filter
     // changes.  However, clip-path changes require that we update
     // the PreEffectsBBoxProperty, which is done during overflow
     // computation.
--- a/layout/style/nsStyleStruct.h
+++ b/layout/style/nsStyleStruct.h
@@ -3461,16 +3461,17 @@ struct nsStyleSVGReset
       AllocateByObjectID(mozilla::eArenaObjectID_nsStyleSVGReset, sz);
   }
   void Destroy(nsPresContext* aContext);
 
   nsChangeHint CalcDifference(const nsStyleSVGReset& aOther) const;
   static nsChangeHint MaxDifference() {
     return nsChangeHint_UpdateEffects |
            nsChangeHint_UpdateOverflow |
+           nsChangeHint_UpdateContainingBlock |
            nsChangeHint_NeutralChange |
            NS_STYLE_HINT_REFLOW;
   }
   static nsChangeHint DifferenceAlwaysHandledForDescendants() {
     // CalcDifference never returns the reflow hints that are sometimes
     // handled for descendants as hints not handled for descendants.
     return nsChangeHint_NeedReflow |
            nsChangeHint_ReflowChangesSizeOrPosition |