Changeset 83066 in webkit
- Timestamp:
- Apr 6, 2011 10:06:14 AM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r83065 r83066 1 2011-04-06 Ryosuke Niwa <rniwa@webkit.org> 2 3 Reviewed by Dimitri Glazkov. 4 5 Split getBorderPaddingMargin into two functions 6 https://bugs.webkit.org/show_bug.cgi?id=57947 7 8 * rendering/RenderBlockLineLayout.cpp: 9 (WebCore::borderPaddingMarginStart): Extracted from getBorderPaddingMargin. 10 (WebCore::borderPaddingMarginEnd): Ditto. 11 (WebCore::inlineLogicalWidth): Calls borderPaddingMarginStart and borderPaddingMarginEnd. 12 (WebCore::RenderBlock::findNextLineBreak): Ditto. 13 1 14 2011-04-06 MORITA Hajime <morrita@google.com> 2 15 -
trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp
r83042 r83066 61 61 const unsigned cMaxLineDepth = 200; 62 62 63 static int getBorderPaddingMargin(RenderBoxModelObject* child, bool endOfInline) 64 { 65 if (endOfInline) 66 return child->marginEnd() + child->paddingEnd() + child->borderEnd(); 63 static inline int borderPaddingMarginStart(RenderBoxModelObject* child) 64 { 65 // FIXME: Should we call marginStartForChild instead? 67 66 return child->marginStart() + child->paddingStart() + child->borderStart(); 67 } 68 69 static inline int borderPaddingMarginEnd(RenderBoxModelObject* child) 70 { 71 return child->marginEnd() + child->paddingEnd() + child->borderEnd(); 68 72 } 69 73 … … 74 78 RenderObject* parent = child->parent(); 75 79 while (parent->isInline() && !parent->isInlineBlockOrInlineTable() && lineDepth++ < cMaxLineDepth) { 80 RenderBoxModelObject* parentAsBoxModelObject = toRenderBoxModelObject(parent); 81 ASSERT(parentAsBoxModelObject); 76 82 if (start && !child->previousSibling()) 77 extraWidth += getBorderPaddingMargin(toRenderBoxModelObject(parent), false);83 extraWidth += borderPaddingMarginStart(parentAsBoxModelObject); 78 84 if (end && !child->nextSibling()) 79 extraWidth += getBorderPaddingMargin(toRenderBoxModelObject(parent), true);85 extraWidth += borderPaddingMarginEnd(parentAsBoxModelObject); 80 86 child = parent; 81 87 parent = child->parent(); … … 1719 1725 } 1720 1726 1721 tmpW += flowBox->marginStart() + flowBox->borderStart() + flowBox->paddingStart() + 1722 flowBox->marginEnd() + flowBox->borderEnd() + flowBox->paddingEnd(); 1727 tmpW += borderPaddingMarginStart(flowBox) + borderPaddingMarginEnd(flowBox); 1723 1728 } else if (o->isReplaced()) { 1724 1729 RenderBox* replacedBox = toRenderBox(o);
Note: See TracChangeset
for help on using the changeset viewer.