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

Unified Diff: Source/core/rendering/style/BasicShapes.h

Issue 115253003: Layout support for new circle shape syntax (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Use FloatSize/FloatPoint's more Created 6 years, 11 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
Index: Source/core/rendering/style/BasicShapes.h
diff --git a/Source/core/rendering/style/BasicShapes.h b/Source/core/rendering/style/BasicShapes.h
index d58b386dd1fe76153cdac246ca8cf1ac75e360ff..846313b48cfbb6c3c2307aff3fea1396708d9d3a 100644
--- a/Source/core/rendering/style/BasicShapes.h
+++ b/Source/core/rendering/style/BasicShapes.h
@@ -40,6 +40,7 @@
namespace WebCore {
class FloatRect;
+class FloatSize;
class Path;
class BasicShape : public RefCounted<BasicShape> {
@@ -142,6 +143,12 @@ public:
Keyword keyword() const { return m_keyword; }
const Length& length() const { return m_length; }
+ bool canBlend(const BasicShapeCenterCoordinate& other) const
+ {
+ // FIXME determine how to interpolate between keywords. See issue 330248.
+ return m_keyword == None && other.keyword() == None;
+ }
+
BasicShapeCenterCoordinate blend(const BasicShapeCenterCoordinate& other, double progress) const
{
if (m_keyword != None || other.keyword() != None)
@@ -171,6 +178,12 @@ public:
const Length& value() const { return m_value; }
Type type() const { return m_type; }
+ bool canBlend(const BasicShapeRadius& other) const
+ {
+ // FIXME determine how to interpolate between keywords. See issue 330248.
+ return m_type == Value && other.type() == Value;
+ }
+
BasicShapeRadius blend(const BasicShapeRadius& other, double progress) const
{
if (m_type != Value || other.type() != Value)
@@ -193,6 +206,7 @@ public:
const BasicShapeCenterCoordinate& centerY() const { return m_centerY; }
const BasicShapeRadius& radius() const { return m_radius; }
+ float floatValueForRadiusInBox(FloatSize) const;
void setCenterX(BasicShapeCenterCoordinate centerX) { m_centerX = centerX; }
void setCenterY(BasicShapeCenterCoordinate centerY) { m_centerY = centerY; }
void setRadius(BasicShapeRadius radius) { m_radius = radius; }

Powered by Google App Engine
This is Rietveld 408576698