# HG changeset patch # User Boris Zbarsky # Date 1449250466 18000 # Fri Dec 04 12:34:26 2015 -0500 # Node ID d81957d1ce2c23ed913b81c966f360ef66aad893 # Parent 61ffbe61bf04dd4effee72608ca8f3a3f256fbe6 Bug 1230466. Make sure to update our scrollbar styles when a is removed from the DOM, since we might now need to propagate from some other element. r=roc diff --git a/layout/base/nsCSSFrameConstructor.cpp b/layout/base/nsCSSFrameConstructor.cpp --- a/layout/base/nsCSSFrameConstructor.cpp +++ b/layout/base/nsCSSFrameConstructor.cpp @@ -7895,16 +7895,22 @@ nsCSSFrameConstructor::ContentRemoved(ns NS_PRECONDITION(mUpdateCount != 0, "Should be in an update while destroying frames"); *aDidReconstruct = false; if (aDestroyedFramesFor) { *aDestroyedFramesFor = aChild; } + if (aChild->IsHTMLElement(nsGkAtoms::body) || !aContainer) { + // This might be the element we propagated viewport scrollbar + // styles from. Recompute those. + mPresShell->GetPresContext()->UpdateViewportScrollbarStylesOverride(); + } + // XXXldb Do we need to re-resolve style to handle the CSS2 + combinator and // the :empty pseudo-class? #ifdef DEBUG if (gNoisyContentUpdates) { printf("nsCSSFrameConstructor::ContentRemoved container=%p child=%p " "old-next-sibling=%p\n", static_cast(aContainer), diff --git a/layout/reftests/bugs/1230466.html b/layout/reftests/bugs/1230466.html new file mode 100644 --- /dev/null +++ b/layout/reftests/bugs/1230466.html @@ -0,0 +1,12 @@ + + + + + diff --git a/layout/reftests/bugs/reftest.list b/layout/reftests/bugs/reftest.list --- a/layout/reftests/bugs/reftest.list +++ b/layout/reftests/bugs/reftest.list @@ -1938,8 +1938,9 @@ fuzzy(1,74) fuzzy-if(gtkWidget,6,79) == != 1207326-1.html about:blank == 1209603-1.html 1209603-1-ref.html == 1209994-1.html 1209994-1-ref.html == 1209994-2.html 1209994-2-ref.html == 1209994-3.html 1209994-3-ref.html == 1209994-4.html 1209994-4-ref.html == 1222226-1.html 1222226-1-ref.html pref(layout.css.overflow-clip-box.enabled,true) == 1226278.html 1226278-ref.html +== 1230466.html about:blank