Changeset 47403 in webkit
- Timestamp:
- Aug 17, 2009 5:58:10 PM (15 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r47400 r47403 1 2009-08-17 Roland Steiner <rolandsteiner@google.com> 2 3 Reviewed by Eric Seidel. 4 5 Moved implementation of isAfterContent to RenderObject 6 (as inline method to avoid potential performance regressions). 7 8 BUG 28376 - [Cleanup] isAfterContent() implemented twice, should be member of RenderObject 9 (https://bugs.webkit.org/show_bug.cgi?id=28376) 10 11 * rendering/RenderBox.cpp: 12 * rendering/RenderBox.h: 13 * rendering/RenderInline.cpp: 14 * rendering/RenderObject.h: 15 (WebCore::RenderObject::isAfterContent): 16 1 17 2009-08-17 Shinichiro Hamaji <hamaji@chromium.org> 2 18 -
trunk/WebCore/rendering/RenderBox.cpp
r47163 r47403 2656 2656 } 2657 2657 2658 bool RenderBox::isAfterContent(RenderObject* child) const2659 {2660 return (child && child->style()->styleType() == AFTER && (!child->isText() || child->isBR()));2661 }2662 2663 2658 VisiblePosition RenderBox::positionForPoint(const IntPoint& point) 2664 2659 { -
trunk/WebCore/rendering/RenderBox.h
r47163 r47403 335 335 virtual void calcPrefWidths() { setPrefWidthsDirty(false); } 336 336 337 protected:338 bool isAfterContent(RenderObject* child) const;339 340 337 private: 341 338 // The width/height of the contents + borders + padding. The x/y location is relative to our container (which is not always our parent). -
trunk/WebCore/rendering/RenderInline.cpp
r46815 r47403 132 132 } 133 133 134 static inline bool isAfterContent(RenderObject* child)135 {136 if (!child)137 return false;138 if (child->style()->styleType() != AFTER)139 return false;140 // Text nodes don't have their own styles, so ignore the style on a text node.141 if (child->isText() && !child->isBR())142 return false;143 return true;144 }145 146 134 void RenderInline::addChild(RenderObject* newChild, RenderObject* beforeChild) 147 135 { -
trunk/WebCore/rendering/RenderObject.h
r45612 r47403 286 286 bool isHTMLMarquee() const; 287 287 288 inline bool isAfterContent() const; 289 static inline bool isAfterContent(const RenderObject* obj) { return obj && obj->isAfterContent(); } 290 288 291 bool childrenInline() const { return m_childrenInline; } 289 292 void setChildrenInline(bool b = true) { m_childrenInline = b; } … … 859 862 } 860 863 864 inline bool RenderObject::isAfterContent() const 865 { 866 if (style()->styleType() != AFTER) 867 return false; 868 // Text nodes don't have their own styles, so ignore the style on a text node. 869 if (isText() && !isBR()) 870 return false; 871 return true; 872 } 873 861 874 inline void RenderObject::setNeedsLayout(bool b, bool markParents) 862 875 {
Note: See TracChangeset
for help on using the changeset viewer.