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

Unified Diff: Source/core/layout/svg/LayoutSVGResourcePaintServer.h

Issue 908243002: Move rendering/svg/RenderSVGResource* to layout/svg. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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/svg/LayoutSVGResourcePaintServer.h
diff --git a/Source/core/rendering/svg/RenderSVGResourcePaintServer.h b/Source/core/layout/svg/LayoutSVGResourcePaintServer.h
similarity index 77%
rename from Source/core/rendering/svg/RenderSVGResourcePaintServer.h
rename to Source/core/layout/svg/LayoutSVGResourcePaintServer.h
index dec11c2b8425890c0ae81204f0a0759508bd96f1..13afde18d1a0b77170440d3a9d851a52d045835f 100644
--- a/Source/core/rendering/svg/RenderSVGResourcePaintServer.h
+++ b/Source/core/layout/svg/LayoutSVGResourcePaintServer.h
@@ -17,17 +17,17 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef RenderSVGResourcePaintServer_h
-#define RenderSVGResourcePaintServer_h
+#ifndef LayoutSVGResourcePaintServer_h
+#define LayoutSVGResourcePaintServer_h
-#include "core/rendering/svg/RenderSVGResourceContainer.h"
+#include "core/layout/svg/LayoutSVGResourceContainer.h"
#include "platform/graphics/Color.h"
#include "platform/graphics/Gradient.h"
#include "platform/graphics/Pattern.h"
namespace blink {
-enum RenderSVGResourceMode {
+enum LayoutSVGResourceMode {
ApplyToFillMode,
ApplyToStrokeMode,
};
@@ -35,7 +35,7 @@ enum RenderSVGResourceMode {
class GraphicsContext;
class GraphicsContextStateSaver;
class LayoutObject;
-class RenderSVGResourcePaintServer;
+class LayoutSVGResourcePaintServer;
class LayoutStyle;
class SVGPaintServer {
@@ -44,10 +44,10 @@ public:
explicit SVGPaintServer(PassRefPtr<Gradient>);
explicit SVGPaintServer(PassRefPtr<Pattern>);
- static SVGPaintServer requestForRenderer(const LayoutObject&, const LayoutStyle&, RenderSVGResourceMode);
- static bool existsForRenderer(const LayoutObject&, const LayoutStyle&, RenderSVGResourceMode);
+ static SVGPaintServer requestForRenderer(const LayoutObject&, const LayoutStyle&, LayoutSVGResourceMode);
+ static bool existsForRenderer(const LayoutObject&, const LayoutStyle&, LayoutSVGResourceMode);
- void apply(GraphicsContext&, RenderSVGResourceMode, float paintAlpha, GraphicsContextStateSaver&);
+ void apply(GraphicsContext&, LayoutSVGResourceMode, float paintAlpha, GraphicsContextStateSaver&);
static SVGPaintServer invalid() { return SVGPaintServer(Color(Color::transparent)); }
bool isValid() const { return m_color != Color::transparent; }
@@ -65,27 +65,27 @@ private:
struct SVGPaintDescription {
SVGPaintDescription() : resource(nullptr), isValid(false), hasFallback(false) { }
SVGPaintDescription(Color color) : resource(nullptr), color(color), isValid(true), hasFallback(false) { }
- SVGPaintDescription(RenderSVGResourcePaintServer* resource) : resource(resource), isValid(true), hasFallback(false) { ASSERT(resource); }
- SVGPaintDescription(RenderSVGResourcePaintServer* resource, Color fallbackColor) : resource(resource), color(fallbackColor), isValid(true), hasFallback(true) { ASSERT(resource); }
+ SVGPaintDescription(LayoutSVGResourcePaintServer* resource) : resource(resource), isValid(true), hasFallback(false) { ASSERT(resource); }
+ SVGPaintDescription(LayoutSVGResourcePaintServer* resource, Color fallbackColor) : resource(resource), color(fallbackColor), isValid(true), hasFallback(true) { ASSERT(resource); }
- RenderSVGResourcePaintServer* resource;
+ LayoutSVGResourcePaintServer* resource;
Color color;
bool isValid;
bool hasFallback;
};
-class RenderSVGResourcePaintServer : public RenderSVGResourceContainer {
+class LayoutSVGResourcePaintServer : public LayoutSVGResourceContainer {
public:
- RenderSVGResourcePaintServer(SVGElement*);
- virtual ~RenderSVGResourcePaintServer();
+ LayoutSVGResourcePaintServer(SVGElement*);
+ virtual ~LayoutSVGResourcePaintServer();
virtual SVGPaintServer preparePaintServer(const LayoutObject&) = 0;
// Helper utilities used in to access the underlying resources for DRT.
- static SVGPaintDescription requestPaintDescription(const LayoutObject&, const LayoutStyle&, RenderSVGResourceMode);
+ static SVGPaintDescription requestPaintDescription(const LayoutObject&, const LayoutStyle&, LayoutSVGResourceMode);
};
-DEFINE_TYPE_CASTS(RenderSVGResourcePaintServer, RenderSVGResourceContainer, resource, resource->isSVGPaintServer(), resource.isSVGPaintServer());
+DEFINE_TYPE_CASTS(LayoutSVGResourcePaintServer, LayoutSVGResourceContainer, resource, resource->isSVGPaintServer(), resource.isSVGPaintServer());
}
« no previous file with comments | « Source/core/layout/svg/LayoutSVGResourceMasker.cpp ('k') | Source/core/layout/svg/LayoutSVGResourcePaintServer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698