diff options
Diffstat (limited to 'Source/WebCore/rendering/style/SVGRenderStyleDefs.h')
-rw-r--r-- | Source/WebCore/rendering/style/SVGRenderStyleDefs.h | 123 |
1 files changed, 81 insertions, 42 deletions
diff --git a/Source/WebCore/rendering/style/SVGRenderStyleDefs.h b/Source/WebCore/rendering/style/SVGRenderStyleDefs.h index 9c840bc0f..7d39228ff 100644 --- a/Source/WebCore/rendering/style/SVGRenderStyleDefs.h +++ b/Source/WebCore/rendering/style/SVGRenderStyleDefs.h @@ -2,12 +2,13 @@ Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> 2004, 2005 Rob Buis <buis@kde.org> Copyright (C) Research In Motion Limited 2010. All rights reserved. + Copyright (C) 2014 Adobe Systems Incorporated. All rights reserved. Based on khtml code by: Copyright (C) 2000-2003 Lars Knoll (knoll@kde.org) (C) 2000 Antti Koivisto (koivisto@kde.org) (C) 2000-2003 Dirk Mueller (mueller@kde.org) - (C) 2002-2003 Apple Computer, Inc. + (C) 2002-2003 Apple Inc. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public @@ -25,19 +26,24 @@ Boston, MA 02110-1301, USA. */ -#ifndef SVGRenderStyleDefs_h -#define SVGRenderStyleDefs_h +#pragma once -#if ENABLE(SVG) -#include "SVGLength.h" -#include "SVGPaint.h" +#include "Length.h" +#include "SVGLengthValue.h" #include "ShadowData.h" -#include <wtf/OwnPtr.h> -#include <wtf/PassOwnPtr.h> #include <wtf/RefCounted.h> #include <wtf/RefPtr.h> namespace WebCore { + enum SVGPaintType { + SVG_PAINTTYPE_RGBCOLOR, + SVG_PAINTTYPE_NONE, + SVG_PAINTTYPE_CURRENTCOLOR, + SVG_PAINTTYPE_URI_NONE, + SVG_PAINTTYPE_URI_CURRENTCOLOR, + SVG_PAINTTYPE_URI_RGBCOLOR, + SVG_PAINTTYPE_URI + }; enum EBaselineShift { BS_BASELINE, BS_SUB, BS_SUPER, BS_LENGTH @@ -58,10 +64,6 @@ namespace WebCore { SR_AUTO, SR_OPTIMIZESPEED, SR_CRISPEDGES, SR_GEOMETRICPRECISION }; - enum SVGWritingMode { - WM_LRTB, WM_LR, WM_RLTB, WM_RL, WM_TBRL, WM_TB - }; - enum EGlyphOrientation { GO_0DEG, GO_90DEG, GO_180DEG, GO_270DEG, GO_AUTO }; @@ -94,6 +96,23 @@ namespace WebCore { MT_ALPHA }; + // These are all minimized combinations of paint-order. + enum PaintOrder { + PaintOrderNormal = 0, + PaintOrderFill = 1, + PaintOrderFillMarkers = 2, + PaintOrderStroke = 3, + PaintOrderStrokeMarkers = 4, + PaintOrderMarkers = 5, + PaintOrderMarkersStroke = 6 + }; + + enum PaintType { + PaintTypeFill, + PaintTypeStroke, + PaintTypeMarkers + }; + class CSSValue; class CSSValueList; class SVGPaint; @@ -101,8 +120,8 @@ namespace WebCore { // Inherited/Non-Inherited Style Datastructures class StyleFillData : public RefCounted<StyleFillData> { public: - static PassRef<StyleFillData> create() { return adoptRef(*new StyleFillData); } - PassRef<StyleFillData> copy() const; + static Ref<StyleFillData> create() { return adoptRef(*new StyleFillData); } + Ref<StyleFillData> copy() const; bool operator==(const StyleFillData&) const; bool operator!=(const StyleFillData& other) const @@ -111,10 +130,10 @@ namespace WebCore { } float opacity; - SVGPaint::SVGPaintType paintType; + SVGPaintType paintType; Color paintColor; String paintUri; - SVGPaint::SVGPaintType visitedLinkPaintType; + SVGPaintType visitedLinkPaintType; Color visitedLinkPaintColor; String visitedLinkPaintUri; @@ -125,8 +144,8 @@ namespace WebCore { class StyleStrokeData : public RefCounted<StyleStrokeData> { public: - static PassRef<StyleStrokeData> create() { return adoptRef(*new StyleStrokeData); } - PassRef<StyleStrokeData> copy() const; + static Ref<StyleStrokeData> create() { return adoptRef(*new StyleStrokeData); } + Ref<StyleStrokeData> copy() const; bool operator==(const StyleStrokeData&) const; bool operator!=(const StyleStrokeData& other) const @@ -137,14 +156,13 @@ namespace WebCore { float opacity; float miterLimit; - SVGLength width; - SVGLength dashOffset; - Vector<SVGLength> dashArray; + Length dashOffset; + Vector<SVGLengthValue> dashArray; - SVGPaint::SVGPaintType paintType; + SVGPaintType paintType; Color paintColor; String paintUri; - SVGPaint::SVGPaintType visitedLinkPaintType; + SVGPaintType visitedLinkPaintType; Color visitedLinkPaintColor; String visitedLinkPaintUri; @@ -155,8 +173,8 @@ namespace WebCore { class StyleStopData : public RefCounted<StyleStopData> { public: - static PassRef<StyleStopData> create() { return adoptRef(*new StyleStopData); } - PassRef<StyleStopData> copy() const; + static Ref<StyleStopData> create() { return adoptRef(*new StyleStopData); } + Ref<StyleStopData> copy() const; bool operator==(const StyleStopData&) const; bool operator!=(const StyleStopData& other) const @@ -174,8 +192,8 @@ namespace WebCore { class StyleTextData : public RefCounted<StyleTextData> { public: - static PassRef<StyleTextData> create() { return adoptRef(*new StyleTextData); } - PassRef<StyleTextData> copy() const; + static Ref<StyleTextData> create() { return adoptRef(*new StyleTextData); } + Ref<StyleTextData> copy() const; bool operator==(const StyleTextData& other) const; bool operator!=(const StyleTextData& other) const @@ -183,7 +201,7 @@ namespace WebCore { return !(*this == other); } - SVGLength kerning; + SVGLengthValue kerning; private: StyleTextData(); @@ -193,8 +211,8 @@ namespace WebCore { // Note: the rule for this class is, *no inheritance* of these props class StyleMiscData : public RefCounted<StyleMiscData> { public: - static PassRef<StyleMiscData> create() { return adoptRef(*new StyleMiscData); } - PassRef<StyleMiscData> copy() const; + static Ref<StyleMiscData> create() { return adoptRef(*new StyleMiscData); } + Ref<StyleMiscData> copy() const; bool operator==(const StyleMiscData&) const; bool operator!=(const StyleMiscData& other) const @@ -207,7 +225,7 @@ namespace WebCore { Color lightingColor; // non-inherited text stuff lives here not in StyleTextData. - SVGLength baselineShiftValue; + SVGLengthValue baselineShiftValue; private: StyleMiscData(); @@ -216,8 +234,8 @@ namespace WebCore { class StyleShadowSVGData : public RefCounted<StyleShadowSVGData> { public: - static PassRef<StyleShadowSVGData> create() { return adoptRef(*new StyleShadowSVGData); } - PassRef<StyleShadowSVGData> copy() const; + static Ref<StyleShadowSVGData> create() { return adoptRef(*new StyleShadowSVGData); } + Ref<StyleShadowSVGData> copy() const; bool operator==(const StyleShadowSVGData&) const; bool operator!=(const StyleShadowSVGData& other) const @@ -225,7 +243,7 @@ namespace WebCore { return !(*this == other); } - OwnPtr<ShadowData> shadow; + std::unique_ptr<ShadowData> shadow; private: StyleShadowSVGData(); @@ -235,8 +253,8 @@ namespace WebCore { // Non-inherited resources class StyleResourceData : public RefCounted<StyleResourceData> { public: - static PassRef<StyleResourceData> create() { return adoptRef(*new StyleResourceData); } - PassRef<StyleResourceData> copy() const; + static Ref<StyleResourceData> create() { return adoptRef(*new StyleResourceData); } + Ref<StyleResourceData> copy() const; bool operator==(const StyleResourceData&) const; bool operator!=(const StyleResourceData& other) const @@ -245,7 +263,6 @@ namespace WebCore { } String clipper; - String filter; String masker; private: @@ -256,8 +273,8 @@ namespace WebCore { // Inherited resources class StyleInheritedResourceData : public RefCounted<StyleInheritedResourceData> { public: - static PassRef<StyleInheritedResourceData> create() { return adoptRef(*new StyleInheritedResourceData); } - PassRef<StyleInheritedResourceData> copy() const; + static Ref<StyleInheritedResourceData> create() { return adoptRef(*new StyleInheritedResourceData); } + Ref<StyleInheritedResourceData> copy() const; bool operator==(const StyleInheritedResourceData&) const; bool operator!=(const StyleInheritedResourceData& other) const @@ -274,7 +291,29 @@ namespace WebCore { StyleInheritedResourceData(const StyleInheritedResourceData&); }; -} // namespace WebCore + // Positioning and sizing properties. + class StyleLayoutData : public RefCounted<StyleLayoutData> { + public: + static Ref<StyleLayoutData> create() { return adoptRef(*new StyleLayoutData); } + Ref<StyleLayoutData> copy() const; -#endif // ENABLE(SVG) -#endif // SVGRenderStyleDefs_h + bool operator==(const StyleLayoutData&) const; + bool operator!=(const StyleLayoutData& other) const + { + return !(*this == other); + } + + Length cx; + Length cy; + Length r; + Length rx; + Length ry; + Length x; + Length y; + + private: + StyleLayoutData(); + StyleLayoutData(const StyleLayoutData&); + }; + +} // namespace WebCore |