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

Unified Diff: Source/core/rendering/shapes/ShapeInfo.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: Add margin specific test Created 6 years, 9 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.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/shapes/ShapeInfo.cpp
diff --git a/Source/core/rendering/shapes/ShapeInfo.cpp b/Source/core/rendering/shapes/ShapeInfo.cpp
index 22879e8f8f84a3b3abcedfb380eec05d93737a5d..2325ac5378965dff520d6ea91975010536723358 100644
--- a/Source/core/rendering/shapes/ShapeInfo.cpp
+++ b/Source/core/rendering/shapes/ShapeInfo.cpp
@@ -33,6 +33,8 @@
#include "core/rendering/RenderBlock.h"
#include "core/rendering/RenderImage.h"
+#include "platform/LengthFunctions.h"
+
namespace WebCore {
template<class RenderType>
@@ -112,7 +114,8 @@ const Shape& ShapeInfo<RenderType>::computedShape() const
return *shape;
WritingMode writingMode = this->styleForWritingMode()->writingMode();
- Length margin = m_renderer.style()->shapeMargin();
+ LayoutUnit maximumValue = m_renderer.containingBlock() ? m_renderer.containingBlock()->contentWidth() : LayoutUnit();
Bem Jones-Bey (adobe) 2014/04/04 23:03:53 Isn't there an implicit conversion from LayoutUnit
leviw_travelin_and_unemployed 2014/04/07 17:54:38 We're actually working on killing the implicit con
+ float margin = floatValueForLength(m_renderer.style()->shapeMargin(), maximumValue.toFloat());
float shapeImageThreshold = m_renderer.style()->shapeImageThreshold();
const ShapeValue* shapeValue = this->shapeValue();
ASSERT(shapeValue);
« no previous file with comments | « Source/core/rendering/shapes/Shape.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698