summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/WebKit/Source/core/rendering/shapes/ShapeInsideInfo.cpp
diff options
context:
space:
mode:
authorAndras Becsi <andras.becsi@digia.com>2013-12-11 21:33:03 +0100
committerAndras Becsi <andras.becsi@digia.com>2013-12-13 12:34:07 +0100
commitf2a33ff9cbc6d19943f1c7fbddd1f23d23975577 (patch)
tree0586a32aa390ade8557dfd6b4897f43a07449578 /chromium/third_party/WebKit/Source/core/rendering/shapes/ShapeInsideInfo.cpp
parent5362912cdb5eea702b68ebe23702468d17c3017a (diff)
Update Chromium to branch 1650 (31.0.1650.63)
Change-Id: I57d8c832eaec1eb2364e0a8e7352a6dd354db99f Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
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.cpp19
1 files changed, 16 insertions, 3 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 01dff4951f8..c6e004d649c 100644
--- a/chromium/third_party/WebKit/Source/core/rendering/shapes/ShapeInsideInfo.cpp
+++ b/chromium/third_party/WebKit/Source/core/rendering/shapes/ShapeInsideInfo.cpp
@@ -44,11 +44,19 @@ LineSegmentRange::LineSegmentRange(const InlineIterator& start, const InlineIter
bool ShapeInsideInfo::isEnabledFor(const RenderBlock* renderer)
{
ShapeValue* shapeValue = renderer->style()->resolvedShapeInside();
- if (!shapeValue || shapeValue->type() != ShapeValue::Shape)
+ if (!shapeValue)
return false;
- BasicShape* shape = shapeValue->shape();
- return shape && shape->type() != BasicShape::BasicShapeInsetRectangleType;
+ 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;
}
bool ShapeInsideInfo::adjustLogicalLineTop(float minSegmentWidth)
@@ -68,4 +76,9 @@ bool ShapeInsideInfo::adjustLogicalLineTop(float minSegmentWidth)
return false;
}
+ShapeValue* ShapeInsideInfo::shapeValue() const
+{
+ return m_renderer->style()->resolvedShapeInside();
+}
+
}