Replaced 0 with nullptr in WebCore/svg.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 May 2015 01:46:15 +0000 (01:46 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 May 2015 01:46:15 +0000 (01:46 +0000)
https://bugs.webkit.org/show_bug.cgi?id=145367

Patch by Hunseop Jeong <hs85.jeong@samsung.com> on 2015-05-25
Reviewed by Gyuyoung Kim.

No new tests, no behavior changes.

* svg/PatternAttributes.h:
(WebCore::PatternAttributes::PatternAttributes):
* svg/SVGAnimatedType.h:
* svg/SVGElement.cpp:
(WebCore::SVGElement::cursorElementRemoved):
(WebCore::SVGElement::cursorImageValueRemoved):
(WebCore::SVGElement::getPresentationAttribute):
* svg/SVGException.cpp:
(WebCore::SVGException::initializeDescription):
* svg/SVGFEImageElement.cpp:
(WebCore::SVGFEImageElement::clearResourceReferences):
* svg/SVGFontFaceElement.cpp:
(WebCore::SVGFontFaceElement::SVGFontFaceElement):
(WebCore::SVGFontFaceElement::removedFrom):
* svg/SVGFontFaceUriElement.cpp:
(WebCore::SVGFontFaceUriElement::loadFont):
* svg/SVGLength.h:
(WebCore::SVGLength::blend):
* svg/SVGPathBlender.cpp:
(WebCore::SVGPathBlender::SVGPathBlender):
(WebCore::SVGPathBlender::cleanup):
* svg/SVGPathBuilder.cpp:
(WebCore::SVGPathBuilder::SVGPathBuilder):
* svg/SVGPathBuilder.h:
* svg/SVGPathByteStreamBuilder.cpp:
(WebCore::SVGPathByteStreamBuilder::SVGPathByteStreamBuilder):
* svg/SVGPathByteStreamBuilder.h:
* svg/SVGPathElement.cpp:
(WebCore::SVGPathElement::dPropertyInfo):
* svg/SVGPathParser.cpp:
(WebCore::SVGPathParser::SVGPathParser):
(WebCore::SVGPathParser::cleanup):
* svg/SVGPathSegListBuilder.cpp:
(WebCore::SVGPathSegListBuilder::SVGPathSegListBuilder):
* svg/SVGPathSegListBuilder.h:
* svg/SVGPathTraversalStateBuilder.cpp:
(WebCore::SVGPathTraversalStateBuilder::SVGPathTraversalStateBuilder):
* svg/SVGPathUtilities.cpp:
(WebCore::globalSVGPathBuilder):
(WebCore::globalSVGPathSegListBuilder):
(WebCore::globalSVGPathByteStreamBuilder):
(WebCore::globalSVGPathStringBuilder):
(WebCore::globalSVGPathTraversalStateBuilder):
(WebCore::globalSVGPathParser):
(WebCore::globalSVGPathBlender):
* svg/SVGPolyElement.cpp:
(WebCore::SVGPolyElement::pointsPropertyInfo):
* svg/SVGTRefElement.cpp:
(WebCore::SVGTRefTargetEventListener::cast):
(WebCore::SVGTRefTargetEventListener::SVGTRefTargetEventListener):
* svg/SVGTextContentElement.cpp:
(WebCore::SVGTextContentElement::textLengthPropertyInfo):
* svg/SVGURIReference.h:
* svg/SVGViewSpec.cpp:
(WebCore::SVGViewSpec::viewBoxPropertyInfo):
(WebCore::SVGViewSpec::preserveAspectRatioPropertyInfo):
(WebCore::SVGViewSpec::transformPropertyInfo):
* svg/SVGViewSpec.h:
(WebCore::SVGViewSpec::resetContextElement):
* svg/animation/SMILTimeContainer.cpp:
(WebCore::SMILTimeContainer::updateAnimations):
* svg/animation/SVGSMILElement.cpp:
(WebCore::ConditionEventListener::cast):
(WebCore::ConditionEventListener::disconnectAnimation):
(WebCore::SVGSMILElement::SVGSMILElement):
(WebCore::SVGSMILElement::removedFrom):
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::drawForContainer):
* svg/graphics/filters/SVGFEImage.cpp:
(WebCore::FEImage::FEImage):
* svg/graphics/filters/SVGFilterBuilder.cpp:
(WebCore::SVGFilterBuilder::clearEffects):
* svg/properties/SVGAnimatedPathSegListPropertyTearOff.h:
(WebCore::SVGAnimatedPathSegListPropertyTearOff::animationEnded):
(WebCore::SVGAnimatedPathSegListPropertyTearOff::SVGAnimatedPathSegListPropertyTearOff):
* svg/properties/SVGAnimatedPropertyDescription.h:
(WebCore::SVGAnimatedPropertyDescription::SVGAnimatedPropertyDescription):
* svg/properties/SVGAnimatedPropertyTearOff.h:
(WebCore::SVGAnimatedPropertyTearOff::~SVGAnimatedPropertyTearOff):
* svg/properties/SVGAnimatedStaticPropertyTearOff.h:
(WebCore::SVGAnimatedStaticPropertyTearOff::animationEnded):
(WebCore::SVGAnimatedStaticPropertyTearOff::SVGAnimatedStaticPropertyTearOff):
* svg/properties/SVGPropertyTearOff.h:
(WebCore::SVGPropertyTearOff::SVGPropertyTearOff):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@184852 268f45cc-cd09-0410-ab3c-d52691b4dbfc

36 files changed:
Source/WebCore/ChangeLog
Source/WebCore/svg/PatternAttributes.h
Source/WebCore/svg/SVGAnimatedType.h
Source/WebCore/svg/SVGElement.cpp
Source/WebCore/svg/SVGException.cpp
Source/WebCore/svg/SVGFEImageElement.cpp
Source/WebCore/svg/SVGFontFaceElement.cpp
Source/WebCore/svg/SVGFontFaceUriElement.cpp
Source/WebCore/svg/SVGLength.h
Source/WebCore/svg/SVGPathBlender.cpp
Source/WebCore/svg/SVGPathBuilder.cpp
Source/WebCore/svg/SVGPathBuilder.h
Source/WebCore/svg/SVGPathByteStreamBuilder.cpp
Source/WebCore/svg/SVGPathByteStreamBuilder.h
Source/WebCore/svg/SVGPathElement.cpp
Source/WebCore/svg/SVGPathParser.cpp
Source/WebCore/svg/SVGPathSegListBuilder.cpp
Source/WebCore/svg/SVGPathSegListBuilder.h
Source/WebCore/svg/SVGPathTraversalStateBuilder.cpp
Source/WebCore/svg/SVGPathUtilities.cpp
Source/WebCore/svg/SVGPolyElement.cpp
Source/WebCore/svg/SVGTRefElement.cpp
Source/WebCore/svg/SVGTextContentElement.cpp
Source/WebCore/svg/SVGURIReference.h
Source/WebCore/svg/SVGViewSpec.cpp
Source/WebCore/svg/SVGViewSpec.h
Source/WebCore/svg/animation/SMILTimeContainer.cpp
Source/WebCore/svg/animation/SVGSMILElement.cpp
Source/WebCore/svg/graphics/SVGImage.cpp
Source/WebCore/svg/graphics/filters/SVGFEImage.cpp
Source/WebCore/svg/graphics/filters/SVGFilterBuilder.cpp
Source/WebCore/svg/properties/SVGAnimatedPathSegListPropertyTearOff.h
Source/WebCore/svg/properties/SVGAnimatedPropertyDescription.h
Source/WebCore/svg/properties/SVGAnimatedPropertyTearOff.h
Source/WebCore/svg/properties/SVGAnimatedStaticPropertyTearOff.h
Source/WebCore/svg/properties/SVGPropertyTearOff.h

index cd09afb..24922d2 100644 (file)
@@ -1,3 +1,97 @@
+2015-05-25  Hunseop Jeong  <hs85.jeong@samsung.com>
+
+        Replaced 0 with nullptr in WebCore/svg.
+        https://bugs.webkit.org/show_bug.cgi?id=145367
+
+        Reviewed by Gyuyoung Kim.
+
+        No new tests, no behavior changes.
+
+        * svg/PatternAttributes.h:
+        (WebCore::PatternAttributes::PatternAttributes):
+        * svg/SVGAnimatedType.h:
+        * svg/SVGElement.cpp:
+        (WebCore::SVGElement::cursorElementRemoved):
+        (WebCore::SVGElement::cursorImageValueRemoved):
+        (WebCore::SVGElement::getPresentationAttribute):
+        * svg/SVGException.cpp:
+        (WebCore::SVGException::initializeDescription):
+        * svg/SVGFEImageElement.cpp:
+        (WebCore::SVGFEImageElement::clearResourceReferences):
+        * svg/SVGFontFaceElement.cpp:
+        (WebCore::SVGFontFaceElement::SVGFontFaceElement):
+        (WebCore::SVGFontFaceElement::removedFrom):
+        * svg/SVGFontFaceUriElement.cpp:
+        (WebCore::SVGFontFaceUriElement::loadFont):
+        * svg/SVGLength.h:
+        (WebCore::SVGLength::blend):
+        * svg/SVGPathBlender.cpp:
+        (WebCore::SVGPathBlender::SVGPathBlender):
+        (WebCore::SVGPathBlender::cleanup):
+        * svg/SVGPathBuilder.cpp:
+        (WebCore::SVGPathBuilder::SVGPathBuilder):
+        * svg/SVGPathBuilder.h:
+        * svg/SVGPathByteStreamBuilder.cpp:
+        (WebCore::SVGPathByteStreamBuilder::SVGPathByteStreamBuilder):
+        * svg/SVGPathByteStreamBuilder.h:
+        * svg/SVGPathElement.cpp:
+        (WebCore::SVGPathElement::dPropertyInfo):
+        * svg/SVGPathParser.cpp:
+        (WebCore::SVGPathParser::SVGPathParser):
+        (WebCore::SVGPathParser::cleanup):
+        * svg/SVGPathSegListBuilder.cpp:
+        (WebCore::SVGPathSegListBuilder::SVGPathSegListBuilder):
+        * svg/SVGPathSegListBuilder.h:
+        * svg/SVGPathTraversalStateBuilder.cpp:
+        (WebCore::SVGPathTraversalStateBuilder::SVGPathTraversalStateBuilder):
+        * svg/SVGPathUtilities.cpp:
+        (WebCore::globalSVGPathBuilder):
+        (WebCore::globalSVGPathSegListBuilder):
+        (WebCore::globalSVGPathByteStreamBuilder):
+        (WebCore::globalSVGPathStringBuilder):
+        (WebCore::globalSVGPathTraversalStateBuilder):
+        (WebCore::globalSVGPathParser):
+        (WebCore::globalSVGPathBlender):
+        * svg/SVGPolyElement.cpp:
+        (WebCore::SVGPolyElement::pointsPropertyInfo):
+        * svg/SVGTRefElement.cpp:
+        (WebCore::SVGTRefTargetEventListener::cast):
+        (WebCore::SVGTRefTargetEventListener::SVGTRefTargetEventListener):
+        * svg/SVGTextContentElement.cpp:
+        (WebCore::SVGTextContentElement::textLengthPropertyInfo):
+        * svg/SVGURIReference.h:
+        * svg/SVGViewSpec.cpp:
+        (WebCore::SVGViewSpec::viewBoxPropertyInfo):
+        (WebCore::SVGViewSpec::preserveAspectRatioPropertyInfo):
+        (WebCore::SVGViewSpec::transformPropertyInfo):
+        * svg/SVGViewSpec.h:
+        (WebCore::SVGViewSpec::resetContextElement):
+        * svg/animation/SMILTimeContainer.cpp:
+        (WebCore::SMILTimeContainer::updateAnimations):
+        * svg/animation/SVGSMILElement.cpp:
+        (WebCore::ConditionEventListener::cast):
+        (WebCore::ConditionEventListener::disconnectAnimation):
+        (WebCore::SVGSMILElement::SVGSMILElement):
+        (WebCore::SVGSMILElement::removedFrom):
+        * svg/graphics/SVGImage.cpp:
+        (WebCore::SVGImage::drawForContainer):
+        * svg/graphics/filters/SVGFEImage.cpp:
+        (WebCore::FEImage::FEImage):
+        * svg/graphics/filters/SVGFilterBuilder.cpp:
+        (WebCore::SVGFilterBuilder::clearEffects):
+        * svg/properties/SVGAnimatedPathSegListPropertyTearOff.h:
+        (WebCore::SVGAnimatedPathSegListPropertyTearOff::animationEnded):
+        (WebCore::SVGAnimatedPathSegListPropertyTearOff::SVGAnimatedPathSegListPropertyTearOff):
+        * svg/properties/SVGAnimatedPropertyDescription.h:
+        (WebCore::SVGAnimatedPropertyDescription::SVGAnimatedPropertyDescription):
+        * svg/properties/SVGAnimatedPropertyTearOff.h:
+        (WebCore::SVGAnimatedPropertyTearOff::~SVGAnimatedPropertyTearOff):
+        * svg/properties/SVGAnimatedStaticPropertyTearOff.h:
+        (WebCore::SVGAnimatedStaticPropertyTearOff::animationEnded):
+        (WebCore::SVGAnimatedStaticPropertyTearOff::SVGAnimatedStaticPropertyTearOff):
+        * svg/properties/SVGPropertyTearOff.h:
+        (WebCore::SVGPropertyTearOff::SVGPropertyTearOff):
+
 2015-05-24  Sam Weinig  <sam@webkit.org>
 
         Crash when using a removed ScriptMessageHandler
index 0a09ac9..a968b7d 100644 (file)
@@ -37,7 +37,7 @@ struct PatternAttributes {
         , m_preserveAspectRatio()
         , m_patternUnits(SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)
         , m_patternContentUnits(SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE)
-        , m_patternContentElement(0)
+        , m_patternContentElement(nullptr)
         , m_xSet(false)
         , m_ySet(false)
         , m_widthSet(false)
index 355e03f..2914c2a 100644 (file)
@@ -276,7 +276,7 @@ private:
 
     union DataUnion {
         DataUnion()
-            : length(0)
+            : length(nullptr)
         {
         }
 
index 4fc9ffe..8a8516f 100644 (file)
@@ -458,7 +458,7 @@ void SVGElement::setCursorElement(SVGCursorElement* cursorElement)
 void SVGElement::cursorElementRemoved() 
 {
     ASSERT(m_svgRareData);
-    m_svgRareData->setCursorElement(0);
+    m_svgRareData->setCursorElement(nullptr);
 }
 
 void SVGElement::setCursorImageValue(CSSCursorImageValue* cursorImageValue)
@@ -475,7 +475,7 @@ void SVGElement::setCursorImageValue(CSSCursorImageValue* cursorImageValue)
 void SVGElement::cursorImageValueRemoved()
 {
     ASSERT(m_svgRareData);
-    m_svgRareData->setCursorImageValue(0);
+    m_svgRareData->setCursorImageValue(nullptr);
 }
 
 SVGElement* SVGElement::correspondingElement() const
@@ -1100,7 +1100,7 @@ RefPtr<CSSValue> SVGElement::getPresentationAttribute(const String& name)
     CSSPropertyID propertyID = cssPropertyIdForSVGAttributeName(attribute->name());
     style->setProperty(propertyID, attribute->value());
     RefPtr<CSSValue> cssValue = style->getPropertyCSSValue(propertyID);
-    return cssValue ? cssValue->cloneForCSSOM() : 0;
+    return cssValue ? cssValue->cloneForCSSOM() : nullptr;
 }
 
 bool SVGElement::instanceUpdatesBlocked() const
index 854bdcd..7614cbd 100644 (file)
@@ -54,8 +54,8 @@ bool SVGException::initializeDescription(ExceptionCode ec, ExceptionCodeDescript
     size_t tableSize = WTF_ARRAY_LENGTH(svgExceptions);
     size_t tableIndex = ec - SVG_WRONG_TYPE_ERR;
 
-    description->name = tableIndex < tableSize ? svgExceptions[tableIndex].name : 0;
-    description->description = tableIndex < tableSize ? svgExceptions[tableIndex].description : 0;
+    description->name = tableIndex < tableSize ? svgExceptions[tableIndex].name : nullptr;
+    description->description = tableIndex < tableSize ? svgExceptions[tableIndex].description : nullptr;
 
     return true;
 }
index 3d05448..4ef5c63 100644 (file)
@@ -69,7 +69,7 @@ void SVGFEImageElement::clearResourceReferences()
 {
     if (m_cachedImage) {
         m_cachedImage->removeClient(this);
-        m_cachedImage = 0;
+        m_cachedImage = nullptr;
     }
 
     document().accessSVGExtensions().removeAllTargetReferencesForElement(this);
index 069bf19..a257972 100644 (file)
@@ -50,7 +50,7 @@ using namespace SVGNames;
 inline SVGFontFaceElement::SVGFontFaceElement(const QualifiedName& tagName, Document& document)
     : SVGElement(tagName, document)
     , m_fontFaceRule(StyleRuleFontFace::create(MutableStyleProperties::create(CSSStrictMode)))
-    , m_fontElement(0)
+    , m_fontElement(nullptr)
 {
     ASSERT(hasTagName(font_faceTag));
 }
@@ -287,7 +287,7 @@ void SVGFontFaceElement::removedFrom(ContainerNode& rootParent)
     SVGElement::removedFrom(rootParent);
 
     if (rootParent.inDocument()) {
-        m_fontElement = 0;
+        m_fontElement = nullptr;
         document().accessSVGExtensions().unregisterSVGFontFaceElement(this);
         m_fontFaceRule->mutableProperties().clear();
 
index 42060e1..bb4fe1b 100644 (file)
@@ -109,7 +109,7 @@ void SVGFontFaceUriElement::loadFont()
             m_cachedFont->beginLoadIfNeeded(cachedResourceLoader);
         }
     } else
-        m_cachedFont = 0;
+        m_cachedFont = nullptr;
 }
 
 }
index ca9492f..a179d78 100644 (file)
@@ -141,7 +141,7 @@ public:
         ASSERT(!isRelative());
         ASSERT(!from.isRelative());
 
-        SVGLengthContext nonRelativeLengthContext(0);
+        SVGLengthContext nonRelativeLengthContext(nullptr);
         float fromValueInUserUnits = nonRelativeLengthContext.convertValueToUserUnits(from.valueInSpecifiedUnits(), from.unitMode(), fromType, ec);
         if (ec)
             return SVGLength();
index eec0b3a..c21d57f 100644 (file)
@@ -28,9 +28,9 @@
 namespace WebCore {
 
 SVGPathBlender::SVGPathBlender()
-    : m_fromSource(0)
-    , m_toSource(0)
-    , m_consumer(0)
+    : m_fromSource(nullptr)
+    , m_toSource(nullptr)
+    , m_consumer(nullptr)
     , m_progress(0)
     , m_addTypesCount(0)
     , m_isInFirstHalfOfAnimation(false)
@@ -399,9 +399,9 @@ void SVGPathBlender::cleanup()
     ASSERT(m_consumer);
 
     m_consumer->cleanup();
-    m_toSource = 0;
-    m_fromSource = 0;
-    m_consumer = 0;
+    m_toSource = nullptr;
+    m_fromSource = nullptr;
+    m_consumer = nullptr;
     m_fromCurrentPoint = FloatPoint();
     m_toCurrentPoint = FloatPoint();
 }
index 1794dc8..cb8e794 100644 (file)
@@ -29,7 +29,7 @@
 namespace WebCore {
 
 SVGPathBuilder::SVGPathBuilder()
-    : m_path(0)
+    : m_path(nullptr)
 {
 }
 
index ea15b3e..7efbb4d 100644 (file)
@@ -43,7 +43,7 @@ protected:
 private:
     virtual void incrementPathSegmentCount() override { }
     virtual bool continueConsuming() override { return true; }
-    virtual void cleanup() override { m_path = 0; }
+    virtual void cleanup() override { m_path = nullptr; }
 
     // Used in UnalteredParsing/NormalizedParsing modes.
     virtual void moveTo(const FloatPoint&, bool closed, PathCoordinateMode) override;
index 1880102..2f4d85c 100644 (file)
@@ -27,7 +27,7 @@
 namespace WebCore {
 
 SVGPathByteStreamBuilder::SVGPathByteStreamBuilder()
-    : m_byteStream(0)
+    : m_byteStream(nullptr)
 {
 }
 
index 5f2e15c..2a19701 100644 (file)
@@ -36,7 +36,7 @@ public:
 private:
     virtual void incrementPathSegmentCount() override { }
     virtual bool continueConsuming() override { return true; }
-    virtual void cleanup() override { m_byteStream = 0; }
+    virtual void cleanup() override { m_byteStream = nullptr; }
 
     // Used in UnalteredParsing/NormalizedParsing modes.
     virtual void moveTo(const FloatPoint&, bool closed, PathCoordinateMode) override;
index bb5d767..5482561 100644 (file)
@@ -55,7 +55,7 @@ namespace WebCore {
 // Define custom animated property 'd'.
 const SVGPropertyInfo* SVGPathElement::dPropertyInfo()
 {
-    static const SVGPropertyInfo* s_propertyInfo = 0;
+    static const SVGPropertyInfo* s_propertyInfo = nullptr;
     if (!s_propertyInfo) {
         s_propertyInfo = new SVGPropertyInfo(AnimatedPath,
                                              PropertyIsReadWrite,
index 81acb2f..20afc95 100644 (file)
@@ -33,7 +33,7 @@ static const float gOneOverThree = 1 / 3.f;
 namespace WebCore {
 
 SVGPathParser::SVGPathParser()
-    : m_consumer(0)
+    : m_consumer(nullptr)
 {
 }
 
@@ -411,8 +411,8 @@ void SVGPathParser::cleanup()
     ASSERT(m_consumer);
 
     m_consumer->cleanup();
-    m_source = 0;
-    m_consumer = 0;
+    m_source = nullptr;
+    m_consumer = nullptr;
 }
 
 // This works by converting the SVG arc to "simple" beziers.
index 34bdd4b..ce65721 100644 (file)
@@ -50,8 +50,8 @@
 namespace WebCore {
 
 SVGPathSegListBuilder::SVGPathSegListBuilder()
-    : m_pathElement(0)
-    , m_pathSegList(0)
+    : m_pathElement(nullptr)
+    , m_pathSegList(nullptr)
     , m_pathSegRole(PathSegUndefinedRole)
 {
 }
index 80b99ec..67ff267 100644 (file)
@@ -45,8 +45,8 @@ private:
     virtual bool continueConsuming() override { return true; }
     virtual void cleanup() override
     {
-        m_pathElement = 0;
-        m_pathSegList = 0;
+        m_pathElement = nullptr;
+        m_pathSegList = nullptr;
         m_pathSegRole = PathSegUndefinedRole;
     }
 
index 4478be1..1c27bcf 100644 (file)
@@ -28,7 +28,7 @@
 namespace WebCore {
 
 SVGPathTraversalStateBuilder::SVGPathTraversalStateBuilder()
-    : m_traversalState(0)
+    : m_traversalState(nullptr)
     , m_segmentIndex(0)
 {
 }
index 7106056..79cac32 100644 (file)
@@ -38,7 +38,7 @@ namespace WebCore {
 
 static SVGPathBuilder* globalSVGPathBuilder(Path& result)
 {
-    static SVGPathBuilder* s_builder = 0;
+    static SVGPathBuilder* s_builder = nullptr;
     if (!s_builder)
         s_builder = new SVGPathBuilder;
 
@@ -48,7 +48,7 @@ static SVGPathBuilder* globalSVGPathBuilder(Path& result)
 
 static SVGPathSegListBuilder* globalSVGPathSegListBuilder(SVGPathElement* element, SVGPathSegRole role, SVGPathSegList& result)
 {
-    static SVGPathSegListBuilder* s_builder = 0;
+    static SVGPathSegListBuilder* s_builder = nullptr;
     if (!s_builder)
         s_builder = new SVGPathSegListBuilder;
 
@@ -60,7 +60,7 @@ static SVGPathSegListBuilder* globalSVGPathSegListBuilder(SVGPathElement* elemen
 
 static SVGPathByteStreamBuilder* globalSVGPathByteStreamBuilder(SVGPathByteStream* result)
 {
-    static SVGPathByteStreamBuilder* s_builder = 0;
+    static SVGPathByteStreamBuilder* s_builder = nullptr;
     if (!s_builder)
         s_builder = new SVGPathByteStreamBuilder;
 
@@ -70,7 +70,7 @@ static SVGPathByteStreamBuilder* globalSVGPathByteStreamBuilder(SVGPathByteStrea
 
 static SVGPathStringBuilder* globalSVGPathStringBuilder()
 {
-    static SVGPathStringBuilder* s_builder = 0;
+    static SVGPathStringBuilder* s_builder = nullptr;
     if (!s_builder)
         s_builder = new SVGPathStringBuilder;
 
@@ -79,7 +79,7 @@ static SVGPathStringBuilder* globalSVGPathStringBuilder()
 
 static SVGPathTraversalStateBuilder* globalSVGPathTraversalStateBuilder(PathTraversalState& traversalState, float length)
 {
-    static SVGPathTraversalStateBuilder* s_builder = 0;
+    static SVGPathTraversalStateBuilder* s_builder = nullptr;
     if (!s_builder)
         s_builder = new SVGPathTraversalStateBuilder;
 
@@ -90,7 +90,7 @@ static SVGPathTraversalStateBuilder* globalSVGPathTraversalStateBuilder(PathTrav
 
 static SVGPathParser* globalSVGPathParser(SVGPathSource* source, SVGPathConsumer* consumer)
 {
-    static SVGPathParser* s_parser = 0;
+    static SVGPathParser* s_parser = nullptr;
     if (!s_parser)
         s_parser = new SVGPathParser;
 
@@ -101,7 +101,7 @@ static SVGPathParser* globalSVGPathParser(SVGPathSource* source, SVGPathConsumer
 
 static SVGPathBlender* globalSVGPathBlender()
 {
-    static SVGPathBlender* s_blender = 0;
+    static SVGPathBlender* s_blender = nullptr;
     if (!s_blender)
         s_blender = new SVGPathBlender;
 
index 436d737..3b7f4b3 100644 (file)
@@ -34,7 +34,7 @@ namespace WebCore {
 // Define custom animated property 'points'.
 const SVGPropertyInfo* SVGPolyElement::pointsPropertyInfo()
 {
-    static const SVGPropertyInfo* s_propertyInfo = 0;
+    static const SVGPropertyInfo* s_propertyInfo = nullptr;
     if (!s_propertyInfo) {
         s_propertyInfo = new SVGPropertyInfo(AnimatedPoints,
                                              PropertyIsReadWrite,
index 4edb983..fae36df 100644 (file)
@@ -62,8 +62,7 @@ public:
 
     static const SVGTRefTargetEventListener* cast(const EventListener* listener)
     {
-        return listener->type() == SVGTRefTargetEventListenerType
-                ? static_cast<const SVGTRefTargetEventListener*>(listener) : 0;
+        return listener->type() == SVGTRefTargetEventListenerType ? static_cast<const SVGTRefTargetEventListener*>(listener) : nullptr;
     }
 
     void attach(PassRefPtr<Element> target);
@@ -83,7 +82,7 @@ private:
 SVGTRefTargetEventListener::SVGTRefTargetEventListener(SVGTRefElement& trefElement)
     : EventListener(SVGTRefTargetEventListenerType)
     , m_trefElement(trefElement)
-    , m_target(0)
+    , m_target(nullptr)
 {
 }
 
index 4d41426..dbe4c88 100644 (file)
@@ -39,7 +39,7 @@ namespace WebCore {
 // Define custom animated property 'textLength'.
 const SVGPropertyInfo* SVGTextContentElement::textLengthPropertyInfo()
 {
-    static const SVGPropertyInfo* s_propertyInfo = 0;
+    static const SVGPropertyInfo* s_propertyInfo = nullptr;
     if (!s_propertyInfo) {
         s_propertyInfo = new SVGPropertyInfo(AnimatedLength,
                                              PropertyIsReadWrite,
index 7b021a7..79f21d8 100644 (file)
@@ -35,7 +35,7 @@ public:
     static void addSupportedAttributes(HashSet<QualifiedName>&);
 
     static String fragmentIdentifierFromIRIString(const String&, Document&);
-    static Element* targetElementFromIRIString(const String&, Document&, String* = 0, Document* = 0);
+    static Element* targetElementFromIRIString(const String&, Document&, String* = nullptr, Document* = nullptr);
 
     static bool isExternalURIReference(const String& uri, Document& document)
     {
index 568fedc..ac86ee3 100644 (file)
@@ -32,7 +32,7 @@ namespace WebCore {
 // Define custom animated property 'viewBox'.
 const SVGPropertyInfo* SVGViewSpec::viewBoxPropertyInfo()
 {
-    static const SVGPropertyInfo* s_propertyInfo = 0;
+    static const SVGPropertyInfo* s_propertyInfo = nullptr;
     if (!s_propertyInfo) {
         s_propertyInfo = new SVGPropertyInfo(AnimatedRect,
                                              PropertyIsReadOnly,
@@ -47,7 +47,7 @@ const SVGPropertyInfo* SVGViewSpec::viewBoxPropertyInfo()
 // Define custom animated property 'preserveAspectRatio'.
 const SVGPropertyInfo* SVGViewSpec::preserveAspectRatioPropertyInfo()
 {
-    static const SVGPropertyInfo* s_propertyInfo = 0;
+    static const SVGPropertyInfo* s_propertyInfo = nullptr;
     if (!s_propertyInfo) {
         s_propertyInfo = new SVGPropertyInfo(AnimatedPreserveAspectRatio,
                                              PropertyIsReadOnly,
@@ -63,7 +63,7 @@ const SVGPropertyInfo* SVGViewSpec::preserveAspectRatioPropertyInfo()
 // Define custom non-animated property 'transform'.
 const SVGPropertyInfo* SVGViewSpec::transformPropertyInfo()
 {
-    static const SVGPropertyInfo* s_propertyInfo = 0;
+    static const SVGPropertyInfo* s_propertyInfo = nullptr;
     if (!s_propertyInfo) {
         s_propertyInfo = new SVGPropertyInfo(AnimatedTransformList,
                                              PropertyIsReadOnly,
index aa7a51a..6d96f54 100644 (file)
@@ -65,7 +65,7 @@ public:
     void setZoomAndPanBaseValue(unsigned short zoomAndPan) { m_zoomAndPan = SVGZoomAndPan::parseFromNumber(zoomAndPan); }
 
     SVGElement* contextElement() const { return m_contextElement; }
-    void resetContextElement() { m_contextElement = 0; }
+    void resetContextElement() { m_contextElement = nullptr; }
 
     // Custom non-animated 'transform' property.
     SVGTransformListPropertyTearOff* transform();
index 399ccb4..128e58f 100644 (file)
@@ -271,7 +271,7 @@ void SMILTimeContainer::updateAnimations(SMILTime elapsed, bool seekToTime)
         // have higher priority.
         sortByPriority(*scheduled, elapsed);
 
-        SVGSMILElement* resultElement = 0;
+        SVGSMILElement* resultElement = nullptr;
         for (auto& animation : *scheduled) {
             ASSERT(animation->timeContainer() == this);
             ASSERT(animation->targetElement());
@@ -286,7 +286,7 @@ void SMILTimeContainer::updateAnimations(SMILTime elapsed, bool seekToTime)
 
             // This will calculate the contribution from the animation and add it to the resultsElement.
             if (!animation->progress(elapsed, resultElement, seekToTime) && resultElement == animation)
-                resultElement = 0;
+                resultElement = nullptr;
 
             SMILTime nextFireTime = animation->nextProgressTime();
             if (nextFireTime.isFinite())
index c990aaa..6646a2b 100644 (file)
@@ -60,14 +60,14 @@ public:
     {
         return listener->type() == ConditionEventListenerType
             ? static_cast<const ConditionEventListener*>(listener)
-            : 0;
+            : nullptr;
     }
 
     virtual bool operator==(const EventListener& other) override;
     
     void disconnectAnimation()
     {
-        m_animation = 0;
+        m_animation = nullptr;
     }
 
 private:
@@ -111,7 +111,7 @@ SVGSMILElement::Condition::Condition(Type type, BeginOrEnd beginOrEnd, const Str
 SVGSMILElement::SVGSMILElement(const QualifiedName& tagName, Document& doc)
     : SVGElement(tagName, doc)
     , m_attributeName(anyQName())
-    , m_targetElement(0)
+    , m_targetElement(nullptr)
     , m_conditionsConnected(false)
     , m_hasEndEventConditions(false)
     , m_isWaitingForFirstInterval(true)
@@ -273,10 +273,10 @@ void SVGSMILElement::removedFrom(ContainerNode& rootParent)
     if (rootParent.inDocument()) {
         clearResourceReferences();
         disconnectConditions();
-        setTargetElement(0);
+        setTargetElement(nullptr);
         setAttributeName(anyQName());
         animationAttributeChanged();
-        m_timeContainer = 0;
+        m_timeContainer = nullptr;
     }
 
     SVGElement::removedFrom(rootParent);
index 45164ff..f3853f2 100644 (file)
@@ -146,7 +146,7 @@ void SVGImage::drawForContainer(GraphicsContext* context, const FloatSize contai
     ASSERT(observer);
 
     // Temporarily reset image observer, we don't want to receive any changeInRect() calls due to this relayout.
-    setImageObserver(0);
+    setImageObserver(nullptr);
 
     IntSize roundedContainerSize = roundedIntSize(containerSize);
     setContainerSize(roundedContainerSize);
index f243e40..1567443 100644 (file)
@@ -39,7 +39,7 @@ namespace WebCore {
 FEImage::FEImage(Filter& filter, RefPtr<Image> image, const SVGPreserveAspectRatio& preserveAspectRatio)
     : FilterEffect(filter)
     , m_image(image)
-    , m_document(0)
+    , m_document(nullptr)
     , m_preserveAspectRatio(preserveAspectRatio)
 {
 }
index 52ba4e9..1931321 100644 (file)
@@ -81,7 +81,7 @@ void SVGFilterBuilder::appendEffectToEffectReferences(PassRefPtr<FilterEffect> p
 
 void SVGFilterBuilder::clearEffects()
 {
-    m_lastEffect = 0;
+    m_lastEffect = nullptr;
     m_namedEffects.clear();
     m_effectReferences.clear();
     m_effectRenderer.clear();
index f554e6c..c785d63 100644 (file)
@@ -81,7 +81,7 @@ public:
     void animationEnded()
     {
         ASSERT(m_animatedPathByteStream);
-        m_animatedPathByteStream = 0;
+        m_animatedPathByteStream = nullptr;
         SVGAnimatedListPropertyTearOff<SVGPathSegList>::animationEnded();
     }
 
@@ -106,7 +106,7 @@ public:
 private:
     SVGAnimatedPathSegListPropertyTearOff(SVGElement* contextElement, const QualifiedName& attributeName, AnimatedPropertyType animatedPropertyType, SVGPathSegList& values)
         : SVGAnimatedListPropertyTearOff<SVGPathSegList>(contextElement, attributeName, animatedPropertyType, values)
-        , m_animatedPathByteStream(0)
+        , m_animatedPathByteStream(nullptr)
     {
     }
 
index 477c719..4efa140 100644 (file)
@@ -32,8 +32,8 @@ class SVGElement;
 struct SVGAnimatedPropertyDescription {            
     // Empty value
     SVGAnimatedPropertyDescription()
-        : m_element(0)
-        , m_attributeName(0)
+        : m_element(nullptr)
+        , m_attributeName(nullptr)
     {
     }
 
index a118267..ef2e2e9 100644 (file)
@@ -35,11 +35,11 @@ public:
     {
         if (m_baseVal) {
             ASSERT(m_baseVal->animatedProperty() == this);
-            m_baseVal->setAnimatedProperty(0);
+            m_baseVal->setAnimatedProperty(nullptr);
         }
         if (m_animVal) {
             ASSERT(m_animVal->animatedProperty() == this);
-            m_animVal->setAnimatedProperty(0);
+            m_animVal->setAnimatedProperty(nullptr);
         }
     }
 
index 2d769e9..77f6e49 100644 (file)
@@ -79,7 +79,7 @@ public:
     {
         ASSERT(m_isAnimating);
         ASSERT(m_animatedProperty);
-        m_animatedProperty = 0;
+        m_animatedProperty = nullptr;
         m_isAnimating = false;
     }
 
@@ -101,7 +101,7 @@ protected:
     SVGAnimatedStaticPropertyTearOff(SVGElement* contextElement, const QualifiedName& attributeName, AnimatedPropertyType animatedPropertyType, PropertyType& property)
         : SVGAnimatedProperty(contextElement, attributeName, animatedPropertyType)
         , m_property(property)
-        , m_animatedProperty(0)
+        , m_animatedProperty(nullptr)
     {
     }
 
index 7ccd0d0..ca7d367 100644 (file)
@@ -105,7 +105,7 @@ public:
         // Whenever the XML DOM modifies the "x" attribute, all existing wrappers are detached, using this function.
         m_value = new PropertyType(*m_value);
         m_valueIsCopy = true;
-        m_animatedProperty = 0;
+        m_animatedProperty = nullptr;
     }
 
     virtual void commitChange() override
@@ -144,7 +144,7 @@ protected:
     }
 
     SVGPropertyTearOff(const PropertyType* initialValue)
-        : m_animatedProperty(0)
+        : m_animatedProperty(nullptr)
         , m_role(UndefinedRole)
         , m_value(initialValue ? new PropertyType(*initialValue) : nullptr)
         , m_valueIsCopy(true)