Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / core / rendering / svg / SVGResources.h
index 5f3a8d4..d17fb12 100644 (file)
 #include "wtf/OwnPtr.h"
 #include "wtf/PassOwnPtr.h"
 
-namespace WebCore {
+namespace blink {
 
-class Document;
 class RenderObject;
 class RenderSVGResourceClipper;
 class RenderSVGResourceContainer;
 class RenderSVGResourceFilter;
 class RenderSVGResourceMarker;
 class RenderSVGResourceMasker;
+class RenderSVGResourcePaintServer;
+class SVGElement;
 class SVGRenderStyle;
 
 // Holds a set of resources associated with a RenderObject
@@ -43,9 +44,11 @@ class SVGResources {
 public:
     SVGResources();
 
-    static PassOwnPtr<SVGResources> buildResources(const RenderObject*, const SVGRenderStyle*);
+    static PassOwnPtr<SVGResources> buildResources(const RenderObject*, const SVGRenderStyle&);
     void layoutIfNeeded();
 
+    static bool supportsMarkers(const SVGElement&);
+
     // Ordinary resources
     RenderSVGResourceClipper* clipper() const { return m_clipperFilterMaskerData ? m_clipperFilterMaskerData->clipper : 0; }
     RenderSVGResourceMarker* markerStart() const { return m_markerData ? m_markerData->markerStart : 0; }
@@ -61,8 +64,8 @@ public:
     }
 
     // Paint servers
-    RenderSVGResourceContainer* fill() const { return m_fillStrokeData ? m_fillStrokeData->fill : 0; }
-    RenderSVGResourceContainer* stroke() const { return m_fillStrokeData ? m_fillStrokeData->stroke : 0; }
+    RenderSVGResourcePaintServer* fill() const { return m_fillStrokeData ? m_fillStrokeData->fill : 0; }
+    RenderSVGResourcePaintServer* stroke() const { return m_fillStrokeData ? m_fillStrokeData->stroke : 0; }
 
     // Chainable resources - linked through xlink:href
     RenderSVGResourceContainer* linkedResource() const { return m_linkedResource; }
@@ -99,8 +102,8 @@ private:
     bool setMarkerMid(RenderSVGResourceMarker*);
     bool setMarkerEnd(RenderSVGResourceMarker*);
     bool setMasker(RenderSVGResourceMasker*);
-    bool setFill(RenderSVGResourceContainer*);
-    bool setStroke(RenderSVGResourceContainer*);
+    bool setFill(RenderSVGResourcePaintServer*);
+    bool setStroke(RenderSVGResourcePaintServer*);
     bool setLinkedResource(RenderSVGResourceContainer*);
 
     // From SVG 1.1 2nd Edition
@@ -153,7 +156,7 @@ private:
     // From SVG 1.1 2nd Edition
     // fill:       'shapes' and 'text content elements'
     // stroke:     'shapes' and 'text content elements'
-    // -> altGlyph, circle, ellipse, line, path, polygon, polyline, rect, text, textPath, tspan
+    // -> circle, ellipse, line, path, polygon, polyline, rect, text, textPath, tspan
     struct FillStrokeData {
         WTF_MAKE_FAST_ALLOCATED;
     public:
@@ -168,8 +171,8 @@ private:
             return adoptPtr(new FillStrokeData);
         }
 
-        RenderSVGResourceContainer* fill;
-        RenderSVGResourceContainer* stroke;
+        RenderSVGResourcePaintServer* fill;
+        RenderSVGResourcePaintServer* stroke;
     };
 
     OwnPtr<ClipperFilterMaskerData> m_clipperFilterMaskerData;