bindings: Makes all the DOM classes derive ScriptWrappableBase.

Since the size of ScriptWrappableBase is zero, this change will not increase the size of CSSValue, etc.

BUG=235436

Review URL: https://codereview.chromium.org/424783002

git-svn-id: svn://svn.chromium.org/blink/trunk@179102 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 197ef1d4
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#ifndef CSSRule_h #ifndef CSSRule_h
#define CSSRule_h #define CSSRule_h
#include "bindings/core/v8/ScriptWrappable.h"
#include "platform/heap/Handle.h" #include "platform/heap/Handle.h"
#include "wtf/RefCounted.h" #include "wtf/RefCounted.h"
#include "wtf/text/WTFString.h" #include "wtf/text/WTFString.h"
...@@ -33,7 +34,7 @@ class CSSParserContext; ...@@ -33,7 +34,7 @@ class CSSParserContext;
class CSSStyleSheet; class CSSStyleSheet;
class StyleRuleBase; class StyleRuleBase;
class CSSRule : public RefCountedWillBeGarbageCollectedFinalized<CSSRule> { class CSSRule : public RefCountedWillBeGarbageCollectedFinalized<CSSRule>, public ScriptWrappableBase {
public: public:
virtual ~CSSRule() { } virtual ~CSSRule() { }
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#ifndef CSSValue_h #ifndef CSSValue_h
#define CSSValue_h #define CSSValue_h
#include "bindings/core/v8/ScriptWrappable.h"
#include "core/dom/ExceptionCode.h" #include "core/dom/ExceptionCode.h"
#include "platform/heap/Handle.h" #include "platform/heap/Handle.h"
#include "platform/weborigin/KURL.h" #include "platform/weborigin/KURL.h"
...@@ -41,7 +42,7 @@ enum CSSTextFormattingFlags { QuoteCSSStringIfNeeded, AlwaysQuoteCSSString }; ...@@ -41,7 +42,7 @@ enum CSSTextFormattingFlags { QuoteCSSStringIfNeeded, AlwaysQuoteCSSString };
// They should be handled by separate wrapper classes. // They should be handled by separate wrapper classes.
// Please don't expose more CSSValue types to the web. // Please don't expose more CSSValue types to the web.
class CSSValue : public RefCountedWillBeGarbageCollectedFinalized<CSSValue> { class CSSValue : public RefCountedWillBeGarbageCollectedFinalized<CSSValue>, public ScriptWrappableBase {
public: public:
enum Type { enum Type {
CSS_INHERIT = 0, CSS_INHERIT = 0,
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#ifndef RGBColor_h #ifndef RGBColor_h
#define RGBColor_h #define RGBColor_h
#include "bindings/core/v8/ScriptWrappable.h"
#include "platform/graphics/Color.h" #include "platform/graphics/Color.h"
#include "platform/heap/Handle.h" #include "platform/heap/Handle.h"
#include "wtf/RefCounted.h" #include "wtf/RefCounted.h"
...@@ -35,7 +36,7 @@ namespace blink { ...@@ -35,7 +36,7 @@ namespace blink {
class CSSPrimitiveValue; class CSSPrimitiveValue;
class RGBColor : public RefCountedWillBeGarbageCollected<RGBColor> { class RGBColor : public RefCountedWillBeGarbageCollected<RGBColor>, public ScriptWrappableBase {
public: public:
static PassRefPtrWillBeRawPtr<RGBColor> create(unsigned rgbColor); static PassRefPtrWillBeRawPtr<RGBColor> create(unsigned rgbColor);
......
...@@ -21,13 +21,14 @@ ...@@ -21,13 +21,14 @@
#ifndef Rect_h #ifndef Rect_h
#define Rect_h #define Rect_h
#include "bindings/core/v8/ScriptWrappable.h"
#include "core/css/CSSPrimitiveValue.h" #include "core/css/CSSPrimitiveValue.h"
#include "wtf/RefPtr.h" #include "wtf/RefPtr.h"
#include "wtf/text/StringBuilder.h" #include "wtf/text/StringBuilder.h"
namespace blink { namespace blink {
class RectBase : public RefCountedWillBeGarbageCollected<RectBase> { class RectBase : public RefCountedWillBeGarbageCollected<RectBase>, public ScriptWrappableBase {
DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(RectBase); DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(RectBase);
public: public:
CSSPrimitiveValue* top() const { return m_top.get(); } CSSPrimitiveValue* top() const { return m_top.get(); }
......
...@@ -5,11 +5,12 @@ ...@@ -5,11 +5,12 @@
#ifndef DOMPointReadOnly_h #ifndef DOMPointReadOnly_h
#define DOMPointReadOnly_h #define DOMPointReadOnly_h
#include "bindings/core/v8/ScriptWrappable.h"
#include "platform/heap/Handle.h" #include "platform/heap/Handle.h"
namespace WebCore { namespace WebCore {
class DOMPointReadOnly : public GarbageCollected<DOMPointReadOnly> { class DOMPointReadOnly : public GarbageCollected<DOMPointReadOnly>, public ScriptWrappableBase {
public: public:
static DOMPointReadOnly* create(double x, double y, double z, double w); static DOMPointReadOnly* create(double x, double y, double z, double w);
......
...@@ -5,11 +5,12 @@ ...@@ -5,11 +5,12 @@
#ifndef DOMRectReadOnly_h #ifndef DOMRectReadOnly_h
#define DOMRectReadOnly_h #define DOMRectReadOnly_h
#include "bindings/core/v8/ScriptWrappable.h"
#include "platform/heap/Handle.h" #include "platform/heap/Handle.h"
namespace WebCore { namespace WebCore {
class DOMRectReadOnly : public GarbageCollected<DOMRectReadOnly> { class DOMRectReadOnly : public GarbageCollected<DOMRectReadOnly>, public ScriptWrappableBase {
public: public:
static DOMRectReadOnly* create(double x, double y, double width, double height); static DOMRectReadOnly* create(double x, double y, double width, double height);
......
...@@ -32,6 +32,7 @@ G* * Redistributions in binary form must reproduce the above ...@@ -32,6 +32,7 @@ G* * Redistributions in binary form must reproduce the above
#define SVGAnimatedProperty_h #define SVGAnimatedProperty_h
#include "bindings/core/v8/ExceptionStatePlaceholder.h" #include "bindings/core/v8/ExceptionStatePlaceholder.h"
#include "bindings/core/v8/ScriptWrappable.h"
#include "core/dom/ExceptionCode.h" #include "core/dom/ExceptionCode.h"
#include "core/svg/SVGParsingError.h" #include "core/svg/SVGParsingError.h"
#include "core/svg/properties/SVGPropertyInfo.h" #include "core/svg/properties/SVGPropertyInfo.h"
...@@ -44,7 +45,7 @@ namespace blink { ...@@ -44,7 +45,7 @@ namespace blink {
class SVGElement; class SVGElement;
class SVGAnimatedPropertyBase : public RefCounted<SVGAnimatedPropertyBase> { class SVGAnimatedPropertyBase : public RefCounted<SVGAnimatedPropertyBase>, public ScriptWrappableBase {
public: public:
virtual ~SVGAnimatedPropertyBase(); virtual ~SVGAnimatedPropertyBase();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment