diff --git a/layout/generic/nsCanvasFrame.cpp b/layout/generic/nsCanvasFrame.cpp index 5c673bccc670..51da20609b4d 100644 --- a/layout/generic/nsCanvasFrame.cpp +++ b/layout/generic/nsCanvasFrame.cpp @@ -402,9 +402,9 @@ nsCanvasFrame::GetPrefWidth(nsRenderingContext *aRenderingContext) NS_IMETHODIMP nsCanvasFrame::Reflow(nsPresContext* aPresContext, - nsHTMLReflowMetrics& aDesiredSize, - const nsHTMLReflowState& aReflowState, - nsReflowStatus& aStatus) + nsHTMLReflowMetrics& aDesiredSize, + const nsHTMLReflowState& aReflowState, + nsReflowStatus& aStatus) { DO_GLOBAL_REFLOW_COUNT("nsCanvasFrame"); DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus); diff --git a/layout/generic/nsFrame.cpp b/layout/generic/nsFrame.cpp index c7e7ec2f6634..142664589b33 100644 --- a/layout/generic/nsFrame.cpp +++ b/layout/generic/nsFrame.cpp @@ -273,15 +273,6 @@ nsIFrame::MarkAsNotAbsoluteContainingBlock() Properties().Delete(AbsoluteContainingBlockProperty()); } -void -nsIFrame::ClearDisplayItemCache() -{ - if (GetStateBits() & NS_FRAME_HAS_CACHED_BACKGROUND) { - Properties().Delete(CachedBackgroundImage()); - RemoveStateBits(NS_FRAME_HAS_CACHED_BACKGROUND); - } -} - bool nsIFrame::CheckAndClearPaintedState() { @@ -4876,6 +4867,10 @@ static void InvalidateFrameInternal(nsIFrame *aFrame, bool aHasDisplayItem = tru aFrame->Properties().Delete(nsIFrame::InvalidationRect()); aFrame->RemoveStateBits(NS_FRAME_HAS_INVALID_RECT); } + if (aFrame->HasAnyStateBits(NS_FRAME_HAS_CACHED_BACKGROUND)) { + aFrame->Properties().Delete(nsIFrame::CachedBackgroundImage()); + aFrame->RemoveStateBits(NS_FRAME_HAS_CACHED_BACKGROUND); + } } void diff --git a/layout/generic/nsIFrame.h b/layout/generic/nsIFrame.h index 9f56cc772a5d..10fdb7821ca2 100644 --- a/layout/generic/nsIFrame.h +++ b/layout/generic/nsIFrame.h @@ -2676,8 +2676,6 @@ NS_PTR_TO_INT32(frame->Properties().Get(nsIFrame::ParagraphDepthProperty())) */ virtual bool IsFocusable(int32_t *aTabIndex = nullptr, bool aWithMouse = false); - void ClearDisplayItemCache(); - // BOX LAYOUT METHODS // These methods have been migrated from nsIBox and are in the process of // being refactored. DO NOT USE OUTSIDE OF XUL. diff --git a/layout/reftests/bugs/815030-1-ref.html b/layout/reftests/bugs/815030-1-ref.html new file mode 100644 index 000000000000..7ae415eedb29 --- /dev/null +++ b/layout/reftests/bugs/815030-1-ref.html @@ -0,0 +1,5 @@ + + + + + diff --git a/layout/reftests/bugs/815030-1.html b/layout/reftests/bugs/815030-1.html new file mode 100644 index 000000000000..33a3e3493a3d --- /dev/null +++ b/layout/reftests/bugs/815030-1.html @@ -0,0 +1,13 @@ + + + + + +