diff options
Diffstat (limited to 'chromium/third_party/WebKit/Source/core/rendering/shapes/ShapeInsideInfo.cpp')
-rw-r--r-- | chromium/third_party/WebKit/Source/core/rendering/shapes/ShapeInsideInfo.cpp | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/chromium/third_party/WebKit/Source/core/rendering/shapes/ShapeInsideInfo.cpp b/chromium/third_party/WebKit/Source/core/rendering/shapes/ShapeInsideInfo.cpp index 8c63f6c4d74..01dff4951f8 100644 --- a/chromium/third_party/WebKit/Source/core/rendering/shapes/ShapeInsideInfo.cpp +++ b/chromium/third_party/WebKit/Source/core/rendering/shapes/ShapeInsideInfo.cpp @@ -44,19 +44,11 @@ LineSegmentRange::LineSegmentRange(const InlineIterator& start, const InlineIter bool ShapeInsideInfo::isEnabledFor(const RenderBlock* renderer) { ShapeValue* shapeValue = renderer->style()->resolvedShapeInside(); - if (!shapeValue) + if (!shapeValue || shapeValue->type() != ShapeValue::Shape) return false; - switch (shapeValue->type()) { - case ShapeValue::Shape: - return shapeValue->shape() && shapeValue->shape()->type() != BasicShape::BasicShapeInsetRectangleType; - case ShapeValue::Image: - return shapeValue->isImageValid(); - case ShapeValue::Outside: - return false; - } - - return false; + BasicShape* shape = shapeValue->shape(); + return shape && shape->type() != BasicShape::BasicShapeInsetRectangleType; } bool ShapeInsideInfo::adjustLogicalLineTop(float minSegmentWidth) |