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

Unified Diff: Source/core/rendering/shapes/ShapeOutsideInfo.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.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/ShapeOutsideInfo.cpp
diff --git a/Source/core/rendering/shapes/ShapeOutsideInfo.cpp b/Source/core/rendering/shapes/ShapeOutsideInfo.cpp
index ed3beb1933a8a4bbd2ab21571e50b4f69481aba4..6b4138b66064792b7e32429ee8adf85d9171312b 100644
--- a/Source/core/rendering/shapes/ShapeOutsideInfo.cpp
+++ b/Source/core/rendering/shapes/ShapeOutsideInfo.cpp
@@ -34,6 +34,7 @@
#include "core/rendering/RenderBlockFlow.h"
#include "core/rendering/RenderBox.h"
#include "core/rendering/RenderImage.h"
+#include "platform/LengthFunctions.h"
namespace WebCore {
@@ -123,7 +124,9 @@ const Shape& ShapeOutsideInfo::computedShape() const
const RenderStyle& containingBlockStyle = *m_renderer.containingBlock()->style();
WritingMode writingMode = containingBlockStyle.writingMode();
- Length margin = style.shapeMargin();
+ LayoutUnit maximumValue = m_renderer.containingBlock() ? m_renderer.containingBlock()->contentWidth() : LayoutUnit();
+ float margin = floatValueForLength(m_renderer.style()->shapeMargin(), maximumValue.toFloat());
+
float shapeImageThreshold = style.shapeImageThreshold();
ASSERT(style.shapeOutside());
const ShapeValue& shapeValue = *style.shapeOutside();
« 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