From 54cdeeebc7adcbcd900e8b6a141a8cae27d9a631 Mon Sep 17 00:00:00 2001 From: Steve Block Date: Fri, 10 Jun 2011 16:52:27 +0100 Subject: Merge WebKit at branches/chromium/742 r88085: Initial merge by git. Change-Id: I0501b484b9528e31b0026e5ad64416dd6541cdde --- Source/WebCore/svg/SVGColor.cpp | 6 +++--- Source/WebCore/svg/SVGColor.h | 4 ++-- Source/WebCore/svg/SVGPaint.cpp | 16 ++++++++++++++-- Source/WebCore/svg/SVGPaint.h | 3 +++ Source/WebCore/svg/animation/SVGSMILElement.cpp | 2 ++ 5 files changed, 24 insertions(+), 7 deletions(-) (limited to 'Source/WebCore/svg') diff --git a/Source/WebCore/svg/SVGColor.cpp b/Source/WebCore/svg/SVGColor.cpp index 911d02f..b2f14a3 100644 --- a/Source/WebCore/svg/SVGColor.cpp +++ b/Source/WebCore/svg/SVGColor.cpp @@ -50,7 +50,7 @@ void SVGColor::setRGBColor(const String& rgbColor, ExceptionCode& ec) m_color = color; m_colorType = SVG_COLORTYPE_RGBCOLOR; - setNeedsStyleRecalc(); + // FIXME: A follow up patch will call valueChanged() here. } Color SVGColor::colorFromRGBColorString(const String& colorString) @@ -75,7 +75,7 @@ void SVGColor::setRGBColorICCColor(const String& rgbColor, const String& iccColo return; m_colorType = SVG_COLORTYPE_RGBCOLOR_ICCCOLOR; - setNeedsStyleRecalc(); + // FIXME: A follow up patch will call valueChanged() here. } void SVGColor::setColor(unsigned short colorType, const String& rgbColor, const String& iccColor, ExceptionCode& ec) @@ -115,7 +115,7 @@ void SVGColor::setColor(unsigned short colorType, const String& rgbColor, const return; } - setNeedsStyleRecalc(); + // FIXME: A follow up patch will call valueChanged() here. m_colorType = type; if (!requiresRGBColor) { ASSERT(!requiresICCColor); diff --git a/Source/WebCore/svg/SVGColor.h b/Source/WebCore/svg/SVGColor.h index 58dc704..9ca3c14 100644 --- a/Source/WebCore/svg/SVGColor.h +++ b/Source/WebCore/svg/SVGColor.h @@ -23,7 +23,7 @@ #define SVGColor_h #if ENABLE(SVG) -#include "CSSMutableValue.h" +#include "CSSValue.h" #include "Color.h" #include @@ -31,7 +31,7 @@ namespace WebCore { class RGBColor; -class SVGColor : public CSSMutableValue { +class SVGColor : public CSSValue { public: enum SVGColorType { SVG_COLORTYPE_UNKNOWN = 0, diff --git a/Source/WebCore/svg/SVGPaint.cpp b/Source/WebCore/svg/SVGPaint.cpp index c9e08db..e1a8137 100644 --- a/Source/WebCore/svg/SVGPaint.cpp +++ b/Source/WebCore/svg/SVGPaint.cpp @@ -67,7 +67,19 @@ void SVGPaint::setUri(const String& uri) m_paintType = SVG_PAINTTYPE_URI_NONE; setColor(Color()); setColorType(colorTypeForPaintType(m_paintType)); - setNeedsStyleRecalc(); + // FIXME: A follow up patch will call valueChanged() here. +} + +SVGPaint* SVGPaint::defaultFill() +{ + static SVGPaint* staticDefaultFill = createColor(Color::black).releaseRef(); + return staticDefaultFill; +} + +SVGPaint* SVGPaint::defaultStroke() +{ + static SVGPaint* staticDefaultStroke = createNone().releaseRef(); + return staticDefaultStroke; } void SVGPaint::setPaint(unsigned short paintType, const String& uri, const String& rgbColor, const String& iccColor, ExceptionCode& ec) @@ -120,7 +132,7 @@ void SVGPaint::setPaint(unsigned short paintType, const String& uri, const Strin m_paintType = type; m_uri = requiresURI ? uri : String(); - setNeedsStyleRecalc(); + // FIXME: A follow up patch will call valueChanged() here. } String SVGPaint::cssText() const diff --git a/Source/WebCore/svg/SVGPaint.h b/Source/WebCore/svg/SVGPaint.h index 5cacf91..471942b 100644 --- a/Source/WebCore/svg/SVGPaint.h +++ b/Source/WebCore/svg/SVGPaint.h @@ -87,6 +87,9 @@ public: bool matchesTargetURI(const String& referenceId); + static SVGPaint* defaultFill(); + static SVGPaint* defaultStroke(); + private: friend class CSSComputedStyleDeclaration; diff --git a/Source/WebCore/svg/animation/SVGSMILElement.cpp b/Source/WebCore/svg/animation/SVGSMILElement.cpp index 3bb5880..4e0caa6 100644 --- a/Source/WebCore/svg/animation/SVGSMILElement.cpp +++ b/Source/WebCore/svg/animation/SVGSMILElement.cpp @@ -141,6 +141,8 @@ SVGSMILElement::~SVGSMILElement() disconnectConditions(); if (m_timeContainer) m_timeContainer->unschedule(this); + if (m_targetElement) + document()->accessSVGExtensions()->removeAnimationElementFromTarget(this, m_targetElement); } static inline QualifiedName constructQualifiedName(const SVGElement* svgElement, const String& attributeName) -- cgit v1.1