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

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

Issue 14858004: Clean up the way layout tests force elements to opt in/out of composited scrolling. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 7 years, 6 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 | Annotate | Revision Log
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 849 matching lines...) Expand 10 before | Expand all | Expand 10 after
860 }; 860 };
861 861
862 void setViewportConstrainedNotCompositedReason(ViewportConstrainedNotComposi tedReason reason) { m_compositingProperties.viewportConstrainedNotCompositedReas on = reason; } 862 void setViewportConstrainedNotCompositedReason(ViewportConstrainedNotComposi tedReason reason) { m_compositingProperties.viewportConstrainedNotCompositedReas on = reason; }
863 ViewportConstrainedNotCompositedReason viewportConstrainedNotCompositedReaso n() const { return static_cast<ViewportConstrainedNotCompositedReason>(m_composi tingProperties.viewportConstrainedNotCompositedReason); } 863 ViewportConstrainedNotCompositedReason viewportConstrainedNotCompositedReaso n() const { return static_cast<ViewportConstrainedNotCompositedReason>(m_composi tingProperties.viewportConstrainedNotCompositedReason); }
864 864
865 bool isOutOfFlowRenderFlowThread() const { return renderer()->isOutOfFlowRen derFlowThread(); } 865 bool isOutOfFlowRenderFlowThread() const { return renderer()->isOutOfFlowRen derFlowThread(); }
866 866
867 enum PaintOrderListType {BeforePromote, AfterPromote}; 867 enum PaintOrderListType {BeforePromote, AfterPromote};
868 void computePaintOrderList(PaintOrderListType type, Vector<RefPtr<Node> >&); 868 void computePaintOrderList(PaintOrderListType type, Vector<RefPtr<Node> >&);
869 869
870 enum ForceNeedsCompositedScrollingMode {
871 DoNotForceCompositedScrolling = 0,
872 CompositedScrollingAlwaysOn = 1,
873 CompositedScrollingAlwaysOff = 2
874 };
875 void setForceNeedsCompositedScrolling(ForceNeedsCompositedScrollingMode);
876
870 private: 877 private:
871 enum CollectLayersBehavior { StopAtStackingContexts, StopAtStackingContainer s }; 878 enum CollectLayersBehavior { StopAtStackingContexts, StopAtStackingContainer s };
872 879
873 void updateZOrderLists(); 880 void updateZOrderLists();
874 void rebuildZOrderLists(); 881 void rebuildZOrderLists();
875 // See the comment for collectLayers for information about the layerToForceA sStackingContainer parameter. 882 // See the comment for collectLayers for information about the layerToForceA sStackingContainer parameter.
876 void rebuildZOrderLists(CollectLayersBehavior, OwnPtr<Vector<RenderLayer*> > &, OwnPtr<Vector<RenderLayer*> >&, const RenderLayer* layerToForceAsStackingCont ainer = 0); 883 void rebuildZOrderLists(CollectLayersBehavior, OwnPtr<Vector<RenderLayer*> > &, OwnPtr<Vector<RenderLayer*> >&, const RenderLayer* layerToForceAsStackingCont ainer = 0);
877 void clearZOrderLists(); 884 void clearZOrderLists();
878 885
879 void updateNormalFlowList(); 886 void updateNormalFlowList();
(...skipping 27 matching lines...) Expand all
907 void updateStackingContextsAfterStyleChange(const RenderStyle* oldStyle); 914 void updateStackingContextsAfterStyleChange(const RenderStyle* oldStyle);
908 915
909 void updateScrollbarsAfterStyleChange(const RenderStyle* oldStyle); 916 void updateScrollbarsAfterStyleChange(const RenderStyle* oldStyle);
910 void updateScrollbarsAfterLayout(); 917 void updateScrollbarsAfterLayout();
911 918
912 void setAncestorChainHasOutOfFlowPositionedDescendant(RenderObject* containi ngBlock); 919 void setAncestorChainHasOutOfFlowPositionedDescendant(RenderObject* containi ngBlock);
913 void dirtyAncestorChainHasOutOfFlowPositionedDescendantStatus(); 920 void dirtyAncestorChainHasOutOfFlowPositionedDescendantStatus();
914 void updateOutOfFlowPositioned(const RenderStyle* oldStyle); 921 void updateOutOfFlowPositioned(const RenderStyle* oldStyle);
915 922
916 void updateNeedsCompositedScrolling(); 923 void updateNeedsCompositedScrolling();
924 void didUpdateNeedsCompositedScrolling();
917 925
918 // Returns true if the position changed. 926 // Returns true if the position changed.
919 bool updateLayerPosition(); 927 bool updateLayerPosition();
920 928
921 void updateLayerPositions(RenderGeometryMap* = 0, UpdateLayerPositionsFlags = defaultFlags); 929 void updateLayerPositions(RenderGeometryMap* = 0, UpdateLayerPositionsFlags = defaultFlags);
922 930
923 enum UpdateLayerPositionsAfterScrollFlag { 931 enum UpdateLayerPositionsAfterScrollFlag {
924 NoFlag = 0, 932 NoFlag = 0,
925 IsOverflowScroll = 1 << 0, 933 IsOverflowScroll = 1 << 0,
926 HasSeenViewportConstrainedAncestor = 1 << 1, 934 HasSeenViewportConstrainedAncestor = 1 << 1,
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
1291 1299
1292 // The reason, if any exists, that a fixed-position layer is chosen not to be composited. 1300 // The reason, if any exists, that a fixed-position layer is chosen not to be composited.
1293 unsigned viewportConstrainedNotCompositedReason : 2; 1301 unsigned viewportConstrainedNotCompositedReason : 2;
1294 1302
1295 // Once computed, indicates all that a layer needs to become composited using the CompositingReasons enum bitfield. 1303 // Once computed, indicates all that a layer needs to become composited using the CompositingReasons enum bitfield.
1296 CompositingReasons compositingReasons; 1304 CompositingReasons compositingReasons;
1297 }; 1305 };
1298 1306
1299 CompositingProperties m_compositingProperties; 1307 CompositingProperties m_compositingProperties;
1300 1308
1309 ForceNeedsCompositedScrollingMode m_forceNeedsCompositedScrolling;
1310
1301 private: 1311 private:
1302 IntRect m_blockSelectionGapsBounds; 1312 IntRect m_blockSelectionGapsBounds;
1303 1313
1304 OwnPtr<RenderLayerBacking> m_backing; 1314 OwnPtr<RenderLayerBacking> m_backing;
1305 }; 1315 };
1306 1316
1307 inline void RenderLayer::clearZOrderLists() 1317 inline void RenderLayer::clearZOrderLists()
1308 { 1318 {
1309 ASSERT(!isStackingContainer()); 1319 ASSERT(!isStackingContainer());
1310 1320
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
1350 1360
1351 } // namespace WebCore 1361 } // namespace WebCore
1352 1362
1353 #ifndef NDEBUG 1363 #ifndef NDEBUG
1354 // Outside the WebCore namespace for ease of invocation from gdb. 1364 // Outside the WebCore namespace for ease of invocation from gdb.
1355 void showLayerTree(const WebCore::RenderLayer*); 1365 void showLayerTree(const WebCore::RenderLayer*);
1356 void showLayerTree(const WebCore::RenderObject*); 1366 void showLayerTree(const WebCore::RenderObject*);
1357 #endif 1367 #endif
1358 1368
1359 #endif // RenderLayer_h 1369 #endif // RenderLayer_h
OLDNEW
« no previous file with comments | « LayoutTests/compositing/overflow/build-paint-order-lists.html ('k') | Source/core/rendering/RenderLayer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698