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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 class RenderInline; | 60 class RenderInline; |
61 class RenderBlock; | 61 class RenderBlock; |
62 class RenderFlowThread; | 62 class RenderFlowThread; |
63 class RenderGeometryMap; | 63 class RenderGeometryMap; |
64 class RenderLayer; | 64 class RenderLayer; |
65 class RenderLayerModelObject; | 65 class RenderLayerModelObject; |
66 class RenderNamedFlowThread; | 66 class RenderNamedFlowThread; |
67 class RenderSVGResourceContainer; | 67 class RenderSVGResourceContainer; |
68 class RenderTable; | 68 class RenderTable; |
69 class RenderTheme; | 69 class RenderTheme; |
| 70 class RenderView; |
70 class TransformState; | 71 class TransformState; |
71 | 72 |
72 struct PaintInfo; | 73 struct PaintInfo; |
73 | 74 |
74 enum CursorDirective { | 75 enum CursorDirective { |
75 SetCursorBasedOnStyle, | 76 SetCursorBasedOnStyle, |
76 SetCursor, | 77 SetCursor, |
77 DoNotSetCursor | 78 DoNotSetCursor |
78 }; | 79 }; |
79 | 80 |
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
667 | 668 |
668 // Recursive function that computes the size and position of this object and
all its descendants. | 669 // Recursive function that computes the size and position of this object and
all its descendants. |
669 virtual void layout(); | 670 virtual void layout(); |
670 | 671 |
671 /* This function performs a layout only if one is needed. */ | 672 /* This function performs a layout only if one is needed. */ |
672 void layoutIfNeeded() { if (needsLayout()) layout(); } | 673 void layoutIfNeeded() { if (needsLayout()) layout(); } |
673 | 674 |
674 void forceLayout(); | 675 void forceLayout(); |
675 void forceChildLayout(); | 676 void forceChildLayout(); |
676 | 677 |
| 678 // True if we can abort layout, leaving a partially laid out tree. |
| 679 virtual bool supportsPartialLayout() const { return false; } |
| 680 |
677 // used for element state updates that cannot be fixed with a | 681 // used for element state updates that cannot be fixed with a |
678 // repaint and do not need a relayout | 682 // repaint and do not need a relayout |
679 virtual void updateFromElement() { } | 683 virtual void updateFromElement() { } |
680 | 684 |
681 virtual void addAnnotatedRegions(Vector<AnnotatedRegionValue>&); | 685 virtual void addAnnotatedRegions(Vector<AnnotatedRegionValue>&); |
682 void collectAnnotatedRegions(Vector<AnnotatedRegionValue>&); | 686 void collectAnnotatedRegions(Vector<AnnotatedRegionValue>&); |
683 | 687 |
684 bool isComposited() const; | 688 bool isComposited() const; |
685 | 689 |
686 bool hitTest(const HitTestRequest&, HitTestResult&, const HitTestLocation& l
ocationInContainer, const LayoutPoint& accumulatedOffset, HitTestFilter = HitTes
tAll); | 690 bool hitTest(const HitTestRequest&, HitTestResult&, const HitTestLocation& l
ocationInContainer, const LayoutPoint& accumulatedOffset, HitTestFilter = HitTes
tAll); |
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1066 StyleColor styleColor = color; | 1070 StyleColor styleColor = color; |
1067 for (const RenderObject* object = this; UNLIKELY(styleColor.isCurrentCol
or()) && object && object->style(); object = object->parent()) | 1071 for (const RenderObject* object = this; UNLIKELY(styleColor.isCurrentCol
or()) && object && object->style(); object = object->parent()) |
1068 styleColor = object->style()->visitedDependentColor(CSSPropertyColor
); | 1072 styleColor = object->style()->visitedDependentColor(CSSPropertyColor
); |
1069 return styleColor; | 1073 return styleColor; |
1070 } | 1074 } |
1071 | 1075 |
1072 void removeShapeImageClient(ShapeValue*); | 1076 void removeShapeImageClient(ShapeValue*); |
1073 | 1077 |
1074 #ifndef NDEBUG | 1078 #ifndef NDEBUG |
1075 void checkBlockPositionedObjectsNeedLayout(); | 1079 void checkBlockPositionedObjectsNeedLayout(); |
| 1080 void checkNotInPartialLayout(); |
1076 #endif | 1081 #endif |
1077 | 1082 |
1078 RefPtr<RenderStyle> m_style; | 1083 RefPtr<RenderStyle> m_style; |
1079 | 1084 |
1080 Node* m_node; | 1085 Node* m_node; |
1081 | 1086 |
1082 RenderObject* m_parent; | 1087 RenderObject* m_parent; |
1083 RenderObject* m_previous; | 1088 RenderObject* m_previous; |
1084 RenderObject* m_next; | 1089 RenderObject* m_next; |
1085 | 1090 |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1236 return true; | 1241 return true; |
1237 } | 1242 } |
1238 | 1243 |
1239 inline bool RenderObject::isBeforeOrAfterContent() const | 1244 inline bool RenderObject::isBeforeOrAfterContent() const |
1240 { | 1245 { |
1241 return isBeforeContent() || isAfterContent(); | 1246 return isBeforeContent() || isAfterContent(); |
1242 } | 1247 } |
1243 | 1248 |
1244 inline void RenderObject::setNeedsLayout(MarkingBehavior markParents, SubtreeLay
outScope* layouter) | 1249 inline void RenderObject::setNeedsLayout(MarkingBehavior markParents, SubtreeLay
outScope* layouter) |
1245 { | 1250 { |
| 1251 #ifndef NDEBUG |
| 1252 checkNotInPartialLayout(); |
| 1253 #endif |
1246 ASSERT(!isSetNeedsLayoutForbidden()); | 1254 ASSERT(!isSetNeedsLayoutForbidden()); |
1247 bool alreadyNeededLayout = m_bitfields.needsLayout(); | 1255 bool alreadyNeededLayout = m_bitfields.needsLayout(); |
1248 m_bitfields.setNeedsLayout(true); | 1256 m_bitfields.setNeedsLayout(true); |
1249 if (!alreadyNeededLayout) { | 1257 if (!alreadyNeededLayout) { |
1250 if (markParents == MarkContainingBlockChain && (!layouter || layouter->r
oot() != this)) | 1258 if (markParents == MarkContainingBlockChain && (!layouter || layouter->r
oot() != this)) |
1251 markContainingBlocksForLayout(true, 0, layouter); | 1259 markContainingBlocksForLayout(true, 0, layouter); |
1252 if (hasLayer()) | 1260 if (hasLayer()) |
1253 setLayerNeedsFullRepaint(); | 1261 setLayerNeedsFullRepaint(); |
1254 } | 1262 } |
1255 } | 1263 } |
1256 | 1264 |
1257 inline void RenderObject::clearNeedsLayout() | 1265 inline void RenderObject::clearNeedsLayout() |
1258 { | 1266 { |
| 1267 #ifndef NDEBUG |
| 1268 checkNotInPartialLayout(); |
| 1269 #endif |
1259 m_bitfields.setNeedsLayout(false); | 1270 m_bitfields.setNeedsLayout(false); |
1260 setEverHadLayout(true); | 1271 setEverHadLayout(true); |
1261 setPosChildNeedsLayout(false); | 1272 setPosChildNeedsLayout(false); |
1262 setNeedsSimplifiedNormalFlowLayout(false); | 1273 setNeedsSimplifiedNormalFlowLayout(false); |
1263 setNormalChildNeedsLayout(false); | 1274 setNormalChildNeedsLayout(false); |
1264 setNeedsPositionedMovementLayout(false); | 1275 setNeedsPositionedMovementLayout(false); |
1265 setAncestorLineBoxDirty(false); | 1276 setAncestorLineBoxDirty(false); |
1266 #ifndef NDEBUG | 1277 #ifndef NDEBUG |
1267 checkBlockPositionedObjectsNeedLayout(); | 1278 checkBlockPositionedObjectsNeedLayout(); |
1268 #endif | 1279 #endif |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1393 // Outside the WebCore namespace for ease of invocation from gdb. | 1404 // Outside the WebCore namespace for ease of invocation from gdb. |
1394 void showTree(const WebCore::RenderObject*); | 1405 void showTree(const WebCore::RenderObject*); |
1395 void showLineTree(const WebCore::RenderObject*); | 1406 void showLineTree(const WebCore::RenderObject*); |
1396 void showRenderTree(const WebCore::RenderObject* object1); | 1407 void showRenderTree(const WebCore::RenderObject* object1); |
1397 // We don't make object2 an optional parameter so that showRenderTree | 1408 // We don't make object2 an optional parameter so that showRenderTree |
1398 // can be called from gdb easily. | 1409 // can be called from gdb easily. |
1399 void showRenderTree(const WebCore::RenderObject* object1, const WebCore::RenderO
bject* object2); | 1410 void showRenderTree(const WebCore::RenderObject* object1, const WebCore::RenderO
bject* object2); |
1400 #endif | 1411 #endif |
1401 | 1412 |
1402 #endif // RenderObject_h | 1413 #endif // RenderObject_h |
OLD | NEW |