Index: third_party/WebKit/Source/core/style/ComputedStyle.h |
diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.h b/third_party/WebKit/Source/core/style/ComputedStyle.h |
index 043e2233a9150af7460166166e09b755e054d71a..3b0dfcc2fb91479526e0efa451a9cf5284693073 100644 |
--- a/third_party/WebKit/Source/core/style/ComputedStyle.h |
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.h |
@@ -2235,6 +2235,49 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase, |
float wordSpacing() const; |
void setWordSpacing(float); |
+ // Support for paint-order, stroke-linecap, and stroke-linejoin from |
+ // https://drafts.fxtf.org/paint/ |
+ |
+ // paint-order |
+ static EPaintOrder initialPaintOrder() { return PaintOrderNormal; } |
+ void setPaintOrder(EPaintOrder order) { |
+ SET_VAR(m_rareInheritedData, paintOrder, order); |
+ } |
+ EPaintOrder paintOrder() const { |
+ return (EPaintOrder)m_rareInheritedData->paintOrder; |
+ } |
+ EPaintOrderType paintOrderType(unsigned index) const; |
+ |
+ // stroke-linecap |
+ static LineCap initialCapStyle() { return ButtCap; } |
+ void setCapStyle(LineCap val) { SET_VAR(m_rareInheritedData, capStyle, val); } |
+ LineCap capStyle() const { return (LineCap)m_rareInheritedData->capStyle; } |
+ bool hasSquareCapStyle() const { return capStyle() == SquareCap; } |
+ |
+ // stroke-linejoin |
+ static LineJoin initialJoinStyle() { return MiterJoin; } |
+ void setJoinStyle(LineJoin val) { |
+ SET_VAR(m_rareInheritedData, joinStyle, val); |
+ } |
+ LineJoin joinStyle() const { |
+ return (LineJoin)(m_rareInheritedData->joinStyle); |
+ } |
+ bool hasMiterJoinStyle() const { return joinStyle() == MiterJoin; } |
+ |
+ // stroke-width |
+ static UnzoomedLength initialStrokeWidth() { |
+ return UnzoomedLength(Length(1, Fixed)); |
+ } |
+ void setStrokeWidth(const UnzoomedLength& w) { |
+ SET_VAR(m_rareInheritedData, strokeWidth, w); |
+ } |
+ const UnzoomedLength& strokeWidth() const { |
+ return m_rareInheritedData->strokeWidth; |
+ } |
+ bool hasVisibleStroke() const { |
+ return svgStyle().hasStroke() && !strokeWidth().isZero(); |
+ } |
+ |
// SVG properties. |
const SVGComputedStyle& svgStyle() const { return *m_svgStyle.get(); } |
SVGComputedStyle& accessSVGStyle() { return *m_svgStyle.access(); } |
@@ -2331,12 +2374,6 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase, |
float strokeOpacity() const { return svgStyle().strokeOpacity(); } |
void setStrokeOpacity(float f) { accessSVGStyle().setStrokeOpacity(f); } |
- // stroke-width |
- const UnzoomedLength& strokeWidth() const { return svgStyle().strokeWidth(); } |
- void setStrokeWidth(const UnzoomedLength& w) { |
- accessSVGStyle().setStrokeWidth(w); |
- } |
- |
// Comparison operators |
// TODO(shend): Replace callers of operator== wth a named method instead, e.g. |
// inheritedEquals(). |