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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
57 class RenderBoxModelObject; | 57 class RenderBoxModelObject; |
58 class RenderInline; | 58 class RenderInline; |
59 class RenderBlock; | 59 class RenderBlock; |
60 class RenderFlowThread; | 60 class RenderFlowThread; |
61 class RenderGeometryMap; | 61 class RenderGeometryMap; |
62 class RenderLayer; | 62 class RenderLayer; |
63 class RenderLayerModelObject; | 63 class RenderLayerModelObject; |
64 class RenderNamedFlowThread; | 64 class RenderNamedFlowThread; |
65 class RenderSVGResourceContainer; | 65 class RenderSVGResourceContainer; |
66 class RenderTable; | 66 class RenderTable; |
67 class RenderTheme; | |
68 class RenderView; | |
67 class TransformState; | 69 class TransformState; |
68 | 70 |
69 struct PaintInfo; | 71 struct PaintInfo; |
70 | 72 |
71 enum CursorDirective { | 73 enum CursorDirective { |
72 SetCursorBasedOnStyle, | 74 SetCursorBasedOnStyle, |
73 SetCursor, | 75 SetCursor, |
74 DoNotSetCursor | 76 DoNotSetCursor |
75 }; | 77 }; |
76 | 78 |
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
577 inline bool preservesNewline() const; | 579 inline bool preservesNewline() const; |
578 | 580 |
579 // The pseudo element style can be cached or uncached. Use the cached metho d if the pseudo element doesn't respect | 581 // The pseudo element style can be cached or uncached. Use the cached metho d if the pseudo element doesn't respect |
580 // any pseudo classes (and therefore has no concept of changing state). | 582 // any pseudo classes (and therefore has no concept of changing state). |
581 RenderStyle* getCachedPseudoStyle(PseudoId, RenderStyle* parentStyle = 0) co nst; | 583 RenderStyle* getCachedPseudoStyle(PseudoId, RenderStyle* parentStyle = 0) co nst; |
582 PassRefPtr<RenderStyle> getUncachedPseudoStyle(const PseudoStyleRequest&, Re nderStyle* parentStyle = 0, RenderStyle* ownStyle = 0) const; | 584 PassRefPtr<RenderStyle> getUncachedPseudoStyle(const PseudoStyleRequest&, Re nderStyle* parentStyle = 0, RenderStyle* ownStyle = 0) const; |
583 | 585 |
584 virtual void updateDragState(bool dragOn); | 586 virtual void updateDragState(bool dragOn); |
585 | 587 |
586 RenderView* view() const { return document().renderView(); }; | 588 RenderView* view() const { return document().renderView(); }; |
589 FrameView* frameView() const; | |
esprehn
2013/09/04 07:10:13
This should be inline in the header here just like
| |
587 | 590 |
588 // Returns true if this renderer is rooted, and optionally returns the hosti ng view (the root of the hierarchy). | 591 // Returns true if this renderer is rooted, and optionally returns the hosti ng view (the root of the hierarchy). |
589 bool isRooted(RenderView** = 0) const; | 592 bool isRooted(RenderView** = 0) const; |
590 | 593 |
591 Node* node() const { return isAnonymous() ? 0 : m_node; } | 594 Node* node() const { return isAnonymous() ? 0 : m_node; } |
592 Node* nonPseudoNode() const { return isPseudoElement() ? 0 : node(); } | 595 Node* nonPseudoNode() const { return isPseudoElement() ? 0 : node(); } |
593 | 596 |
594 // FIXME: Why does RenderWidget need this? | 597 // FIXME: Why does RenderWidget need this? |
595 void clearNode() { m_node = 0; } | 598 void clearNode() { m_node = 0; } |
596 | 599 |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
663 | 666 |
664 // Recursive function that computes the size and position of this object and all its descendants. | 667 // Recursive function that computes the size and position of this object and all its descendants. |
665 virtual void layout(); | 668 virtual void layout(); |
666 | 669 |
667 /* This function performs a layout only if one is needed. */ | 670 /* This function performs a layout only if one is needed. */ |
668 void layoutIfNeeded() { if (needsLayout()) layout(); } | 671 void layoutIfNeeded() { if (needsLayout()) layout(); } |
669 | 672 |
670 void forceLayout(); | 673 void forceLayout(); |
671 void forceChildLayout(); | 674 void forceChildLayout(); |
672 | 675 |
676 // True if we can abort layout, leaving a partially laid out tree. | |
677 virtual bool supportsPartialLayout() const { return false; } | |
678 | |
673 // used for element state updates that cannot be fixed with a | 679 // used for element state updates that cannot be fixed with a |
674 // repaint and do not need a relayout | 680 // repaint and do not need a relayout |
675 virtual void updateFromElement() { } | 681 virtual void updateFromElement() { } |
676 | 682 |
677 virtual void addAnnotatedRegions(Vector<AnnotatedRegionValue>&); | 683 virtual void addAnnotatedRegions(Vector<AnnotatedRegionValue>&); |
678 void collectAnnotatedRegions(Vector<AnnotatedRegionValue>&); | 684 void collectAnnotatedRegions(Vector<AnnotatedRegionValue>&); |
679 | 685 |
680 bool isComposited() const; | 686 bool isComposited() const; |
681 | 687 |
682 bool hitTest(const HitTestRequest&, HitTestResult&, const HitTestLocation& l ocationInContainer, const LayoutPoint& accumulatedOffset, HitTestFilter = HitTes tAll); | 688 bool hitTest(const HitTestRequest&, HitTestResult&, const HitTestLocation& l ocationInContainer, const LayoutPoint& accumulatedOffset, HitTestFilter = HitTes tAll); |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1063 StyleColor styleColor = color; | 1069 StyleColor styleColor = color; |
1064 for (const RenderObject* object = this; UNLIKELY(styleColor.isCurrentCol or()) && object && object->style(); object = object->parent()) | 1070 for (const RenderObject* object = this; UNLIKELY(styleColor.isCurrentCol or()) && object && object->style(); object = object->parent()) |
1065 styleColor = object->style()->visitedDependentColor(CSSPropertyColor ); | 1071 styleColor = object->style()->visitedDependentColor(CSSPropertyColor ); |
1066 return styleColor; | 1072 return styleColor; |
1067 } | 1073 } |
1068 | 1074 |
1069 void removeShapeImageClient(ShapeValue*); | 1075 void removeShapeImageClient(ShapeValue*); |
1070 | 1076 |
1071 #ifndef NDEBUG | 1077 #ifndef NDEBUG |
1072 void checkBlockPositionedObjectsNeedLayout(); | 1078 void checkBlockPositionedObjectsNeedLayout(); |
1079 void checkNotInPartialLayout(); | |
1073 #endif | 1080 #endif |
1074 | 1081 |
1075 RefPtr<RenderStyle> m_style; | 1082 RefPtr<RenderStyle> m_style; |
1076 | 1083 |
1077 Node* m_node; | 1084 Node* m_node; |
1078 | 1085 |
1079 RenderObject* m_parent; | 1086 RenderObject* m_parent; |
1080 RenderObject* m_previous; | 1087 RenderObject* m_previous; |
1081 RenderObject* m_next; | 1088 RenderObject* m_next; |
1082 | 1089 |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1233 return true; | 1240 return true; |
1234 } | 1241 } |
1235 | 1242 |
1236 inline bool RenderObject::isBeforeOrAfterContent() const | 1243 inline bool RenderObject::isBeforeOrAfterContent() const |
1237 { | 1244 { |
1238 return isBeforeContent() || isAfterContent(); | 1245 return isBeforeContent() || isAfterContent(); |
1239 } | 1246 } |
1240 | 1247 |
1241 inline void RenderObject::setNeedsLayout(MarkingBehavior markParents, SubtreeLay outScope* layouter) | 1248 inline void RenderObject::setNeedsLayout(MarkingBehavior markParents, SubtreeLay outScope* layouter) |
1242 { | 1249 { |
1250 #ifndef NDEBUG | |
1251 checkNotInPartialLayout(); | |
1252 #endif | |
1243 ASSERT(!isSetNeedsLayoutForbidden()); | 1253 ASSERT(!isSetNeedsLayoutForbidden()); |
1244 bool alreadyNeededLayout = m_bitfields.selfNeedsLayout(); | 1254 bool alreadyNeededLayout = m_bitfields.selfNeedsLayout(); |
1245 setSelfNeedsLayout(true); | 1255 setSelfNeedsLayout(true); |
1246 if (!alreadyNeededLayout) { | 1256 if (!alreadyNeededLayout) { |
1247 if (markParents == MarkContainingBlockChain && (!layouter || layouter->r oot() != this)) | 1257 if (markParents == MarkContainingBlockChain && (!layouter || layouter->r oot() != this)) |
1248 markContainingBlocksForLayout(true, 0, layouter); | 1258 markContainingBlocksForLayout(true, 0, layouter); |
1249 if (hasLayer()) | 1259 if (hasLayer()) |
1250 setLayerNeedsFullRepaint(); | 1260 setLayerNeedsFullRepaint(); |
1251 } | 1261 } |
1252 } | 1262 } |
1253 | 1263 |
1254 inline void RenderObject::clearNeedsLayout() | 1264 inline void RenderObject::clearNeedsLayout() |
1255 { | 1265 { |
1266 #ifndef NDEBUG | |
1267 checkNotInPartialLayout(); | |
1268 #endif | |
1256 setSelfNeedsLayout(false); | 1269 setSelfNeedsLayout(false); |
1257 setEverHadLayout(true); | 1270 setEverHadLayout(true); |
1258 setPosChildNeedsLayout(false); | 1271 setPosChildNeedsLayout(false); |
1259 setNeedsSimplifiedNormalFlowLayout(false); | 1272 setNeedsSimplifiedNormalFlowLayout(false); |
1260 setNormalChildNeedsLayout(false); | 1273 setNormalChildNeedsLayout(false); |
1261 setNeedsPositionedMovementLayout(false); | 1274 setNeedsPositionedMovementLayout(false); |
1262 setAncestorLineBoxDirty(false); | 1275 setAncestorLineBoxDirty(false); |
1263 #ifndef NDEBUG | 1276 #ifndef NDEBUG |
1264 checkBlockPositionedObjectsNeedLayout(); | 1277 checkBlockPositionedObjectsNeedLayout(); |
1265 #endif | 1278 #endif |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1390 // Outside the WebCore namespace for ease of invocation from gdb. | 1403 // Outside the WebCore namespace for ease of invocation from gdb. |
1391 void showTree(const WebCore::RenderObject*); | 1404 void showTree(const WebCore::RenderObject*); |
1392 void showLineTree(const WebCore::RenderObject*); | 1405 void showLineTree(const WebCore::RenderObject*); |
1393 void showRenderTree(const WebCore::RenderObject* object1); | 1406 void showRenderTree(const WebCore::RenderObject* object1); |
1394 // We don't make object2 an optional parameter so that showRenderTree | 1407 // We don't make object2 an optional parameter so that showRenderTree |
1395 // can be called from gdb easily. | 1408 // can be called from gdb easily. |
1396 void showRenderTree(const WebCore::RenderObject* object1, const WebCore::RenderO bject* object2); | 1409 void showRenderTree(const WebCore::RenderObject* object1, const WebCore::RenderO bject* object2); |
1397 #endif | 1410 #endif |
1398 | 1411 |
1399 #endif // RenderObject_h | 1412 #endif // RenderObject_h |
OLD | NEW |