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

Unified Diff: Source/bindings/v8/CustomElementHelpers.cpp

Issue 15338005: Remove ENABLE(SVG) from bindings/ (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 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
« no previous file with comments | « no previous file | Source/bindings/v8/custom/V8CSSValueCustom.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/CustomElementHelpers.cpp
diff --git a/Source/bindings/v8/CustomElementHelpers.cpp b/Source/bindings/v8/CustomElementHelpers.cpp
index f86ab7f2f1a57eee29b339d061e6e9d72b241661..a55d0628ca941466e4f233a246728eda2021bbd8 100644
--- a/Source/bindings/v8/CustomElementHelpers.cpp
+++ b/Source/bindings/v8/CustomElementHelpers.cpp
@@ -33,8 +33,10 @@
#include "bindings/v8/CustomElementHelpers.h"
#include "HTMLNames.h"
+#include "SVGNames.h"
#include "V8CustomElementConstructor.h"
#include "V8HTMLElementWrapperFactory.h"
+#include "V8SVGElementWrapperFactory.h"
#include "bindings/v8/DOMDataStore.h"
#include "bindings/v8/DOMWrapperWorld.h"
#include "bindings/v8/ScriptController.h"
@@ -42,12 +44,7 @@
#include "core/dom/Node.h"
#include "core/html/HTMLElement.h"
#include "core/html/HTMLUnknownElement.h"
-
-#if ENABLE(SVG)
-#include "V8SVGElementWrapperFactory.h"
-#include "SVGNames.h"
#include "core/svg/SVGElement.h"
-#endif
namespace WebCore {
@@ -97,14 +94,12 @@ v8::Handle<v8::Object> CustomElementHelpers::CreateWrapperFunction::invoke(Eleme
if (m_html)
return m_html(toHTMLElement(element), creationContext, isolate);
return createV8HTMLFallbackWrapper(toHTMLUnknownElement(toHTMLElement(element)), creationContext, isolate);
- }
-#if ENABLE(SVG)
- else if (element->isSVGElement()) {
+ } else if (element->isSVGElement()) {
if (m_svg)
return m_svg(toSVGElement(element), creationContext, isolate);
return createV8SVGFallbackWrapper(toSVGElement(element), creationContext, isolate);
}
-#endif
+
ASSERT(0);
return v8::Handle<v8::Object>();
}
@@ -114,10 +109,8 @@ v8::Handle<v8::Object> CustomElementHelpers::createUpgradeCandidateWrapper(PassR
if (CustomElementRegistry::isCustomTagName(element->localName())) {
if (element->isHTMLElement())
return createV8HTMLDirectWrapper(toHTMLElement(element.get()), creationContext, isolate);
- #if ENABLE(SVG)
else if (element->isSVGElement())
return createV8SVGDirectWrapper(toSVGElement(element.get()), creationContext, isolate);
- #endif
else {
ASSERT(0);
return v8::Handle<v8::Object>();
@@ -185,12 +178,10 @@ bool CustomElementHelpers::isValidPrototypeParameter(const ScriptValue& prototyp
return true;
}
-#if ENABLE(SVG)
if (hasValidPrototypeChainFor(prototypeObject, &V8SVGElement::info, state->context())) {
namespaceURI = SVGNames::svgNamespaceURI;
return true;
}
-#endif
if (hasValidPrototypeChainFor(prototypeObject, &V8Element::info, state->context())) {
namespaceURI = nullAtom;
@@ -240,10 +231,8 @@ const QualifiedName* CustomElementHelpers::findLocalName(v8::Handle<v8::Object>
return 0;
if (const QualifiedName* htmlName = findHTMLTagNameOfV8Type(type))
return htmlName;
-#if ENABLE(SVG)
if (const QualifiedName* svgName = findSVGTagNameOfV8Type(type))
return svgName;
-#endif
return 0;
}
« no previous file with comments | « no previous file | Source/bindings/v8/custom/V8CSSValueCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698