| Index: third_party/WebKit/Source/core/layout/svg/SVGTextLayoutAttributes.h
|
| diff --git a/third_party/WebKit/Source/core/layout/svg/SVGTextLayoutAttributes.h b/third_party/WebKit/Source/core/layout/svg/SVGTextLayoutAttributes.h
|
| index 88c419ef86bef50a9962599643dc7a1d29dc07e2..27d81c7665cd95cf17f82f7cbc1b4bfbf53746e9 100644
|
| --- a/third_party/WebKit/Source/core/layout/svg/SVGTextLayoutAttributes.h
|
| +++ b/third_party/WebKit/Source/core/layout/svg/SVGTextLayoutAttributes.h
|
| @@ -33,6 +33,15 @@ struct SVGCharacterData {
|
| DISALLOW_NEW_EXCEPT_PLACEMENT_NEW();
|
| SVGCharacterData();
|
|
|
| + static float emptyValue() { return std::numeric_limits<float>::quiet_NaN(); }
|
| + static bool isEmptyValue(float value) { return std::isnan(value); }
|
| +
|
| + bool hasX() const { return !isEmptyValue(x); }
|
| + bool hasY() const { return !isEmptyValue(y); }
|
| + bool hasDx() const { return !isEmptyValue(dx); }
|
| + bool hasDy() const { return !isEmptyValue(dy); }
|
| + bool hasRotate() const { return !isEmptyValue(rotate); }
|
| +
|
| float x;
|
| float y;
|
| float dx;
|
| @@ -63,11 +72,11 @@ private:
|
| };
|
|
|
| inline SVGCharacterData::SVGCharacterData()
|
| - : x(SVGTextLayoutAttributes::emptyValue())
|
| - , y(SVGTextLayoutAttributes::emptyValue())
|
| - , dx(SVGTextLayoutAttributes::emptyValue())
|
| - , dy(SVGTextLayoutAttributes::emptyValue())
|
| - , rotate(SVGTextLayoutAttributes::emptyValue())
|
| + : x(emptyValue())
|
| + , y(emptyValue())
|
| + , dx(emptyValue())
|
| + , dy(emptyValue())
|
| + , rotate(emptyValue())
|
| {
|
| }
|
|
|
|
|