Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(592)

Unified Diff: Source/core/rendering/shapes/Shape.cpp

Issue 226373002: [CSS Shapes] shape-margin in percentage units always computes to 0px (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove webkit prefixes Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/rendering/shapes/Shape.h ('k') | Source/core/rendering/shapes/ShapeOutsideInfo.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/shapes/Shape.cpp
diff --git a/Source/core/rendering/shapes/Shape.cpp b/Source/core/rendering/shapes/Shape.cpp
index 60925382763bf6d47b74089eac45ee46e5973f2f..7c1f5276af173e433225167f04c3a5ce6f6c6ccd 100644
--- a/Source/core/rendering/shapes/Shape.cpp
+++ b/Source/core/rendering/shapes/Shape.cpp
@@ -94,7 +94,7 @@ static inline FloatSize physicalSizeToLogical(const FloatSize& size, WritingMode
return size.transposedSize();
}
-PassOwnPtr<Shape> Shape::createShape(const BasicShape* basicShape, const LayoutSize& logicalBoxSize, WritingMode writingMode, Length margin)
+PassOwnPtr<Shape> Shape::createShape(const BasicShape* basicShape, const LayoutSize& logicalBoxSize, WritingMode writingMode, float margin)
{
ASSERT(basicShape);
@@ -169,12 +169,12 @@ PassOwnPtr<Shape> Shape::createShape(const BasicShape* basicShape, const LayoutS
}
shape->m_writingMode = writingMode;
- shape->m_margin = floatValueForLength(margin, 0);
+ shape->m_margin = margin;
return shape.release();
}
-PassOwnPtr<Shape> Shape::createRasterShape(Image* image, float threshold, const LayoutRect& imageR, const LayoutRect& marginR, WritingMode writingMode, Length margin)
+PassOwnPtr<Shape> Shape::createRasterShape(Image* image, float threshold, const LayoutRect& imageR, const LayoutRect& marginR, WritingMode writingMode, float margin)
{
IntRect imageRect = pixelSnappedIntRect(imageR);
IntRect marginRect = pixelSnappedIntRect(marginR);
@@ -211,17 +211,17 @@ PassOwnPtr<Shape> Shape::createRasterShape(Image* image, float threshold, const
OwnPtr<RasterShape> rasterShape = adoptPtr(new RasterShape(intervals.release(), marginRect.size()));
rasterShape->m_writingMode = writingMode;
- rasterShape->m_margin = floatValueForLength(margin, 0);
+ rasterShape->m_margin = margin;
return rasterShape.release();
}
-PassOwnPtr<Shape> Shape::createLayoutBoxShape(const RoundedRect& roundedRect, WritingMode writingMode, const Length& margin)
+PassOwnPtr<Shape> Shape::createLayoutBoxShape(const RoundedRect& roundedRect, WritingMode writingMode, float margin)
{
FloatRect rect(0, 0, roundedRect.rect().width(), roundedRect.rect().height());
FloatRoundedRect bounds(rect, roundedRect.radii());
OwnPtr<Shape> shape = createInsetShape(bounds);
shape->m_writingMode = writingMode;
- shape->m_margin = floatValueForLength(margin, 0);
+ shape->m_margin = margin;
return shape.release();
}
« no previous file with comments | « Source/core/rendering/shapes/Shape.h ('k') | Source/core/rendering/shapes/ShapeOutsideInfo.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698