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

Side by Side Diff: Source/WebCore/rendering/RenderLayer.h

Issue 13913013: Only update composited scrolling state when necessary (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Adding more tests. Created 7 years, 8 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2003, 2009, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2009, 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
5 * 5 *
6 * Other contributors: 6 * Other contributors:
7 * Robert O'Callahan <roc+@cs.cmu.edu> 7 * Robert O'Callahan <roc+@cs.cmu.edu>
8 * David Baron <dbaron@fas.harvard.edu> 8 * David Baron <dbaron@fas.harvard.edu>
9 * Christian Biesinger <cbiesinger@web.de> 9 * Christian Biesinger <cbiesinger@web.de>
10 * Randall Jesup <rjesup@wgate.com> 10 * Randall Jesup <rjesup@wgate.com>
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 // A stacking container can have z-order lists. All stacking contexts are 490 // A stacking container can have z-order lists. All stacking contexts are
491 // stacking containers, but the converse is not true. Layers that use 491 // stacking containers, but the converse is not true. Layers that use
492 // composited scrolling are stacking containers, but they may not 492 // composited scrolling are stacking containers, but they may not
493 // necessarily be stacking contexts. 493 // necessarily be stacking contexts.
494 bool isStackingContainer() const { return isStackingContext() || needsCompos itedScrolling(); } 494 bool isStackingContainer() const { return isStackingContext() || needsCompos itedScrolling(); }
495 495
496 // Gets the enclosing stacking container for this layer, excluding this 496 // Gets the enclosing stacking container for this layer, excluding this
497 // layer itself. 497 // layer itself.
498 RenderLayer* stackingContainer() const; 498 RenderLayer* stackingContainer() const;
499 499
500 // Gets the enclosing stacking context for this layer, excluding this
501 // layer itself.
502 RenderLayer* stackingContext() const;
503
500 // Gets the enclosing stacking container for this layer, possibly the layer 504 // Gets the enclosing stacking container for this layer, possibly the layer
501 // itself, if it is a stacking container. 505 // itself, if it is a stacking container.
502 RenderLayer* enclosingStackingContainer() { return isStackingContainer() ? t his : stackingContainer(); } 506 RenderLayer* enclosingStackingContainer() { return isStackingContainer() ? t his : stackingContainer(); }
503 507
504 void dirtyZOrderLists(); 508 void dirtyZOrderLists();
505 void dirtyStackingContainerZOrderLists(); 509 void dirtyStackingContainerZOrderLists();
506 510
507 Vector<RenderLayer*>* posZOrderList() const 511 Vector<RenderLayer*>* posZOrderList() const
508 { 512 {
509 ASSERT(!m_zOrderListsDirty); 513 ASSERT(!m_zOrderListsDirty);
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
857 void computeRepaintRectsIncludingDescendants(); 861 void computeRepaintRectsIncludingDescendants();
858 void clearRepaintRects(); 862 void clearRepaintRects();
859 863
860 void clipToRect(RenderLayer* rootLayer, GraphicsContext*, const LayoutRect& paintDirtyRect, const ClipRect&, 864 void clipToRect(RenderLayer* rootLayer, GraphicsContext*, const LayoutRect& paintDirtyRect, const ClipRect&,
861 BorderRadiusClippingRule = IncludeSelfForBorderRadius); 865 BorderRadiusClippingRule = IncludeSelfForBorderRadius);
862 void restoreClip(GraphicsContext*, const LayoutRect& paintDirtyRect, const C lipRect&); 866 void restoreClip(GraphicsContext*, const LayoutRect& paintDirtyRect, const C lipRect&);
863 867
864 bool shouldRepaintAfterLayout() const; 868 bool shouldRepaintAfterLayout() const;
865 869
866 void updateSelfPaintingLayer(); 870 void updateSelfPaintingLayer();
871 void updateIsNormalFlowOnly();
872 void updateVisibilityAfterStyleChange(const RenderStyle* oldStyle);
867 void updateStackingContextsAfterStyleChange(const RenderStyle* oldStyle); 873 void updateStackingContextsAfterStyleChange(const RenderStyle* oldStyle);
868 874
869 void updateScrollbarsAfterStyleChange(const RenderStyle* oldStyle); 875 void updateScrollbarsAfterStyleChange(const RenderStyle* oldStyle);
870 void updateScrollbarsAfterLayout(); 876 void updateScrollbarsAfterLayout();
871 877
872 void setAncestorChainHasOutOfFlowPositionedDescendant(RenderObject* containi ngBlock); 878 void setAncestorChainHasOutOfFlowPositionedDescendant(RenderObject* containi ngBlock);
873 void dirtyAncestorChainHasOutOfFlowPositionedDescendantStatus(); 879 void dirtyAncestorChainHasOutOfFlowPositionedDescendantStatus();
874 void updateOutOfFlowPositioned(const RenderStyle* oldStyle); 880 void updateOutOfFlowPositioned(const RenderStyle* oldStyle);
875 881
876 void updateNeedsCompositedScrolling(); 882 void updateNeedsCompositedScrolling();
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
1140 // stacking context. 1146 // stacking context.
1141 bool m_hasOutOfFlowPositionedDescendant : 1; 1147 bool m_hasOutOfFlowPositionedDescendant : 1;
1142 bool m_hasOutOfFlowPositionedDescendantDirty : 1; 1148 bool m_hasOutOfFlowPositionedDescendantDirty : 1;
1143 1149
1144 bool m_needsCompositedScrolling : 1; 1150 bool m_needsCompositedScrolling : 1;
1145 1151
1146 // If this is true, then no non-descendant appears between any of our 1152 // If this is true, then no non-descendant appears between any of our
1147 // descendants in stacking order. This is one of the requirements of being 1153 // descendants in stacking order. This is one of the requirements of being
1148 // able to safely become a stacking context. 1154 // able to safely become a stacking context.
1149 bool m_descendantsAreContiguousInStackingOrder : 1; 1155 bool m_descendantsAreContiguousInStackingOrder : 1;
1156 bool m_descendantsAreContiguousInStackingOrderDirty : 1;
1150 1157
1151 const bool m_isRootLayer : 1; 1158 const bool m_isRootLayer : 1;
1152 1159
1153 bool m_usedTransparency : 1; // Tracks whether we need to close a transparen t layer, i.e., whether 1160 bool m_usedTransparency : 1; // Tracks whether we need to close a transparen t layer, i.e., whether
1154 // we ended up painting this layer or any desce ndants (and therefore need to 1161 // we ended up painting this layer or any desce ndants (and therefore need to
1155 // blend). 1162 // blend).
1156 bool m_paintingInsideReflection : 1; // A state bit tracking if we are pain ting inside a replica. 1163 bool m_paintingInsideReflection : 1; // A state bit tracking if we are pain ting inside a replica.
1157 bool m_inOverflowRelayout : 1; 1164 bool m_inOverflowRelayout : 1;
1158 unsigned m_repaintStatus : 2; // RepaintStatus 1165 unsigned m_repaintStatus : 2; // RepaintStatus
1159 1166
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
1306 1313
1307 } // namespace WebCore 1314 } // namespace WebCore
1308 1315
1309 #ifndef NDEBUG 1316 #ifndef NDEBUG
1310 // Outside the WebCore namespace for ease of invocation from gdb. 1317 // Outside the WebCore namespace for ease of invocation from gdb.
1311 void showLayerTree(const WebCore::RenderLayer*); 1318 void showLayerTree(const WebCore::RenderLayer*);
1312 void showLayerTree(const WebCore::RenderObject*); 1319 void showLayerTree(const WebCore::RenderObject*);
1313 #endif 1320 #endif
1314 1321
1315 #endif // RenderLayer_h 1322 #endif // RenderLayer_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698