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

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

Issue 160903002: Move RenderLayer repainting to repaint-after-layout framework. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: Created 6 years, 9 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) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2009 Google Inc. All rights reserved. 7 * Copyright (C) 2009 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 951 matching lines...) Expand 10 before | Expand all | Expand 10 after
962 RespectImageOrientationEnum shouldRespectImageOrientation() const; 962 RespectImageOrientationEnum shouldRespectImageOrientation() const;
963 963
964 bool isRelayoutBoundaryForInspector() const; 964 bool isRelayoutBoundaryForInspector() const;
965 965
966 const LayoutRect& newRepaintRect() const { return m_newRepaintRect; } 966 const LayoutRect& newRepaintRect() const { return m_newRepaintRect; }
967 void setNewRepaintRect(const LayoutRect& rect) { m_newRepaintRect = rect; } 967 void setNewRepaintRect(const LayoutRect& rect) { m_newRepaintRect = rect; }
968 968
969 const LayoutRect& oldRepaintRect() const { return m_oldRepaintRect; } 969 const LayoutRect& oldRepaintRect() const { return m_oldRepaintRect; }
970 void setOldRepaintRect(const LayoutRect& rect) { m_oldRepaintRect = rect; } 970 void setOldRepaintRect(const LayoutRect& rect) { m_oldRepaintRect = rect; }
971 971
972 const LayoutRect newOutlineRect();
973 void setNewOutlineRect(const LayoutRect&);
974
975 const LayoutRect oldOutlineRect();
976 void setOldOutlineRect(const LayoutRect&);
977
972 bool shouldDoFullRepaintAfterLayout() const { return m_bitfields.shouldDoFul lRepaintAfterLayout(); } 978 bool shouldDoFullRepaintAfterLayout() const { return m_bitfields.shouldDoFul lRepaintAfterLayout(); }
973 void setShouldDoFullRepaintAfterLayout(bool b) { m_bitfields.setShouldDoFull RepaintAfterLayout(b); } 979 void setShouldDoFullRepaintAfterLayout(bool b) { m_bitfields.setShouldDoFull RepaintAfterLayout(b); }
980
981 bool shouldDoFullRepaintIfSelfPaintingLayer() const { return m_bitfields.sho uldDoFullRepaintIfSelfPaintingLayer(); }
982 void setShouldDoFullRepaintIfSelfPaintingLayer(bool b) { m_bitfields.setShou ldDoFullRepaintIfSelfPaintingLayer(b); }
983
974 bool shouldRepaintOverflowIfNeeded() const { return m_bitfields.shouldRepain tOverflowIfNeeded(); } 984 bool shouldRepaintOverflowIfNeeded() const { return m_bitfields.shouldRepain tOverflowIfNeeded(); }
975 985
976 void clearRepaintRects() 986 void clearRepaintState();
977 {
978 setNewRepaintRect(LayoutRect());
979 setOldRepaintRect(LayoutRect());
980
981 setShouldDoFullRepaintAfterLayout(false);
982 setShouldRepaintOverflowIfNeeded(false);
983 setLayoutDidGetCalled(false);
984 }
985 987
986 // layoutDidGetCalled indicates whether this render object was re-laid-out 988 // layoutDidGetCalled indicates whether this render object was re-laid-out
987 // since the last call to setLayoutDidGetCalled(false) on this object. 989 // since the last call to setLayoutDidGetCalled(false) on this object.
988 bool layoutDidGetCalled() { return m_bitfields.layoutDidGetCalled(); } 990 bool layoutDidGetCalled() { return m_bitfields.layoutDidGetCalled(); }
989 void setLayoutDidGetCalled(bool b) { m_bitfields.setLayoutDidGetCalled(b); } 991 void setLayoutDidGetCalled(bool b) { m_bitfields.setLayoutDidGetCalled(b); }
990 992
991 bool shouldDisableLayoutState() const { return hasColumns() || hasTransform( ) || hasReflection() || style()->isFlippedBlocksWritingMode(); } 993 bool shouldDisableLayoutState() const { return hasColumns() || hasTransform( ) || hasReflection() || style()->isFlippedBlocksWritingMode(); }
992 994
993 protected: 995 protected:
994 inline bool layerCreationAllowedForSubtree() const; 996 inline bool layerCreationAllowedForSubtree() const;
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
1092 }; 1094 };
1093 1095
1094 public: 1096 public:
1095 RenderObjectBitfields(Node* node) 1097 RenderObjectBitfields(Node* node)
1096 : m_selfNeedsLayout(false) 1098 : m_selfNeedsLayout(false)
1097 // FIXME: shouldDoFullRepaintAfterLayout is needed because we reset 1099 // FIXME: shouldDoFullRepaintAfterLayout is needed because we reset
1098 // the layout bits before repaint when doing repaintAfterLayout. 1100 // the layout bits before repaint when doing repaintAfterLayout.
1099 // Holding the layout bits until after repaint would remove the need 1101 // Holding the layout bits until after repaint would remove the need
1100 // for this flag. 1102 // for this flag.
1101 , m_shouldDoFullRepaintAfterLayout(false) 1103 , m_shouldDoFullRepaintAfterLayout(false)
1104 , m_shouldDoFullRepaintIfSelfPaintingLayer(false)
Julien - ping for review 2014/03/04 18:22:10 Why do we care about self-painting layer in the RA
dsinclair 2014/03/04 19:21:52 Inside RenderBox::updateFromStyle() we had to disa
1102 , m_shouldRepaintOverflowIfNeeded(false) 1105 , m_shouldRepaintOverflowIfNeeded(false)
1103 , m_needsPositionedMovementLayout(false) 1106 , m_needsPositionedMovementLayout(false)
1104 , m_normalChildNeedsLayout(false) 1107 , m_normalChildNeedsLayout(false)
1105 , m_posChildNeedsLayout(false) 1108 , m_posChildNeedsLayout(false)
1106 , m_needsSimplifiedNormalFlowLayout(false) 1109 , m_needsSimplifiedNormalFlowLayout(false)
1107 , m_preferredLogicalWidthsDirty(false) 1110 , m_preferredLogicalWidthsDirty(false)
1108 , m_floating(false) 1111 , m_floating(false)
1109 , m_isAnonymous(!node) 1112 , m_isAnonymous(!node)
1110 , m_isText(false) 1113 , m_isText(false)
1111 , m_isBox(false) 1114 , m_isBox(false)
(...skipping 12 matching lines...) Expand all
1124 , m_hasColumns(false) 1127 , m_hasColumns(false)
1125 , m_layoutDidGetCalled(false) 1128 , m_layoutDidGetCalled(false)
1126 , m_positionedState(IsStaticallyPositioned) 1129 , m_positionedState(IsStaticallyPositioned)
1127 , m_selectionState(SelectionNone) 1130 , m_selectionState(SelectionNone)
1128 , m_flowThreadState(NotInsideFlowThread) 1131 , m_flowThreadState(NotInsideFlowThread)
1129 , m_boxDecorationState(NoBoxDecorations) 1132 , m_boxDecorationState(NoBoxDecorations)
1130 , m_hasPendingResourceUpdate(false) 1133 , m_hasPendingResourceUpdate(false)
1131 { 1134 {
1132 } 1135 }
1133 1136
1134 // 32 bits have been used in the first word, and 3 in the second. 1137 // 32 bits have been used in the first word, and 4 in the second.
1135 ADD_BOOLEAN_BITFIELD(selfNeedsLayout, SelfNeedsLayout); 1138 ADD_BOOLEAN_BITFIELD(selfNeedsLayout, SelfNeedsLayout);
1136 ADD_BOOLEAN_BITFIELD(shouldDoFullRepaintAfterLayout, ShouldDoFullRepaint AfterLayout); 1139 ADD_BOOLEAN_BITFIELD(shouldDoFullRepaintAfterLayout, ShouldDoFullRepaint AfterLayout);
1140 ADD_BOOLEAN_BITFIELD(shouldDoFullRepaintIfSelfPaintingLayer, ShouldDoFul lRepaintIfSelfPaintingLayer);
1137 ADD_BOOLEAN_BITFIELD(shouldRepaintOverflowIfNeeded, ShouldRepaintOverflo wIfNeeded); 1141 ADD_BOOLEAN_BITFIELD(shouldRepaintOverflowIfNeeded, ShouldRepaintOverflo wIfNeeded);
1138 ADD_BOOLEAN_BITFIELD(needsPositionedMovementLayout, NeedsPositionedMovem entLayout); 1142 ADD_BOOLEAN_BITFIELD(needsPositionedMovementLayout, NeedsPositionedMovem entLayout);
1139 ADD_BOOLEAN_BITFIELD(normalChildNeedsLayout, NormalChildNeedsLayout); 1143 ADD_BOOLEAN_BITFIELD(normalChildNeedsLayout, NormalChildNeedsLayout);
1140 ADD_BOOLEAN_BITFIELD(posChildNeedsLayout, PosChildNeedsLayout); 1144 ADD_BOOLEAN_BITFIELD(posChildNeedsLayout, PosChildNeedsLayout);
1141 ADD_BOOLEAN_BITFIELD(needsSimplifiedNormalFlowLayout, NeedsSimplifiedNor malFlowLayout); 1145 ADD_BOOLEAN_BITFIELD(needsSimplifiedNormalFlowLayout, NeedsSimplifiedNor malFlowLayout);
1142 ADD_BOOLEAN_BITFIELD(preferredLogicalWidthsDirty, PreferredLogicalWidths Dirty); 1146 ADD_BOOLEAN_BITFIELD(preferredLogicalWidthsDirty, PreferredLogicalWidths Dirty);
1143 ADD_BOOLEAN_BITFIELD(floating, Floating); 1147 ADD_BOOLEAN_BITFIELD(floating, Floating);
1144 1148
1145 ADD_BOOLEAN_BITFIELD(isAnonymous, IsAnonymous); 1149 ADD_BOOLEAN_BITFIELD(isAnonymous, IsAnonymous);
1146 ADD_BOOLEAN_BITFIELD(isText, IsText); 1150 ADD_BOOLEAN_BITFIELD(isText, IsText);
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
1419 void showTree(const WebCore::RenderObject*); 1423 void showTree(const WebCore::RenderObject*);
1420 void showLineTree(const WebCore::RenderObject*); 1424 void showLineTree(const WebCore::RenderObject*);
1421 void showRenderTree(const WebCore::RenderObject* object1); 1425 void showRenderTree(const WebCore::RenderObject* object1);
1422 // We don't make object2 an optional parameter so that showRenderTree 1426 // We don't make object2 an optional parameter so that showRenderTree
1423 // can be called from gdb easily. 1427 // can be called from gdb easily.
1424 void showRenderTree(const WebCore::RenderObject* object1, const WebCore::RenderO bject* object2); 1428 void showRenderTree(const WebCore::RenderObject* object1, const WebCore::RenderO bject* object2);
1425 1429
1426 #endif 1430 #endif
1427 1431
1428 #endif // RenderObject_h 1432 #endif // RenderObject_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698