Diff
Modified: trunk/Source/WebCore/ChangeLog (165842 => 165843)
--- trunk/Source/WebCore/ChangeLog 2014-03-18 20:53:07 UTC (rev 165842)
+++ trunk/Source/WebCore/ChangeLog 2014-03-18 20:58:38 UTC (rev 165843)
@@ -1,3 +1,67 @@
+2014-03-18 Bem Jones-Bey <[email protected]>
+
+ LayoutBox is a terrible name
+ https://bugs.webkit.org/show_bug.cgi?id=130351
+
+ Reviewed by Simon Fraser.
+
+ Rename LayoutBox to CSSBoxType. Also rename the functions and methods
+ that mention "LayoutBox" to something that makes sense for each
+ specific situation.
+
+ No new tests, no behavior change.
+
+ * css/BasicShapeFunctions.cpp:
+ (WebCore::valueForBasicShape):
+ (WebCore::basicShapeForValue):
+ * css/CSSBasicShapes.cpp:
+ (WebCore::CSSBasicShapeCircle::cssText):
+ (WebCore::CSSBasicShapeCircle::equals):
+ (WebCore::CSSBasicShapeEllipse::cssText):
+ (WebCore::CSSBasicShapeEllipse::equals):
+ (WebCore::CSSBasicShapePolygon::cssText):
+ (WebCore::CSSBasicShapePolygon::equals):
+ (WebCore::CSSBasicShapeInset::cssText):
+ * css/CSSBasicShapes.h:
+ (WebCore::CSSBasicShape::referenceBox):
+ (WebCore::CSSBasicShape::setReferenceBox):
+ * css/CSSComputedStyleDeclaration.cpp:
+ (WebCore::shapePropertyValue):
+ * css/CSSPrimitiveValueMappings.h:
+ (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
+ (WebCore::CSSPrimitiveValue::operator CSSBoxType):
+ * css/DeprecatedStyleBuilder.cpp:
+ (WebCore::ApplyPropertyClipPath::applyValue):
+ (WebCore::ApplyPropertyShape::applyValue):
+ * page/animation/CSSPropertyAnimation.cpp:
+ (WebCore::blendFunc):
+ * rendering/ClipPathOperation.h:
+ (WebCore::ShapeClipPathOperation::setReferenceBox):
+ (WebCore::ShapeClipPathOperation::referenceBox):
+ (WebCore::BoxClipPathOperation::create):
+ (WebCore::BoxClipPathOperation::referenceBox):
+ (WebCore::BoxClipPathOperation::BoxClipPathOperation):
+ * rendering/shapes/Shape.cpp:
+ (WebCore::Shape::createBoxShape):
+ * rendering/shapes/Shape.h:
+ * rendering/shapes/ShapeInfo.cpp:
+ (WebCore::ShapeInfo<RenderType>::computedShape):
+ * rendering/shapes/ShapeInfo.h:
+ * rendering/shapes/ShapeInsideInfo.h:
+ * rendering/shapes/ShapeOutsideInfo.h:
+ * rendering/style/BasicShapes.cpp:
+ (WebCore::BasicShape::canBlend):
+ * rendering/style/BasicShapes.h:
+ (WebCore::BasicShape::referenceBox):
+ (WebCore::BasicShape::setReferenceBox):
+ (WebCore::BasicShape::BasicShape):
+ * rendering/style/RenderStyleConstants.h:
+ * rendering/style/ShapeValue.h:
+ (WebCore::ShapeValue::createShapeValue):
+ (WebCore::ShapeValue::createBoxShapeValue):
+ (WebCore::ShapeValue::cssBox):
+ (WebCore::ShapeValue::ShapeValue):
+
2014-03-18 Daniel Bates <[email protected]>
REGRESSION (r162334): RenderTableCol::styleDidChange uses out-of-date table information
Modified: trunk/Source/WebCore/css/BasicShapeFunctions.cpp (165842 => 165843)
--- trunk/Source/WebCore/css/BasicShapeFunctions.cpp 2014-03-18 20:53:07 UTC (rev 165842)
+++ trunk/Source/WebCore/css/BasicShapeFunctions.cpp 2014-03-18 20:58:38 UTC (rev 165843)
@@ -124,8 +124,8 @@
break;
}
- if (basicShape->layoutBox() != BoxMissing)
- basicShapeValue->setLayoutBox(pool.createValue(basicShape->layoutBox()));
+ if (basicShape->referenceBox() != BoxMissing)
+ basicShapeValue->setReferenceBox(pool.createValue(basicShape->referenceBox()));
return pool.createValue(basicShapeValue.release());
}
@@ -264,8 +264,8 @@
break;
}
- if (basicShapeValue->layoutBox())
- basicShape->setLayoutBox(LayoutBox(*basicShapeValue->layoutBox()));
+ if (basicShapeValue->referenceBox())
+ basicShape->setReferenceBox(CSSBoxType(*basicShapeValue->referenceBox()));
return basicShape.release();
}
Modified: trunk/Source/WebCore/css/CSSBasicShapes.cpp (165842 => 165843)
--- trunk/Source/WebCore/css/CSSBasicShapes.cpp 2014-03-18 20:53:07 UTC (rev 165842)
+++ trunk/Source/WebCore/css/CSSBasicShapes.cpp 2014-03-18 20:58:38 UTC (rev 165843)
@@ -116,7 +116,7 @@
return buildCircleString(m_radius ? m_radius->cssText() : String(),
serializePositionOffset(*normalizedCX->getPairValue(), *normalizedCY->getPairValue()),
serializePositionOffset(*normalizedCY->getPairValue(), *normalizedCX->getPairValue()),
- m_layoutBox ? m_layoutBox->cssText() : String());
+ m_referenceBox ? m_referenceBox->cssText() : String());
}
bool CSSBasicShapeCircle::equals(const CSSBasicShape& shape) const
@@ -128,7 +128,7 @@
return compareCSSValuePtr(m_centerX, other.m_centerX)
&& compareCSSValuePtr(m_centerY, other.m_centerY)
&& compareCSSValuePtr(m_radius, other.m_radius)
- && compareCSSValuePtr(m_layoutBox, other.m_layoutBox);
+ && compareCSSValuePtr(m_referenceBox, other.m_referenceBox);
}
static String buildEllipseString(const String& radiusX, const String& radiusY, const String& centerX, const String& centerY, const String& box)
@@ -176,7 +176,7 @@
m_radiusY ? m_radiusY->cssText() : String(),
serializePositionOffset(*normalizedCX->getPairValue(), *normalizedCY->getPairValue()),
serializePositionOffset(*normalizedCY->getPairValue(), *normalizedCX->getPairValue()),
- m_layoutBox ? m_layoutBox->cssText() : String());
+ m_referenceBox ? m_referenceBox->cssText() : String());
}
bool CSSBasicShapeEllipse::equals(const CSSBasicShape& shape) const
@@ -189,7 +189,7 @@
&& compareCSSValuePtr(m_centerY, other.m_centerY)
&& compareCSSValuePtr(m_radiusX, other.m_radiusX)
&& compareCSSValuePtr(m_radiusY, other.m_radiusY)
- && compareCSSValuePtr(m_layoutBox, other.m_layoutBox);
+ && compareCSSValuePtr(m_referenceBox, other.m_referenceBox);
}
static String buildPolygonString(const WindRule& windRule, const Vector<String>& points, const String& box)
@@ -247,7 +247,7 @@
for (size_t i = 0; i < m_values.size(); ++i)
points.append(m_values.at(i)->cssText());
- return buildPolygonString(m_windRule, points, m_layoutBox ? m_layoutBox->cssText() : String());
+ return buildPolygonString(m_windRule, points, m_referenceBox ? m_referenceBox->cssText() : String());
}
bool CSSBasicShapePolygon::equals(const CSSBasicShape& shape) const
@@ -256,7 +256,7 @@
return false;
const CSSBasicShapePolygon& rhs = static_cast<const CSSBasicShapePolygon&>(shape);
- return compareCSSValuePtr(m_layoutBox, rhs.m_layoutBox)
+ return compareCSSValuePtr(m_referenceBox, rhs.m_referenceBox)
&& compareCSSValueVector<CSSPrimitiveValue>(m_values, rhs.m_values);
}
@@ -358,7 +358,7 @@
bottomRightRadiusHeight,
bottomLeftRadiusWidth,
bottomLeftRadiusHeight,
- m_layoutBox ? m_layoutBox->cssText() : String());
+ m_referenceBox ? m_referenceBox->cssText() : String());
}
bool CSSBasicShapeInset::equals(const CSSBasicShape& shape) const
Modified: trunk/Source/WebCore/css/CSSBasicShapes.h (165842 => 165843)
--- trunk/Source/WebCore/css/CSSBasicShapes.h 2014-03-18 20:53:07 UTC (rev 165842)
+++ trunk/Source/WebCore/css/CSSBasicShapes.h 2014-03-18 20:58:38 UTC (rev 165843)
@@ -51,15 +51,15 @@
virtual String cssText() const = 0;
virtual bool equals(const CSSBasicShape&) const = 0;
- CSSPrimitiveValue* layoutBox() const { return m_layoutBox.get(); }
- void setLayoutBox(PassRefPtr<CSSPrimitiveValue> layoutBox) { m_layoutBox = layoutBox; }
+ CSSPrimitiveValue* referenceBox() const { return m_referenceBox.get(); }
+ void setReferenceBox(PassRefPtr<CSSPrimitiveValue> referenceBox) { m_referenceBox = referenceBox; }
public:
virtual ~CSSBasicShape() { }
protected:
CSSBasicShape() { }
- RefPtr<CSSPrimitiveValue> m_layoutBox;
+ RefPtr<CSSPrimitiveValue> m_referenceBox;
};
class CSSBasicShapeInset : public CSSBasicShape {
Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (165842 => 165843)
--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp 2014-03-18 20:53:07 UTC (rev 165842)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp 2014-03-18 20:58:38 UTC (rev 165843)
@@ -1630,7 +1630,7 @@
return cssValuePool().createIdentifierValue(CSSValueOutsideShape);
if (shapeValue->type() == ShapeValue::Box)
- return cssValuePool().createValue(shapeValue->layoutBox());
+ return cssValuePool().createValue(shapeValue->cssBox());
if (shapeValue->type() == ShapeValue::Image)
return shapeValue->image() ? shapeValue->image()->cssValue() : cssValuePool().createIdentifierValue(CSSValueNone);
@@ -1639,8 +1639,8 @@
RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
list->append(valueForBasicShape(style, shapeValue->shape()));
- if (shapeValue->layoutBox() != BoxMissing)
- list->append(cssValuePool().createValue(shapeValue->layoutBox()));
+ if (shapeValue->cssBox() != BoxMissing)
+ list->append(cssValuePool().createValue(shapeValue->cssBox()));
return list.release();
}
#endif
Modified: trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h (165842 => 165843)
--- trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h 2014-03-18 20:53:07 UTC (rev 165842)
+++ trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h 2014-03-18 20:58:38 UTC (rev 165843)
@@ -5162,11 +5162,11 @@
#endif // ENABLE(CSS_IMAGE_ORIENTATION)
-template<> inline CSSPrimitiveValue::CSSPrimitiveValue(LayoutBox layoutBox)
+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(CSSBoxType cssBox)
: CSSValue(PrimitiveClass)
{
m_primitiveUnitType = CSS_VALUE_ID;
- switch (layoutBox) {
+ switch (cssBox) {
case MarginBox:
m_value.valueID = CSSValueMarginBox;
break;
@@ -5195,7 +5195,7 @@
}
}
-template<> inline CSSPrimitiveValue::operator LayoutBox() const
+template<> inline CSSPrimitiveValue::operator CSSBoxType() const
{
switch (getValueID()) {
case CSSValueMarginBox:
Modified: trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp (165842 => 165843)
--- trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp 2014-03-18 20:53:07 UTC (rev 165842)
+++ trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp 2014-03-18 20:58:38 UTC (rev 165843)
@@ -2144,7 +2144,7 @@
}
if (!value->isValueList())
return;
- LayoutBox referenceBox = BoxMissing;
+ CSSBoxType referenceBox = BoxMissing;
RefPtr<ClipPathOperation> operation;
auto& valueList = toCSSValueList(*value);
for (unsigned i = 0; i < valueList.length(); ++i) {
@@ -2159,7 +2159,7 @@
|| primitiveValue.getValueID() == CSSValueStroke
|| primitiveValue.getValueID() == CSSValueViewBox)
&& referenceBox == BoxMissing)
- referenceBox = LayoutBox(primitiveValue);
+ referenceBox = CSSBoxType(primitiveValue);
else
return;
}
@@ -2196,7 +2196,7 @@
setValue(styleResolver->style(), shape.release());
} else if (value->isValueList()) {
RefPtr<BasicShape> shape;
- LayoutBox layoutBox = BoxMissing;
+ CSSBoxType referenceBox = BoxMissing;
CSSValueList* valueList = toCSSValueList(value);
for (unsigned i = 0; i < valueList->length(); ++i) {
CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(valueList->itemWithoutBoundsCheck(i));
@@ -2206,15 +2206,15 @@
|| primitiveValue->getValueID() == CSSValueBorderBox
|| primitiveValue->getValueID() == CSSValuePaddingBox
|| primitiveValue->getValueID() == CSSValueMarginBox)
- layoutBox = LayoutBox(*primitiveValue);
+ referenceBox = CSSBoxType(*primitiveValue);
else
return;
}
if (shape)
- setValue(styleResolver->style(), ShapeValue::createShapeValue(shape.release(), layoutBox));
- else if (layoutBox != BoxMissing)
- setValue(styleResolver->style(), ShapeValue::createLayoutBoxValue(layoutBox));
+ setValue(styleResolver->style(), ShapeValue::createShapeValue(shape.release(), referenceBox));
+ else if (referenceBox != BoxMissing)
+ setValue(styleResolver->style(), ShapeValue::createBoxShapeValue(referenceBox));
}
}
Modified: trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp (165842 => 165843)
--- trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp 2014-03-18 20:53:07 UTC (rev 165842)
+++ trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp 2014-03-18 20:58:38 UTC (rev 165843)
@@ -148,7 +148,7 @@
if (from->type() != ShapeValue::Shape || to->type() != ShapeValue::Shape)
return to;
- if (from->layoutBox() != to->layoutBox())
+ if (from->cssBox() != to->cssBox())
return to;
const BasicShape* fromShape = from->shape();
@@ -157,7 +157,7 @@
if (!fromShape->canBlend(toShape))
return to;
- return ShapeValue::createShapeValue(toShape->blend(fromShape, progress), to->layoutBox());
+ return ShapeValue::createShapeValue(toShape->blend(fromShape, progress), to->cssBox());
}
#endif
Modified: trunk/Source/WebCore/rendering/ClipPathOperation.h (165842 => 165843)
--- trunk/Source/WebCore/rendering/ClipPathOperation.h 2014-03-18 20:53:07 UTC (rev 165842)
+++ trunk/Source/WebCore/rendering/ClipPathOperation.h 2014-03-18 20:58:38 UTC (rev 165843)
@@ -112,8 +112,8 @@
return path;
}
- void setReferenceBox(LayoutBox referenceBox) { m_referenceBox = referenceBox; }
- LayoutBox referenceBox() const { return m_referenceBox; }
+ void setReferenceBox(CSSBoxType referenceBox) { m_referenceBox = referenceBox; }
+ CSSBoxType referenceBox() const { return m_referenceBox; }
private:
virtual bool operator==(const ClipPathOperation& o) const override
@@ -132,12 +132,12 @@
}
RefPtr<BasicShape> m_shape;
- LayoutBox m_referenceBox;
+ CSSBoxType m_referenceBox;
};
class BoxClipPathOperation : public ClipPathOperation {
public:
- static PassRefPtr<BoxClipPathOperation> create(LayoutBox referenceBox)
+ static PassRefPtr<BoxClipPathOperation> create(CSSBoxType referenceBox)
{
return adoptRef(new BoxClipPathOperation(referenceBox));
}
@@ -148,7 +148,7 @@
path.addRoundedRect(boundingRect);
return path;
}
- LayoutBox referenceBox() const { return m_referenceBox; }
+ CSSBoxType referenceBox() const { return m_referenceBox; }
private:
virtual bool operator==(const ClipPathOperation& o) const override
@@ -159,13 +159,13 @@
return m_referenceBox == other->m_referenceBox;
}
- explicit BoxClipPathOperation(LayoutBox referenceBox)
+ explicit BoxClipPathOperation(CSSBoxType referenceBox)
: ClipPathOperation(Box)
, m_referenceBox(referenceBox)
{
}
- LayoutBox m_referenceBox;
+ CSSBoxType m_referenceBox;
};
#define CLIP_PATH_OPERATION_CASTS(ToValueTypeName, predicate) \
Modified: trunk/Source/WebCore/rendering/shapes/Shape.cpp (165842 => 165843)
--- trunk/Source/WebCore/rendering/shapes/Shape.cpp 2014-03-18 20:53:07 UTC (rev 165842)
+++ trunk/Source/WebCore/rendering/shapes/Shape.cpp 2014-03-18 20:58:38 UTC (rev 165843)
@@ -222,7 +222,7 @@
return rasterShape.release();
}
-PassOwnPtr<Shape> Shape::createLayoutBoxShape(const RoundedRect& roundedRect, WritingMode writingMode, Length margin, Length padding)
+PassOwnPtr<Shape> Shape::createBoxShape(const RoundedRect& roundedRect, WritingMode writingMode, Length margin, Length padding)
{
ASSERT(roundedRect.rect().width() >= 0 && roundedRect.rect().height() >= 0);
Modified: trunk/Source/WebCore/rendering/shapes/Shape.h (165842 => 165843)
--- trunk/Source/WebCore/rendering/shapes/Shape.h 2014-03-18 20:53:07 UTC (rev 165842)
+++ trunk/Source/WebCore/rendering/shapes/Shape.h 2014-03-18 20:58:38 UTC (rev 165843)
@@ -69,7 +69,7 @@
static PassOwnPtr<Shape> createShape(const BasicShape*, const LayoutSize& logicalBoxSize, WritingMode, Length margin, Length padding);
static PassOwnPtr<Shape> createRasterShape(Image*, float threshold, const LayoutRect& drawRect, const LayoutRect& clipRect, WritingMode, Length margin, Length padding);
- static PassOwnPtr<Shape> createLayoutBoxShape(const RoundedRect&, WritingMode, Length margin, Length padding);
+ static PassOwnPtr<Shape> createBoxShape(const RoundedRect&, WritingMode, Length margin, Length padding);
virtual ~Shape() { }
Modified: trunk/Source/WebCore/rendering/shapes/ShapeInfo.cpp (165842 => 165843)
--- trunk/Source/WebCore/rendering/shapes/ShapeInfo.cpp 2014-03-18 20:53:07 UTC (rev 165842)
+++ trunk/Source/WebCore/rendering/shapes/ShapeInfo.cpp 2014-03-18 20:58:38 UTC (rev 165843)
@@ -145,7 +145,7 @@
// FIXME This does not properly compute the rounded corners as specified in all conditions.
// https://bugs.webkit.org/show_bug.cgi?id=127982
const RoundedRect& shapeRect = m_renderer.style().getRoundedBorderFor(LayoutRect(LayoutPoint(), m_referenceBoxLogicalSize), &(m_renderer.view()));
- m_shape = Shape::createLayoutBoxShape(shapeRect, writingMode, margin, padding);
+ m_shape = Shape::createBoxShape(shapeRect, writingMode, margin, padding);
break;
}
case ShapeValue::Outside:
Modified: trunk/Source/WebCore/rendering/shapes/ShapeInfo.h (165842 => 165843)
--- trunk/Source/WebCore/rendering/shapes/ShapeInfo.h 2014-03-18 20:53:07 UTC (rev 165842)
+++ trunk/Source/WebCore/rendering/shapes/ShapeInfo.h 2014-03-18 20:58:38 UTC (rev 165843)
@@ -132,7 +132,7 @@
{
}
- virtual LayoutBox referenceBox() const = 0;
+ virtual CSSBoxType referenceBox() const = 0;
virtual LayoutRect computedShapeLogicalBoundingBox() const = 0;
virtual ShapeValue* shapeValue() const = 0;
virtual void getIntervals(LayoutUnit, LayoutUnit, SegmentList&) const = 0;
Modified: trunk/Source/WebCore/rendering/shapes/ShapeInsideInfo.h (165842 => 165843)
--- trunk/Source/WebCore/rendering/shapes/ShapeInsideInfo.h 2014-03-18 20:53:07 UTC (rev 165842)
+++ trunk/Source/WebCore/rendering/shapes/ShapeInsideInfo.h 2014-03-18 20:58:38 UTC (rev 165843)
@@ -107,12 +107,12 @@
}
protected:
- virtual LayoutBox referenceBox() const override
+ virtual CSSBoxType referenceBox() const override
{
- if (shapeValue()->layoutBox() == BoxMissing)
+ if (shapeValue()->cssBox() == BoxMissing)
return ContentBox;
- return shapeValue()->layoutBox();
+ return shapeValue()->cssBox();
}
virtual const RenderStyle& styleForWritingMode() const override;
Modified: trunk/Source/WebCore/rendering/shapes/ShapeOutsideInfo.h (165842 => 165843)
--- trunk/Source/WebCore/rendering/shapes/ShapeOutsideInfo.h 2014-03-18 20:53:07 UTC (rev 165842)
+++ trunk/Source/WebCore/rendering/shapes/ShapeOutsideInfo.h 2014-03-18 20:58:38 UTC (rev 165843)
@@ -63,14 +63,14 @@
}
protected:
- virtual LayoutBox referenceBox() const override
+ virtual CSSBoxType referenceBox() const override
{
- if (shapeValue()->layoutBox() == BoxMissing) {
+ if (shapeValue()->cssBox() == BoxMissing) {
if (shapeValue()->type() == ShapeValue::Image)
return ContentBox;
return MarginBox;
}
- return shapeValue()->layoutBox();
+ return shapeValue()->cssBox();
}
private:
Modified: trunk/Source/WebCore/rendering/style/BasicShapes.cpp (165842 => 165843)
--- trunk/Source/WebCore/rendering/style/BasicShapes.cpp 2014-03-18 20:53:07 UTC (rev 165842)
+++ trunk/Source/WebCore/rendering/style/BasicShapes.cpp 2014-03-18 20:58:38 UTC (rev 165843)
@@ -65,7 +65,7 @@
return false;
// Both shapes must use the same reference box.
- if (layoutBox() != other->layoutBox())
+ if (referenceBox() != other->referenceBox())
return false;
// Just polygons with same number of vertices can be animated.
Modified: trunk/Source/WebCore/rendering/style/BasicShapes.h (165842 => 165843)
--- trunk/Source/WebCore/rendering/style/BasicShapes.h 2014-03-18 20:53:07 UTC (rev 165842)
+++ trunk/Source/WebCore/rendering/style/BasicShapes.h 2014-03-18 20:58:38 UTC (rev 165843)
@@ -63,17 +63,17 @@
virtual Type type() const = 0;
- LayoutBox layoutBox() const { return m_layoutBox; }
- void setLayoutBox(LayoutBox layoutBox) { m_layoutBox = layoutBox; }
+ CSSBoxType referenceBox() const { return m_referenceBox; }
+ void setReferenceBox(CSSBoxType referenceBox) { m_referenceBox = referenceBox; }
protected:
BasicShape()
- : m_layoutBox(BoxMissing)
+ : m_referenceBox(BoxMissing)
{
}
private:
- LayoutBox m_layoutBox;
+ CSSBoxType m_referenceBox;
};
class BasicShapeCenterCoordinate {
Modified: trunk/Source/WebCore/rendering/style/RenderStyleConstants.h (165842 => 165843)
--- trunk/Source/WebCore/rendering/style/RenderStyleConstants.h 2014-03-18 20:53:07 UTC (rev 165842)
+++ trunk/Source/WebCore/rendering/style/RenderStyleConstants.h 2014-03-18 20:58:38 UTC (rev 165843)
@@ -556,7 +556,7 @@
enum Isolation { IsolationAuto, IsolationIsolate };
// Fill, Stroke, ViewBox are just used for SVG.
-enum LayoutBox { BoxMissing = 0, MarginBox, BorderBox, PaddingBox, ContentBox, Fill, Stroke, ViewBox };
+enum CSSBoxType { BoxMissing = 0, MarginBox, BorderBox, PaddingBox, ContentBox, Fill, Stroke, ViewBox };
} // namespace WebCore
Modified: trunk/Source/WebCore/rendering/style/ShapeValue.h (165842 => 165843)
--- trunk/Source/WebCore/rendering/style/ShapeValue.h 2014-03-18 20:53:07 UTC (rev 165842)
+++ trunk/Source/WebCore/rendering/style/ShapeValue.h 2014-03-18 20:58:38 UTC (rev 165843)
@@ -48,14 +48,14 @@
Image
};
- static PassRefPtr<ShapeValue> createShapeValue(PassRefPtr<BasicShape> shape, LayoutBox layoutBox)
+ static PassRefPtr<ShapeValue> createShapeValue(PassRefPtr<BasicShape> shape, CSSBoxType cssBox)
{
- return adoptRef(new ShapeValue(shape, layoutBox));
+ return adoptRef(new ShapeValue(shape, cssBox));
}
- static PassRefPtr<ShapeValue> createLayoutBoxValue(LayoutBox layoutBox)
+ static PassRefPtr<ShapeValue> createBoxShapeValue(CSSBoxType boxShape)
{
- return adoptRef(new ShapeValue(layoutBox));
+ return adoptRef(new ShapeValue(boxShape));
}
static PassRefPtr<ShapeValue> createOutsideValue()
@@ -70,7 +70,7 @@
ShapeValueType type() const { return m_type; }
BasicShape* shape() const { return m_shape.get(); }
- LayoutBox layoutBox() const { return m_layoutBox; }
+ CSSBoxType cssBox() const { return m_cssBox; }
StyleImage* image() const { return m_image.get(); }
bool isImageValid() const { return image() && image()->cachedImage() && image()->cachedImage()->hasImage(); }
@@ -84,33 +84,33 @@
bool operator==(const ShapeValue& other) const { return type() == other.type(); }
private:
- ShapeValue(PassRefPtr<BasicShape> shape, LayoutBox layoutBox)
+ ShapeValue(PassRefPtr<BasicShape> shape, CSSBoxType cssBox)
: m_type(Shape)
, m_shape(shape)
- , m_layoutBox(layoutBox)
+ , m_cssBox(cssBox)
{
}
ShapeValue(ShapeValueType type)
: m_type(type)
- , m_layoutBox(BoxMissing)
+ , m_cssBox(BoxMissing)
{
}
ShapeValue(PassRefPtr<StyleImage> image)
: m_type(Image)
, m_image(image)
- , m_layoutBox(BoxMissing)
+ , m_cssBox(BoxMissing)
{
}
- ShapeValue(LayoutBox layoutBox)
+ ShapeValue(CSSBoxType cssBox)
: m_type(Box)
- , m_layoutBox(layoutBox)
+ , m_cssBox(cssBox)
{
}
ShapeValueType m_type;
RefPtr<BasicShape> m_shape;
RefPtr<StyleImage> m_image;
- LayoutBox m_layoutBox;
+ CSSBoxType m_cssBox;
};
}