Changeset 143225 in webkit
- Timestamp:
- Feb 18, 2013 8:48:39 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r143222 r143225 1 2013-02-18 Bear Travis <betravis@adobe.com> 2 3 [CSS Exclusions] Support outside-shape layout for shape-inside property 4 https://bugs.webkit.org/show_bug.cgi?id=102571 5 6 Reviewed by David Hyatt. 7 8 Test that the shape-outside value correctly propagates to shape-inside 9 when shape-inside has a value of 'outside-shape,' using both an 10 undefined and a simple shape outside value. 11 12 * fast/exclusions/shape-inside/shape-inside-outside-shape-expected.html: Added. 13 * fast/exclusions/shape-inside/shape-inside-outside-shape.html: Added. 14 1 15 2013-02-18 Zan Dobersek <zdobersek@igalia.com> 2 16 -
trunk/Source/WebCore/ChangeLog
r143224 r143225 1 2013-02-18 Bear Travis <betravis@adobe.com> 2 3 [CSS Exclusions] Support outside-shape layout for shape-inside property 4 https://bugs.webkit.org/show_bug.cgi?id=102571 5 6 Reviewed by David Hyatt. 7 8 A shape-inside value of 'outside-shape' should resolve to the value of 9 the shape-outside property for layout. This patch introduces a helper 10 method to resolve shape-inside in RenderStyle, and replaces calls to 11 RenderStyle::shapeInside() when the resolved (layout) value should be 12 used. 13 14 Test: fast/exclusions/shape-inside/shape-inside-outside-shape.html 15 16 * rendering/ExclusionShapeInfo.cpp: 17 (WebCore::::computedShape): Use the resolved shape-inside getter. 18 * rendering/ExclusionShapeInsideInfo.h: 19 (WebCore::ExclusionShapeInsideInfo::isEnabledFor): Ditto. 20 (WebCore::ExclusionShapeInsideInfo::ExclusionShapeInsideInfo): Ditto. 21 * rendering/RenderBlock.cpp: 22 (WebCore::RenderBlock::styleDidChange): Ditto. 23 (WebCore::RenderBlock::exclusionShapeInsideInfo): Ditto. 24 * rendering/style/RenderStyle.h: Add the resolved shape inside getter. 25 1 26 2013-02-18 Pavel Feldman <pfeldman@chromium.org> 2 27 -
trunk/Source/WebCore/rendering/ExclusionShapeInfo.cpp
r142164 r143225 55 55 } 56 56 57 template class ExclusionShapeInfo<RenderBlock, &RenderStyle:: shapeInside>;57 template class ExclusionShapeInfo<RenderBlock, &RenderStyle::resolvedShapeInside>; 58 58 template class ExclusionShapeInfo<RenderBox, &RenderStyle::shapeOutside>; 59 59 } -
trunk/Source/WebCore/rendering/ExclusionShapeInsideInfo.h
r143010 r143225 53 53 typedef Vector<LineSegmentRange> SegmentRangeList; 54 54 55 class ExclusionShapeInsideInfo : public ExclusionShapeInfo<RenderBlock, &RenderStyle:: shapeInside>, public MappedInfo<RenderBlock, ExclusionShapeInsideInfo> {55 class ExclusionShapeInsideInfo : public ExclusionShapeInfo<RenderBlock, &RenderStyle::resolvedShapeInside>, public MappedInfo<RenderBlock, ExclusionShapeInsideInfo> { 56 56 public: 57 57 static PassOwnPtr<ExclusionShapeInsideInfo> createInfo(const RenderBlock* renderer) { return adoptPtr(new ExclusionShapeInsideInfo(renderer)); } … … 60 60 { 61 61 // FIXME: Bug 89707: Enable shape inside for non-rectangular shapes 62 ExclusionShapeValue* shapeValue = renderer->style()-> shapeInside();62 ExclusionShapeValue* shapeValue = renderer->style()->resolvedShapeInside(); 63 63 BasicShape* shape = (shapeValue && shapeValue->type() == ExclusionShapeValue::SHAPE) ? shapeValue->shape() : 0; 64 64 return shape && shape->type() != BasicShape::BASIC_SHAPE_ELLIPSE; … … 90 90 91 91 private: 92 ExclusionShapeInsideInfo(const RenderBlock* renderer) : ExclusionShapeInfo<RenderBlock, &RenderStyle:: shapeInside>(renderer) { }92 ExclusionShapeInsideInfo(const RenderBlock* renderer) : ExclusionShapeInfo<RenderBlock, &RenderStyle::resolvedShapeInside>(renderer) { } 93 93 94 94 LayoutUnit m_shapeLineTop; -
trunk/Source/WebCore/rendering/RenderBlock.cpp
r143042 r143225 345 345 // FIXME: Bug 89993: Style changes should affect the ExclusionShapeInsideInfos for other render blocks that 346 346 // share the same ExclusionShapeInsideInfo 347 updateExclusionShapeInsideInfoAfterStyleChange(style()-> shapeInside(), oldStyle ? oldStyle->shapeInside() : 0);347 updateExclusionShapeInsideInfoAfterStyleChange(style()->resolvedShapeInside(), oldStyle ? oldStyle->resolvedShapeInside() : 0); 348 348 #endif 349 349 … … 1374 1374 ExclusionShapeInsideInfo* RenderBlock::exclusionShapeInsideInfo() const 1375 1375 { 1376 return style()-> shapeInside() && ExclusionShapeInsideInfo::isEnabledFor(this) ? ExclusionShapeInsideInfo::info(this) : 0;1376 return style()->resolvedShapeInside() && ExclusionShapeInsideInfo::isEnabledFor(this) ? ExclusionShapeInsideInfo::info(this) : 0; 1377 1377 } 1378 1378 -
trunk/Source/WebCore/rendering/style/RenderStyle.h
r142974 r143225 1422 1422 } 1423 1423 ExclusionShapeValue* shapeInside() const { return rareNonInheritedData->m_shapeInside.get(); } 1424 ExclusionShapeValue* resolvedShapeInside() const 1425 { 1426 ExclusionShapeValue* shapeInside = this->shapeInside(); 1427 if (shapeInside && shapeInside->type() == ExclusionShapeValue::OUTSIDE) 1428 return shapeOutside(); 1429 return shapeInside; 1430 } 1424 1431 1425 1432 void setShapeOutside(PassRefPtr<ExclusionShapeValue> value)
Note: See TracChangeset
for help on using the changeset viewer.