Bug 1265237 - Clear clipping for out-of-flow frames that we are descending into but haven't stored explicit clip data for. r=mstange
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -2766,16 +2766,22 @@ nsIFrame::BuildDisplayListForChild(nsDis
DisplayListClipState::AutoClipMultiple clipState(aBuilder);
CheckForApzAwareEventHandlers(aBuilder, child);
if (savedOutOfFlowData) {
clipState.SetClipForContainingBlockDescendants(
&savedOutOfFlowData->mContainingBlockClip);
clipState.SetScrollClipForContainingBlockDescendants(
savedOutOfFlowData->mContainingBlockScrollClip);
+ } else if (GetStateBits() & NS_FRAME_FORCE_DISPLAY_LIST_DESCEND_INTO) {
+ // If we have nested out-of-flow frames and the outer one isn't visible
+ // then we won't have stored clip data for it. We can just clear the clip
+ // instead since we know we won't render anything, and the inner out-of-flow
+ // frame will setup the correct clip for itself.
+ clipState.Clear();
}
// Setup clipping for the parent's overflow:-moz-hidden-unscrollable,
// or overflow:hidden on elements that don't support scrolling (and therefore
// don't create nsHTML/XULScrollFrame). This clipping needs to not clip
// anything directly rendered by the parent, only the rendering of its
// children.
// Don't use overflowClip to restrict the dirty rect, since some of the