OLD | NEW |
---|---|
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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
97 BSRight, | 97 BSRight, |
98 BSBottom, | 98 BSBottom, |
99 BSLeft | 99 BSLeft |
100 }; | 100 }; |
101 | 101 |
102 enum MarkingBehavior { | 102 enum MarkingBehavior { |
103 MarkOnlyThis, | 103 MarkOnlyThis, |
104 MarkContainingBlockChain, | 104 MarkContainingBlockChain, |
105 }; | 105 }; |
106 | 106 |
107 enum RepaintLayerBehavior { | |
108 RepaintLayer, | |
109 DontRepaintLayer, | |
110 }; | |
111 | |
107 enum MapCoordinatesMode { | 112 enum MapCoordinatesMode { |
108 IsFixed = 1 << 0, | 113 IsFixed = 1 << 0, |
109 UseTransforms = 1 << 1, | 114 UseTransforms = 1 << 1, |
110 ApplyContainerFlip = 1 << 2, | 115 ApplyContainerFlip = 1 << 2, |
111 TraverseDocumentBoundaries = 1 << 3, | 116 TraverseDocumentBoundaries = 1 << 3, |
112 }; | 117 }; |
113 typedef unsigned MapCoordinatesFlags; | 118 typedef unsigned MapCoordinatesFlags; |
114 | 119 |
115 const int caretWidth = 1; | 120 const int caretWidth = 1; |
116 | 121 |
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
604 // Returns the object containing this one. Can be different from parent for positioned elements. | 609 // Returns the object containing this one. Can be different from parent for positioned elements. |
605 // If repaintContainer and repaintContainerSkipped are not null, on return * repaintContainerSkipped | 610 // If repaintContainer and repaintContainerSkipped are not null, on return * repaintContainerSkipped |
606 // is true if the renderer returned is an ancestor of repaintContainer. | 611 // is true if the renderer returned is an ancestor of repaintContainer. |
607 RenderObject* container(const RenderLayerModelObject* repaintContainer = 0, bool* repaintContainerSkipped = 0) const; | 612 RenderObject* container(const RenderLayerModelObject* repaintContainer = 0, bool* repaintContainerSkipped = 0) const; |
608 | 613 |
609 virtual RenderObject* hoverAncestor() const { return parent(); } | 614 virtual RenderObject* hoverAncestor() const { return parent(); } |
610 | 615 |
611 Element* offsetParent() const; | 616 Element* offsetParent() const; |
612 | 617 |
613 void markContainingBlocksForLayout(bool scheduleRelayout = true, RenderObjec t* newRoot = 0, SubtreeLayoutScope* = 0); | 618 void markContainingBlocksForLayout(bool scheduleRelayout = true, RenderObjec t* newRoot = 0, SubtreeLayoutScope* = 0); |
614 void setNeedsLayout(MarkingBehavior = MarkContainingBlockChain, SubtreeLayou tScope* = 0); | 619 void setNeedsLayout(MarkingBehavior = MarkContainingBlockChain, SubtreeLayou tScope* = 0, RepaintLayerBehavior = RepaintLayer); |
615 void clearNeedsLayout(); | 620 void clearNeedsLayout(); |
616 void setChildNeedsLayout(MarkingBehavior = MarkContainingBlockChain, Subtree LayoutScope* = 0); | 621 void setChildNeedsLayout(MarkingBehavior = MarkContainingBlockChain, Subtree LayoutScope* = 0); |
617 void setNeedsPositionedMovementLayout(); | 622 void setNeedsPositionedMovementLayout(); |
618 void setNeedsSimplifiedNormalFlowLayout(); | 623 void setNeedsSimplifiedNormalFlowLayout(); |
619 void setPreferredLogicalWidthsDirty(MarkingBehavior = MarkContainingBlockCha in); | 624 void setPreferredLogicalWidthsDirty(MarkingBehavior = MarkContainingBlockCha in); |
620 void clearPreferredLogicalWidthsDirty(); | 625 void clearPreferredLogicalWidthsDirty(); |
621 void invalidateContainerPreferredLogicalWidths(); | 626 void invalidateContainerPreferredLogicalWidths(); |
622 | 627 |
623 void setNeedsLayoutAndPrefWidthsRecalc() | 628 void setNeedsLayoutAndPrefWidthsRecalc() |
624 { | 629 { |
(...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1262 if (isText() && !isBR()) | 1267 if (isText() && !isBR()) |
1263 return false; | 1268 return false; |
1264 return true; | 1269 return true; |
1265 } | 1270 } |
1266 | 1271 |
1267 inline bool RenderObject::isBeforeOrAfterContent() const | 1272 inline bool RenderObject::isBeforeOrAfterContent() const |
1268 { | 1273 { |
1269 return isBeforeContent() || isAfterContent(); | 1274 return isBeforeContent() || isAfterContent(); |
1270 } | 1275 } |
1271 | 1276 |
1272 inline void RenderObject::setNeedsLayout(MarkingBehavior markParents, SubtreeLay outScope* layouter) | 1277 inline void RenderObject::setNeedsLayout(MarkingBehavior markParents, SubtreeLay outScope* layouter, RepaintLayerBehavior repaintLayer) |
1273 { | 1278 { |
1274 ASSERT(!isSetNeedsLayoutForbidden()); | 1279 ASSERT(!isSetNeedsLayoutForbidden()); |
1275 bool alreadyNeededLayout = m_bitfields.selfNeedsLayout(); | 1280 bool alreadyNeededLayout = m_bitfields.selfNeedsLayout(); |
1276 setSelfNeedsLayout(true); | 1281 setSelfNeedsLayout(true); |
1277 if (!alreadyNeededLayout) { | 1282 if (!alreadyNeededLayout) { |
1278 if (markParents == MarkContainingBlockChain && (!layouter || layouter->r oot() != this)) | 1283 if (markParents == MarkContainingBlockChain && (!layouter || layouter->r oot() != this)) |
1279 markContainingBlocksForLayout(true, 0, layouter); | 1284 markContainingBlocksForLayout(true, 0, layouter); |
1280 if (hasLayer()) | 1285 // FIXME: This may be incorrect, but needed at least because StyleDiffer enceLayout implies repaint for now. |
1286 if (repaintLayer == RepaintLayer && hasLayer()) | |
eseidel
2014/03/28 16:36:41
This repaint call is just wrong IMO. See crbug.co
| |
1281 setLayerNeedsFullRepaint(); | 1287 setLayerNeedsFullRepaint(); |
1282 } | 1288 } |
1283 } | 1289 } |
1284 | 1290 |
1285 inline void RenderObject::clearNeedsLayout() | 1291 inline void RenderObject::clearNeedsLayout() |
1286 { | 1292 { |
1287 setSelfNeedsLayout(false); | 1293 setSelfNeedsLayout(false); |
1288 setEverHadLayout(true); | 1294 setEverHadLayout(true); |
1289 setPosChildNeedsLayout(false); | 1295 setPosChildNeedsLayout(false); |
1290 setNeedsSimplifiedNormalFlowLayout(false); | 1296 setNeedsSimplifiedNormalFlowLayout(false); |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1426 void showTree(const WebCore::RenderObject*); | 1432 void showTree(const WebCore::RenderObject*); |
1427 void showLineTree(const WebCore::RenderObject*); | 1433 void showLineTree(const WebCore::RenderObject*); |
1428 void showRenderTree(const WebCore::RenderObject* object1); | 1434 void showRenderTree(const WebCore::RenderObject* object1); |
1429 // We don't make object2 an optional parameter so that showRenderTree | 1435 // We don't make object2 an optional parameter so that showRenderTree |
1430 // can be called from gdb easily. | 1436 // can be called from gdb easily. |
1431 void showRenderTree(const WebCore::RenderObject* object1, const WebCore::RenderO bject* object2); | 1437 void showRenderTree(const WebCore::RenderObject* object1, const WebCore::RenderO bject* object2); |
1432 | 1438 |
1433 #endif | 1439 #endif |
1434 | 1440 |
1435 #endif // RenderObject_h | 1441 #endif // RenderObject_h |
OLD | NEW |