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 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 | 261 |
262 // Called when an object that was floating or positioned becomes a normal fl
ow object | 262 // Called when an object that was floating or positioned becomes a normal fl
ow object |
263 // again. We have to make sure the render tree updates as needed to accommo
date the new | 263 // again. We have to make sure the render tree updates as needed to accommo
date the new |
264 // normal flow object. | 264 // normal flow object. |
265 void handleDynamicFloatPositionChange(); | 265 void handleDynamicFloatPositionChange(); |
266 | 266 |
267 // RenderObject tree manipulation | 267 // RenderObject tree manipulation |
268 ////////////////////////////////////////// | 268 ////////////////////////////////////////// |
269 virtual bool canHaveChildren() const { return virtualChildren(); } | 269 virtual bool canHaveChildren() const { return virtualChildren(); } |
270 virtual bool canHaveGeneratedChildren() const; | 270 virtual bool canHaveGeneratedChildren() const; |
271 virtual bool isChildAllowed(RenderObject*, RenderStyle*) const { return true
; } | 271 virtual bool isChildAllowed(RenderObject*, const RenderStyle*) const { retur
n true; } |
272 virtual void addChild(RenderObject* newChild, RenderObject* beforeChild = 0)
; | 272 virtual void addChild(RenderObject* newChild, RenderObject* beforeChild = 0)
; |
273 virtual void addChildIgnoringContinuation(RenderObject* newChild, RenderObje
ct* beforeChild = 0) { return addChild(newChild, beforeChild); } | 273 virtual void addChildIgnoringContinuation(RenderObject* newChild, RenderObje
ct* beforeChild = 0) { return addChild(newChild, beforeChild); } |
274 virtual void removeChild(RenderObject*); | 274 virtual void removeChild(RenderObject*); |
275 virtual bool createsAnonymousWrapper() const { return false; } | 275 virtual bool createsAnonymousWrapper() const { return false; } |
276 ////////////////////////////////////////// | 276 ////////////////////////////////////////// |
277 | 277 |
278 protected: | 278 protected: |
279 ////////////////////////////////////////// | 279 ////////////////////////////////////////// |
280 // Helper functions. Dangerous to use! | 280 // Helper functions. Dangerous to use! |
281 void setPreviousSibling(RenderObject* previous) { m_previous = previous; } | 281 void setPreviousSibling(RenderObject* previous) { m_previous = previous; } |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 void showRenderTreeForThis() const; | 314 void showRenderTreeForThis() const; |
315 void showLineTreeForThis() const; | 315 void showLineTreeForThis() const; |
316 | 316 |
317 void showRenderObject() const; | 317 void showRenderObject() const; |
318 // We don't make printedCharacters an optional parameter so that | 318 // We don't make printedCharacters an optional parameter so that |
319 // showRenderObject can be called from gdb easily. | 319 // showRenderObject can be called from gdb easily. |
320 void showRenderObject(int printedCharacters) const; | 320 void showRenderObject(int printedCharacters) const; |
321 void showRenderTreeAndMark(const RenderObject* markedObject1 = 0, const char
* markedLabel1 = 0, const RenderObject* markedObject2 = 0, const char* markedLab
el2 = 0, int depth = 0) const; | 321 void showRenderTreeAndMark(const RenderObject* markedObject1 = 0, const char
* markedLabel1 = 0, const RenderObject* markedObject2 = 0, const char* markedLab
el2 = 0, int depth = 0) const; |
322 #endif | 322 #endif |
323 | 323 |
324 static RenderObject* createObject(Element*, RenderStyle*); | 324 static RenderObject* createObject(Element*, const RenderStyle*); |
325 static unsigned instanceCount() { return s_instanceCount; } | 325 static unsigned instanceCount() { return s_instanceCount; } |
326 | 326 |
327 #if !ENABLE(OILPAN) | 327 #if !ENABLE(OILPAN) |
328 // RenderObjects are allocated out of the rendering partition. | 328 // RenderObjects are allocated out of the rendering partition. |
329 void* operator new(size_t); | 329 void* operator new(size_t); |
330 void operator delete(void*); | 330 void operator delete(void*); |
331 #endif | 331 #endif |
332 | 332 |
333 public: | 333 public: |
334 bool isPseudoElement() const { return node() && node()->isPseudoElement(); } | 334 bool isPseudoElement() const { return node() && node()->isPseudoElement(); } |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
596 bool hasHiddenBackface() const { return style() && style()->backfaceVisibili
ty() == BackfaceVisibilityHidden; } | 596 bool hasHiddenBackface() const { return style() && style()->backfaceVisibili
ty() == BackfaceVisibilityHidden; } |
597 | 597 |
598 bool hasFilter() const { return style() && style()->hasFilter(); } | 598 bool hasFilter() const { return style() && style()->hasFilter(); } |
599 | 599 |
600 bool hasShapeOutside() const { return style() && style()->shapeOutside(); } | 600 bool hasShapeOutside() const { return style() && style()->shapeOutside(); } |
601 | 601 |
602 inline bool preservesNewline() const; | 602 inline bool preservesNewline() const; |
603 | 603 |
604 // The pseudo element style can be cached or uncached. Use the cached metho
d if the pseudo element doesn't respect | 604 // The pseudo element style can be cached or uncached. Use the cached metho
d if the pseudo element doesn't respect |
605 // any pseudo classes (and therefore has no concept of changing state). | 605 // any pseudo classes (and therefore has no concept of changing state). |
606 RenderStyle* getCachedPseudoStyle(PseudoId, RenderStyle* parentStyle = 0) co
nst; | 606 RenderStyle* getCachedPseudoStyle(PseudoId, const RenderStyle* parentStyle =
0) const; |
607 PassRefPtr<RenderStyle> getUncachedPseudoStyle(const PseudoStyleRequest&, Re
nderStyle* parentStyle = 0, RenderStyle* ownStyle = 0) const; | 607 PassRefPtr<RenderStyle> getUncachedPseudoStyle(const PseudoStyleRequest&, co
nst RenderStyle* parentStyle = 0, const RenderStyle* ownStyle = 0) const; |
608 | 608 |
609 virtual void updateDragState(bool dragOn); | 609 virtual void updateDragState(bool dragOn); |
610 | 610 |
611 RenderView* view() const { return document().renderView(); }; | 611 RenderView* view() const { return document().renderView(); }; |
612 FrameView* frameView() const { return document().view(); }; | 612 FrameView* frameView() const { return document().view(); }; |
613 | 613 |
614 bool isRooted() const; | 614 bool isRooted() const; |
615 | 615 |
616 Node* node() const | 616 Node* node() const |
617 { | 617 { |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
789 virtual IntRect absoluteFocusRingBoundingBoxRect() const; | 789 virtual IntRect absoluteFocusRingBoundingBoxRect() const; |
790 | 790 |
791 static FloatRect absoluteBoundingBoxRectForRange(const Range*); | 791 static FloatRect absoluteBoundingBoxRectForRange(const Range*); |
792 | 792 |
793 // the rect that will be painted if this object is passed as the paintingRoo
t | 793 // the rect that will be painted if this object is passed as the paintingRoo
t |
794 LayoutRect paintingRootRect(LayoutRect& topLevelRect); | 794 LayoutRect paintingRootRect(LayoutRect& topLevelRect); |
795 | 795 |
796 virtual LayoutUnit minPreferredLogicalWidth() const { return 0; } | 796 virtual LayoutUnit minPreferredLogicalWidth() const { return 0; } |
797 virtual LayoutUnit maxPreferredLogicalWidth() const { return 0; } | 797 virtual LayoutUnit maxPreferredLogicalWidth() const { return 0; } |
798 | 798 |
799 RenderStyle* style() const { return m_style.get(); } | 799 const RenderStyle* style() const { return m_style.get(); } |
| 800 RenderStyle* deprecatedMutableStyle() const { return m_style.get(); } |
800 | 801 |
801 /* The two following methods are inlined in RenderObjectInlines.h */ | 802 /* The two following methods are inlined in RenderObjectInlines.h */ |
802 RenderStyle* firstLineStyle() const; | 803 const RenderStyle* firstLineStyle() const; |
803 RenderStyle* style(bool firstLine) const; | 804 const RenderStyle* style(bool firstLine) const; |
804 | 805 |
805 static inline Color resolveColor(const RenderStyle* styleToUse, int colorPro
perty) | 806 static inline Color resolveColor(const RenderStyle* styleToUse, int colorPro
perty) |
806 { | 807 { |
807 return styleToUse->visitedDependentColor(colorProperty); | 808 return styleToUse->visitedDependentColor(colorProperty); |
808 } | 809 } |
809 | 810 |
810 inline Color resolveColor(int colorProperty) const | 811 inline Color resolveColor(int colorProperty) const |
811 { | 812 { |
812 return style()->visitedDependentColor(colorProperty); | 813 return style()->visitedDependentColor(colorProperty); |
813 } | 814 } |
(...skipping 803 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1617 void showTree(const blink::RenderObject*); | 1618 void showTree(const blink::RenderObject*); |
1618 void showLineTree(const blink::RenderObject*); | 1619 void showLineTree(const blink::RenderObject*); |
1619 void showRenderTree(const blink::RenderObject* object1); | 1620 void showRenderTree(const blink::RenderObject* object1); |
1620 // We don't make object2 an optional parameter so that showRenderTree | 1621 // We don't make object2 an optional parameter so that showRenderTree |
1621 // can be called from gdb easily. | 1622 // can be called from gdb easily. |
1622 void showRenderTree(const blink::RenderObject* object1, const blink::RenderObjec
t* object2); | 1623 void showRenderTree(const blink::RenderObject* object1, const blink::RenderObjec
t* object2); |
1623 | 1624 |
1624 #endif | 1625 #endif |
1625 | 1626 |
1626 #endif // RenderObject_h | 1627 #endif // RenderObject_h |
OLD | NEW |