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

Unified Diff: Source/core/layout/style/SVGLayoutStyle.h

Issue 956553004: Use Length for baselineShiftValue in SVGLayoutStyle (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: A few more TEs. Created 5 years, 10 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/layout/style/SVGLayoutStyle.h
diff --git a/Source/core/layout/style/SVGLayoutStyle.h b/Source/core/layout/style/SVGLayoutStyle.h
index e4338dab45a95108322d27b02e0ff1120550f684..766ddc4a4333a7653090949d13dcc2c96d43255a 100644
--- a/Source/core/layout/style/SVGLayoutStyle.h
+++ b/Source/core/layout/style/SVGLayoutStyle.h
@@ -51,7 +51,8 @@ public:
// Initial values for all the properties
static EAlignmentBaseline initialAlignmentBaseline() { return AB_AUTO; }
static EDominantBaseline initialDominantBaseline() { return DB_AUTO; }
- static EBaselineShift initialBaselineShift() { return BS_BASELINE; }
+ static EBaselineShift initialBaselineShift() { return BS_LENGTH; }
+ static Length initialBaselineShiftValue() { return Length(Fixed); }
static EVectorEffect initialVectorEffect() { return VE_NONE; }
static EBufferedRendering initialBufferedRendering() { return BR_AUTO; }
static LineCap initialCapStyle() { return ButtCap; }
@@ -92,13 +93,6 @@ public:
static Length initialX() { return Length(Fixed); }
static Length initialY() { return Length(Fixed); }
- static PassRefPtrWillBeRawPtr<SVGLength> initialBaselineShiftValue()
- {
- RefPtrWillBeRawPtr<SVGLength> length = SVGLength::create();
- length->newValueSpecifiedUnits(LengthTypeNumber, 0);
- return length.release();
- }
-
static PassRefPtrWillBeRawPtr<SVGLength> initialStrokeDashOffset()
{
RefPtrWillBeRawPtr<SVGLength> length = SVGLength::create();
@@ -249,10 +243,10 @@ public:
misc.access()->lightingColor = obj;
}
- void setBaselineShiftValue(PassRefPtrWillBeRawPtr<SVGLength> obj)
+ void setBaselineShiftValue(const Length& baselineShiftValue)
{
- if (!(misc->baselineShiftValue == obj))
- misc.access()->baselineShiftValue = obj;
+ if (!(misc->baselineShiftValue == baselineShiftValue))
+ misc.access()->baselineShiftValue = baselineShiftValue;
}
// Setters for non-inherited resources
@@ -328,7 +322,7 @@ public:
float floodOpacity() const { return misc->floodOpacity; }
const Color& floodColor() const { return misc->floodColor; }
const Color& lightingColor() const { return misc->lightingColor; }
- SVGLength* baselineShiftValue() const { return misc->baselineShiftValue.get(); }
+ const Length& baselineShiftValue() const { return misc->baselineShiftValue; }
const Length& x() const { return layout->x; }
const Length& y() const { return layout->y; }
const AtomicString& clipperResource() const { return resources->clipper; }

Powered by Google App Engine
This is Rietveld 408576698