Commit 45477127 authored by fs's avatar fs Committed by Commit bot

Make SVG*StringList and SVGStringListTearOff scarcer

(Primarily) because of their inclusion in the SVGTests interface, these
two make their way into a lot more compilation units than has use for
them. The principal access to this data is the SVGTests::isValid()
method, so only the actual bindings should need any deeper insight into
these. Shuffle declarations and definitions to make their inclusion more
scarce. (From ~194 -> ~13 total dependencies for the latter, based on
"ninja -t deps".)

Review-Url: https://codereview.chromium.org/2360383003
Cr-Commit-Position: refs/heads/master@{#420614}
parent b7a682b6
...@@ -24,12 +24,11 @@ ...@@ -24,12 +24,11 @@
#include "core/CSSPropertyNames.h" #include "core/CSSPropertyNames.h"
#include "core/css/StylePropertySet.h" #include "core/css/StylePropertySet.h"
#include "core/css/parser/CSSParser.h"
#include "core/dom/Document.h" #include "core/dom/Document.h"
#include "core/dom/QualifiedName.h" #include "core/dom/QualifiedName.h"
#include "core/dom/StyleChangeReason.h" #include "core/dom/StyleChangeReason.h"
#include "core/svg/SVGAnimatedTypeAnimator.h" #include "core/svg/SVGAnimatedTypeAnimator.h"
#include "core/svg/SVGDocumentExtensions.h" #include "core/svg/properties/SVGProperty.h"
namespace blink { namespace blink {
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include "core/svg/SVGPointList.h" #include "core/svg/SVGPointList.h"
#include "core/svg/SVGString.h" #include "core/svg/SVGString.h"
#include "core/svg/SVGTransformList.h" #include "core/svg/SVGTransformList.h"
#include "core/svg/properties/SVGAnimatedProperty.h"
namespace blink { namespace blink {
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include "core/svg/SVGStaticStringList.h" #include "core/svg/SVGStaticStringList.h"
#include "core/svg/SVGElement.h" #include "core/svg/SVGElement.h"
#include "core/svg/SVGStringListTearOff.h"
namespace blink { namespace blink {
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include "core/SVGNames.h" #include "core/SVGNames.h"
#include "core/svg/SVGElement.h" #include "core/svg/SVGElement.h"
#include "core/svg/SVGStaticStringList.h"
#include "platform/Language.h" #include "platform/Language.h"
namespace blink { namespace blink {
...@@ -45,6 +46,21 @@ DEFINE_TRACE(SVGTests) ...@@ -45,6 +46,21 @@ DEFINE_TRACE(SVGTests)
visitor->trace(m_systemLanguage); visitor->trace(m_systemLanguage);
} }
SVGStringListTearOff* SVGTests::requiredFeatures()
{
return m_requiredFeatures->tearOff();
}
SVGStringListTearOff* SVGTests::requiredExtensions()
{
return m_requiredExtensions->tearOff();
}
SVGStringListTearOff* SVGTests::systemLanguage()
{
return m_systemLanguage->tearOff();
}
bool SVGTests::isValid() const bool SVGTests::isValid() const
{ {
// No need to check requiredFeatures since hasFeature always returns true. // No need to check requiredFeatures since hasFeature always returns true.
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
#define SVGTests_h #define SVGTests_h
#include "core/CoreExport.h" #include "core/CoreExport.h"
#include "core/svg/SVGStaticStringList.h"
#include "platform/heap/Handle.h" #include "platform/heap/Handle.h"
namespace blink { namespace blink {
...@@ -30,13 +29,15 @@ namespace blink { ...@@ -30,13 +29,15 @@ namespace blink {
class Document; class Document;
class QualifiedName; class QualifiedName;
class SVGElement; class SVGElement;
class SVGStaticStringList;
class SVGStringListTearOff;
class CORE_EXPORT SVGTests : public GarbageCollectedMixin { class CORE_EXPORT SVGTests : public GarbageCollectedMixin {
public: public:
// JS API // JS API
SVGStringListTearOff* requiredFeatures() { return m_requiredFeatures->tearOff(); } SVGStringListTearOff* requiredFeatures();
SVGStringListTearOff* requiredExtensions() { return m_requiredExtensions->tearOff(); } SVGStringListTearOff* requiredExtensions();
SVGStringListTearOff* systemLanguage() { return m_systemLanguage->tearOff(); } SVGStringListTearOff* systemLanguage();
bool isValid() const; bool isValid() const;
......
...@@ -20,7 +20,9 @@ ...@@ -20,7 +20,9 @@
#include "core/svg/SVGViewElement.h" #include "core/svg/SVGViewElement.h"
#include "core/SVGNames.h"
#include "core/frame/UseCounter.h" #include "core/frame/UseCounter.h"
#include "core/svg/SVGStaticStringList.h"
namespace blink { namespace blink {
...@@ -42,6 +44,11 @@ DEFINE_TRACE(SVGViewElement) ...@@ -42,6 +44,11 @@ DEFINE_TRACE(SVGViewElement)
SVGFitToViewBox::trace(visitor); SVGFitToViewBox::trace(visitor);
} }
SVGStringListTearOff* SVGViewElement::viewTarget()
{
return m_viewTarget->tearOff();
}
void SVGViewElement::parseAttribute(const QualifiedName& name, const AtomicString& oldValue, const AtomicString& value) void SVGViewElement::parseAttribute(const QualifiedName& name, const AtomicString& oldValue, const AtomicString& value)
{ {
if (SVGZoomAndPan::parseAttribute(name, value)) if (SVGZoomAndPan::parseAttribute(name, value))
......
...@@ -21,16 +21,16 @@ ...@@ -21,16 +21,16 @@
#ifndef SVGViewElement_h #ifndef SVGViewElement_h
#define SVGViewElement_h #define SVGViewElement_h
#include "core/SVGNames.h"
#include "core/svg/SVGAnimatedBoolean.h"
#include "core/svg/SVGElement.h" #include "core/svg/SVGElement.h"
#include "core/svg/SVGFitToViewBox.h" #include "core/svg/SVGFitToViewBox.h"
#include "core/svg/SVGStaticStringList.h"
#include "core/svg/SVGZoomAndPan.h" #include "core/svg/SVGZoomAndPan.h"
#include "platform/heap/Handle.h" #include "platform/heap/Handle.h"
namespace blink { namespace blink {
class SVGStaticStringList;
class SVGStringListTearOff;
class SVGViewElement final : public SVGElement, class SVGViewElement final : public SVGElement,
public SVGFitToViewBox, public SVGFitToViewBox,
public SVGZoomAndPan { public SVGZoomAndPan {
...@@ -39,7 +39,7 @@ class SVGViewElement final : public SVGElement, ...@@ -39,7 +39,7 @@ class SVGViewElement final : public SVGElement,
public: public:
DECLARE_NODE_FACTORY(SVGViewElement); DECLARE_NODE_FACTORY(SVGViewElement);
SVGStringListTearOff* viewTarget() { return m_viewTarget->tearOff(); } SVGStringListTearOff* viewTarget();
DECLARE_VIRTUAL_TRACE(); DECLARE_VIRTUAL_TRACE();
......
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