Changeset 119227 in webkit
- Timestamp:
- Jun 1, 2012 7:14:07 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r119221 r119227 1 2012-06-01 Dan Bernstein <mitz@apple.com> 2 3 Layout not updated after setting -webkit-line-clamp to none 4 https://bugs.webkit.org/show_bug.cgi?id=88049 5 6 Reviewed by Abhishek Arya. 7 8 * fast/flexbox/line-clamp-removed-dynamically-expected.html: Added. 9 * fast/flexbox/line-clamp-removed-dynamically.html: Added. 10 1 11 2012-06-01 Csaba Osztrogonác <ossy@webkit.org> 2 12 -
trunk/Source/WebCore/ChangeLog
r119226 r119227 1 2012-06-01 Dan Bernstein <mitz@apple.com> 2 3 Layout not updated after setting -webkit-line-clamp to none 4 https://bugs.webkit.org/show_bug.cgi?id=88049 5 6 Reviewed by Abhishek Arya. 7 8 Test: fast/flexbox/line-clamp-removed-dynamically.html 9 10 * rendering/RenderDeprecatedFlexibleBox.cpp: 11 (WebCore::RenderDeprecatedFlexibleBox::styleWillChange): Added. Calls clearLineClamp if 12 line-clamp will change to none. 13 (WebCore::RenderDeprecatedFlexibleBox::clearLineClamp): Added. Marks possibly-clamped 14 children for layout and clears truncation from blocks. 15 * rendering/RenderDeprecatedFlexibleBox.h: 16 1 17 2012-06-01 Sheriff Bot <webkit.review.bot@gmail.com> 2 18 -
trunk/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp
r117484 r119227 151 151 } 152 152 153 void RenderDeprecatedFlexibleBox::styleWillChange(StyleDifference diff, const RenderStyle* newStyle) 154 { 155 RenderStyle* oldStyle = style(); 156 if (oldStyle && !oldStyle->lineClamp().isNone() && newStyle->lineClamp().isNone()) 157 clearLineClamp(); 158 159 RenderBlock::styleWillChange(diff, newStyle); 160 } 161 153 162 void RenderDeprecatedFlexibleBox::calcHorizontalPrefWidths() 154 163 { … … 973 982 lastVisibleLine->placeEllipsis(anchorBox ? ellipsisAndSpaceStr : ellipsisStr, leftToRight, blockLeftEdge, blockRightEdge, totalWidth, anchorBox); 974 983 destBlock->setHasMarkupTruncation(true); 984 } 985 } 986 987 void RenderDeprecatedFlexibleBox::clearLineClamp() 988 { 989 FlexBoxIterator iterator(this); 990 for (RenderBox* child = iterator.first(); child; child = iterator.next()) { 991 if (childDoesNotAffectWidthOrFlexing(child)) 992 continue; 993 994 if ((child->isReplaced() && (child->style()->width().isPercent() || child->style()->height().isPercent())) 995 || (child->style()->height().isAuto() && child->isBlockFlow())) { 996 child->setChildNeedsLayout(true); 997 998 if (child->isRenderBlock()) { 999 toRenderBlock(child)->markPositionedObjectsForLayout(); 1000 toRenderBlock(child)->clearTruncation(); 1001 } 1002 } 975 1003 } 976 1004 } -
trunk/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.h
r118711 r119227 41 41 void calcVerticalPrefWidths(); 42 42 43 virtual void styleWillChange(StyleDifference, const RenderStyle* newStyle) OVERRIDE; 44 43 45 virtual void layoutBlock(bool relayoutChildren, LayoutUnit pageHeight = 0); 44 46 void layoutHorizontalBox(bool relayoutChildren); … … 65 67 private: 66 68 void applyLineClamp(FlexBoxIterator&, bool relayoutChildren); 69 void clearLineClamp(); 67 70 }; 68 71
Note: See TracChangeset
for help on using the changeset viewer.