Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1492)

Unified Diff: Source/core/rendering/RenderLayer.h

Issue 14863002: Only update composited-scrolling state once after layout. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: updating expectations. Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/platform/ScrollableArea.h ('k') | Source/core/rendering/RenderLayer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderLayer.h
diff --git a/Source/core/rendering/RenderLayer.h b/Source/core/rendering/RenderLayer.h
index 6b1d625869c7c26fc4a934cbeb41f804a46bed44..cac2d0e065a8fdce7afb08d777ac808fcc003b70 100644
--- a/Source/core/rendering/RenderLayer.h
+++ b/Source/core/rendering/RenderLayer.h
@@ -602,14 +602,16 @@ public:
// Part of the issue is with subtree relayout: we don't check if our ancestors have some descendant flags dirty, missing some updates.
bool hasSelfPaintingLayerDescendant() const { return m_hasSelfPaintingLayerDescendant; }
- // This returns true if we have an out of flow positioned descendant whose
- // containing block is not a descendant of ours. If this is true, we cannot
- // automatically opt into composited scrolling since this out of flow
- // positioned descendant would become clipped by us, possibly altering the
- // rendering of the page.
- // FIXME: We should ASSERT(!m_hasOutOfFlowPositionedDescendantDirty); here but we may hit the same bugs as visible content above.
+ // FIXME: We should ASSERT(!m_hasOutOfFlowPositionedDescendantDirty) here. See above.
bool hasOutOfFlowPositionedDescendant() const { return m_hasOutOfFlowPositionedDescendant; }
+ void setHasOutOfFlowPositionedDescendant(bool hasDescendant) { m_hasOutOfFlowPositionedDescendant = hasDescendant; }
+ void setHasOutOfFlowPositionedDescendantDirty(bool dirty) { m_hasOutOfFlowPositionedDescendantDirty = dirty; }
+
+ bool hasUnclippedDescendant() const { return m_hasUnclippedDescendant; }
+ void setHasUnclippedDescendant(bool hasDescendant) { m_hasUnclippedDescendant = hasDescendant; }
+ void updateHasUnclippedDescendant();
+
// Gets the nearest enclosing positioned ancestor layer (also includes
// the <html> layer and the root layer).
RenderLayer* enclosingPositionedAncestor() const;
@@ -872,6 +874,7 @@ public:
CompositedScrollingAlwaysOn = 1,
CompositedScrollingAlwaysOff = 2
};
+
void setForceNeedsCompositedScrolling(ForceNeedsCompositedScrollingMode);
private:
@@ -892,6 +895,9 @@ private:
void setAncestorChainHasSelfPaintingLayerDescendant();
void dirtyAncestorChainHasSelfPaintingLayerDescendantStatus();
+ void setAncestorChainHasOutOfFlowPositionedDescendant();
+ void dirtyAncestorChainHasOutOfFlowPositionedDescendantStatus();
+
bool acceleratedCompositingForOverflowScrollEnabled() const;
void updateDescendantsAreContiguousInStackingOrder();
void updateDescendantsAreContiguousInStackingOrderRecursive(const HashMap<const RenderLayer*, int>&, int& minIndex, int& maxIndex, int& count, bool firstIteration);
@@ -916,11 +922,10 @@ private:
void updateScrollbarsAfterStyleChange(const RenderStyle* oldStyle);
void updateScrollbarsAfterLayout();
- void setAncestorChainHasOutOfFlowPositionedDescendant(RenderObject* containingBlock);
- void dirtyAncestorChainHasOutOfFlowPositionedDescendantStatus();
void updateOutOfFlowPositioned(const RenderStyle* oldStyle);
- void updateNeedsCompositedScrolling();
+ virtual void updateNeedsCompositedScrolling() OVERRIDE;
+ void setNeedsCompositedScrolling(bool);
void didUpdateNeedsCompositedScrolling();
// Returns true if the position changed.
@@ -1085,7 +1090,7 @@ private:
void dirtyAncestorChainVisibleDescendantStatus();
void setAncestorChainHasVisibleDescendant();
- void updateDescendantDependentFlags(HashSet<const RenderObject*>* outOfFlowDescendantContainingBlocks = 0);
+ void updateDescendantDependentFlags();
// This flag is computed by RenderLayerCompositor, which knows more about 3d hierarchies than we do.
void setHas3DTransformedDescendant(bool b) { m_has3DTransformedDescendant = b; }
@@ -1173,12 +1178,15 @@ protected:
bool m_hasSelfPaintingLayerDescendant : 1;
bool m_hasSelfPaintingLayerDescendantDirty : 1;
- // If we have no out of flow positioned descendants and no non-descendant
- // appears between our descendants in stacking order, then we may become a
- // stacking context.
bool m_hasOutOfFlowPositionedDescendant : 1;
bool m_hasOutOfFlowPositionedDescendantDirty : 1;
+ // This is true if we have an out-of-flow positioned descendant whose
+ // containing block is our ancestor. If this is the case, the descendant
+ // may fall outside of our clip preventing things like opting into
+ // composited scrolling (which causes clipping of all descendants).
+ bool m_hasUnclippedDescendant : 1;
+
bool m_needsCompositedScrolling : 1;
// If this is true, then no non-descendant appears between any of our
« no previous file with comments | « Source/core/platform/ScrollableArea.h ('k') | Source/core/rendering/RenderLayer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698