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 593 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. | 604 // 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 | 605 // If repaintContainer and repaintContainerSkipped are not null, on return * repaintContainerSkipped |
606 // is true if the renderer returned is an ancestor of repaintContainer. | 606 // is true if the renderer returned is an ancestor of repaintContainer. |
607 RenderObject* container(const RenderLayerModelObject* repaintContainer = 0, bool* repaintContainerSkipped = 0) const; | 607 RenderObject* container(const RenderLayerModelObject* repaintContainer = 0, bool* repaintContainerSkipped = 0) const; |
608 | 608 |
609 virtual RenderObject* hoverAncestor() const { return parent(); } | 609 virtual RenderObject* hoverAncestor() const { return parent(); } |
610 | 610 |
611 Element* offsetParent() const; | 611 Element* offsetParent() const; |
612 | 612 |
613 void markContainingBlocksForLayout(bool scheduleRelayout = true, RenderObjec t* newRoot = 0, SubtreeLayoutScope* = 0); | 613 void markContainingBlocksForLayout(bool scheduleRelayout = true, RenderObjec t* newRoot = 0, SubtreeLayoutScope* = 0); |
614 void setNeedsLayout(MarkingBehavior = MarkContainingBlockChain, SubtreeLayou tScope* = 0); | 614 void setNeedsLayout(MarkingBehavior = MarkContainingBlockChain, SubtreeLayou tScope* = 0, bool fullRepaintLayer = true); |
ojan
2014/03/28 01:51:36
We typically don't do booleans like this. This sho
Xianzhu
2014/03/28 16:26:01
Done.
| |
615 void clearNeedsLayout(); | 615 void clearNeedsLayout(); |
616 void setChildNeedsLayout(MarkingBehavior = MarkContainingBlockChain, Subtree LayoutScope* = 0); | 616 void setChildNeedsLayout(MarkingBehavior = MarkContainingBlockChain, Subtree LayoutScope* = 0); |
617 void setNeedsPositionedMovementLayout(); | 617 void setNeedsPositionedMovementLayout(); |
618 void setNeedsSimplifiedNormalFlowLayout(); | 618 void setNeedsSimplifiedNormalFlowLayout(); |
619 void setPreferredLogicalWidthsDirty(MarkingBehavior = MarkContainingBlockCha in); | 619 void setPreferredLogicalWidthsDirty(MarkingBehavior = MarkContainingBlockCha in); |
620 void clearPreferredLogicalWidthsDirty(); | 620 void clearPreferredLogicalWidthsDirty(); |
621 void invalidateContainerPreferredLogicalWidths(); | 621 void invalidateContainerPreferredLogicalWidths(); |
622 | 622 |
623 void setNeedsLayoutAndPrefWidthsRecalc() | 623 void setNeedsLayoutAndPrefWidthsRecalc() |
624 { | 624 { |
(...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1262 if (isText() && !isBR()) | 1262 if (isText() && !isBR()) |
1263 return false; | 1263 return false; |
1264 return true; | 1264 return true; |
1265 } | 1265 } |
1266 | 1266 |
1267 inline bool RenderObject::isBeforeOrAfterContent() const | 1267 inline bool RenderObject::isBeforeOrAfterContent() const |
1268 { | 1268 { |
1269 return isBeforeContent() || isAfterContent(); | 1269 return isBeforeContent() || isAfterContent(); |
1270 } | 1270 } |
1271 | 1271 |
1272 inline void RenderObject::setNeedsLayout(MarkingBehavior markParents, SubtreeLay outScope* layouter) | 1272 inline void RenderObject::setNeedsLayout(MarkingBehavior markParents, SubtreeLay outScope* layouter, bool fullRepaintLayer) |
1273 { | 1273 { |
1274 ASSERT(!isSetNeedsLayoutForbidden()); | 1274 ASSERT(!isSetNeedsLayoutForbidden()); |
1275 bool alreadyNeededLayout = m_bitfields.selfNeedsLayout(); | 1275 bool alreadyNeededLayout = m_bitfields.selfNeedsLayout(); |
1276 setSelfNeedsLayout(true); | 1276 setSelfNeedsLayout(true); |
1277 if (!alreadyNeededLayout) { | 1277 if (!alreadyNeededLayout) { |
1278 if (markParents == MarkContainingBlockChain && (!layouter || layouter->r oot() != this)) | 1278 if (markParents == MarkContainingBlockChain && (!layouter || layouter->r oot() != this)) |
1279 markContainingBlocksForLayout(true, 0, layouter); | 1279 markContainingBlocksForLayout(true, 0, layouter); |
1280 if (hasLayer()) | 1280 if (fullRepaintLayer && hasLayer()) |
1281 setLayerNeedsFullRepaint(); | 1281 setLayerNeedsFullRepaint(); |
ojan
2014/03/28 01:51:36
Really this code is wrong. I think we should proba
Xianzhu
2014/03/28 16:26:01
Done.
trchen@ is working on separating repaint an
| |
1282 } | 1282 } |
1283 } | 1283 } |
1284 | 1284 |
1285 inline void RenderObject::clearNeedsLayout() | 1285 inline void RenderObject::clearNeedsLayout() |
1286 { | 1286 { |
1287 setSelfNeedsLayout(false); | 1287 setSelfNeedsLayout(false); |
1288 setEverHadLayout(true); | 1288 setEverHadLayout(true); |
1289 setPosChildNeedsLayout(false); | 1289 setPosChildNeedsLayout(false); |
1290 setNeedsSimplifiedNormalFlowLayout(false); | 1290 setNeedsSimplifiedNormalFlowLayout(false); |
1291 setNormalChildNeedsLayout(false); | 1291 setNormalChildNeedsLayout(false); |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1426 void showTree(const WebCore::RenderObject*); | 1426 void showTree(const WebCore::RenderObject*); |
1427 void showLineTree(const WebCore::RenderObject*); | 1427 void showLineTree(const WebCore::RenderObject*); |
1428 void showRenderTree(const WebCore::RenderObject* object1); | 1428 void showRenderTree(const WebCore::RenderObject* object1); |
1429 // We don't make object2 an optional parameter so that showRenderTree | 1429 // We don't make object2 an optional parameter so that showRenderTree |
1430 // can be called from gdb easily. | 1430 // can be called from gdb easily. |
1431 void showRenderTree(const WebCore::RenderObject* object1, const WebCore::RenderO bject* object2); | 1431 void showRenderTree(const WebCore::RenderObject* object1, const WebCore::RenderO bject* object2); |
1432 | 1432 |
1433 #endif | 1433 #endif |
1434 | 1434 |
1435 #endif // RenderObject_h | 1435 #endif // RenderObject_h |
OLD | NEW |