Diff
Modified: trunk/Source/WebCore/ChangeLog (173882 => 173883)
--- trunk/Source/WebCore/ChangeLog 2014-09-23 18:38:24 UTC (rev 173882)
+++ trunk/Source/WebCore/ChangeLog 2014-09-23 18:44:41 UTC (rev 173883)
@@ -1,3 +1,93 @@
+2014-09-23 Chris Dumez <cdu...@apple.com>
+
+ Have Document::accessSVGExtensions() return a reference
+ https://bugs.webkit.org/show_bug.cgi?id=137030
+
+ Reviewed by Ryosuke Niwa.
+
+ Have Document::accessSVGExtensions() return a reference instead of a
+ pointer as it can never return null.
+
+ No new tests, no behavior change.
+
+ * dom/ContainerNode.cpp:
+ (WebCore::ContainerNode::removeChild):
+ (WebCore::ContainerNode::removeChildren):
+ * dom/Document.cpp:
+ (WebCore::Document::commonTeardown):
+ (WebCore::Document::implicitClose):
+ (WebCore::Document::accessSVGExtensions):
+ * dom/Document.h:
+ * dom/Element.cpp:
+ (WebCore::Element::~Element):
+ (WebCore::Element::removedFrom):
+ * editing/markup.cpp:
+ (WebCore::isPlainTextMarkup):
+ * history/CachedFrame.cpp:
+ (WebCore::CachedFrameBase::restore):
+ * rendering/FilterEffectRenderer.cpp:
+ (WebCore::FilterEffectRenderer::buildReferenceFilter):
+ * rendering/svg/RenderSVGResource.cpp:
+ (WebCore::removeFromCacheAndInvalidateDependencies):
+ * rendering/svg/RenderSVGResourceContainer.cpp:
+ (WebCore::svgExtensionsFromElement):
+ * rendering/svg/RenderSVGResourceContainer.h:
+ (WebCore::getRenderSVGResourceContainerById):
+ (WebCore::getRenderSVGResourceById):
+ * rendering/svg/SVGResources.cpp:
+ (WebCore::registerPendingResource):
+ (WebCore::SVGResources::buildCachedResources):
+ * rendering/svg/SVGResourcesCache.cpp:
+ (WebCore::resourcesCacheFromRenderer):
+ (WebCore::SVGResourcesCache::resourceDestroyed):
+ * svg/SVGElement.cpp:
+ (WebCore::SVGElement::~SVGElement):
+ (WebCore::SVGElement::reportAttributeParsingError):
+ (WebCore::SVGElement::removedFrom):
+ (WebCore::SVGElement::viewportElement):
+ (WebCore::SVGElement::attributeChanged):
+ (WebCore::SVGElement::buildPendingResourcesIfNeeded):
+ (WebCore::SVGElement::accessDocumentSVGExtensions): Deleted.
+ * svg/SVGElement.h:
+ * svg/SVGFEConvolveMatrixElement.cpp:
+ (WebCore::SVGFEConvolveMatrixElement::parseAttribute):
+ * svg/SVGFEGaussianBlurElement.cpp:
+ (WebCore::SVGFEGaussianBlurElement::parseAttribute):
+ * svg/SVGFEImageElement.cpp:
+ (WebCore::SVGFEImageElement::clearResourceReferences):
+ (WebCore::SVGFEImageElement::buildPendingResource):
+ * svg/SVGFitToViewBox.cpp:
+ (WebCore::SVGFitToViewBox::parseViewBox):
+ * svg/SVGFontFaceElement.cpp:
+ (WebCore::SVGFontFaceElement::insertedInto):
+ (WebCore::SVGFontFaceElement::removedFrom):
+ * svg/SVGMPathElement.cpp:
+ (WebCore::SVGMPathElement::buildPendingResource):
+ (WebCore::SVGMPathElement::clearResourceReferences):
+ * svg/SVGPathElement.cpp:
+ (WebCore::SVGPathElement::parseAttribute):
+ (WebCore::SVGPathElement::invalidateMPathDependencies):
+ * svg/SVGPolyElement.cpp:
+ (WebCore::SVGPolyElement::parseAttribute):
+ * svg/SVGSVGElement.cpp:
+ (WebCore::SVGSVGElement::~SVGSVGElement):
+ (WebCore::SVGSVGElement::insertedInto):
+ (WebCore::SVGSVGElement::removedFrom):
+ * svg/SVGTRefElement.cpp:
+ (WebCore::SVGTRefElement::detachTarget):
+ (WebCore::SVGTRefElement::buildPendingResource):
+ * svg/SVGTextPathElement.cpp:
+ (WebCore::SVGTextPathElement::clearResourceReferences):
+ (WebCore::SVGTextPathElement::buildPendingResource):
+ * svg/SVGUseElement.cpp:
+ (WebCore::SVGUseElement::clearResourceReferences):
+ (WebCore::SVGUseElement::buildPendingResource):
+ (WebCore::SVGUseElement::toClipPath):
+ (WebCore::SVGUseElement::buildInstanceTree):
+ * svg/animation/SVGSMILElement.cpp:
+ (WebCore::SVGSMILElement::clearResourceReferences):
+ (WebCore::SVGSMILElement::buildPendingResource):
+
2014-09-23 Joseph Pecoraro <pecor...@apple.com>
Web Inspector: Should be able to attach a debugger to a JSContext before anything is executed
Modified: trunk/Source/WebCore/dom/ContainerNode.cpp (173882 => 173883)
--- trunk/Source/WebCore/dom/ContainerNode.cpp 2014-09-23 18:38:24 UTC (rev 173882)
+++ trunk/Source/WebCore/dom/ContainerNode.cpp 2014-09-23 18:44:41 UTC (rev 173883)
@@ -573,7 +573,7 @@
if (document().svgExtensions()) {
Element* shadowHost = this->shadowHost();
if (!shadowHost || !shadowHost->hasTagName(SVGNames::useTag))
- document().accessSVGExtensions()->rebuildElements();
+ document().accessSVGExtensions().rebuildElements();
}
dispatchSubtreeModifiedEvent();
@@ -670,7 +670,7 @@
if (document().svgExtensions()) {
Element* shadowHost = this->shadowHost();
if (!shadowHost || !shadowHost->hasTagName(SVGNames::useTag))
- document().accessSVGExtensions()->rebuildElements();
+ document().accessSVGExtensions().rebuildElements();
}
dispatchSubtreeModifiedEvent();
Modified: trunk/Source/WebCore/dom/Document.cpp (173882 => 173883)
--- trunk/Source/WebCore/dom/Document.cpp 2014-09-23 18:38:24 UTC (rev 173882)
+++ trunk/Source/WebCore/dom/Document.cpp 2014-09-23 18:44:41 UTC (rev 173883)
@@ -693,7 +693,7 @@
void Document::commonTeardown()
{
if (svgExtensions())
- accessSVGExtensions()->pauseAnimations();
+ accessSVGExtensions().pauseAnimations();
#if ENABLE(REQUEST_ANIMATION_FRAME)
clearScriptedAnimationController();
@@ -2440,7 +2440,7 @@
// here, instead of doing it from SVGElement::finishedParsingChildren (if externalResourcesRequired="false",
// which is the default, for ='' its fired at a later time, once all external resources finished loading).
if (svgExtensions())
- accessSVGExtensions()->dispatchSVGLoadEventToOutermostSVGElements();
+ accessSVGExtensions().dispatchSVGLoadEventToOutermostSVGElements();
dispatchWindowLoadEvent();
enqueuePageshowEvent(PageshowEventNotPersisted);
@@ -2505,7 +2505,7 @@
#endif
if (svgExtensions())
- accessSVGExtensions()->startAnimations();
+ accessSVGExtensions().startAnimations();
}
void Document::setParsing(bool b)
@@ -4464,11 +4464,11 @@
return m_svgExtensions.get();
}
-SVGDocumentExtensions* Document::accessSVGExtensions()
+SVGDocumentExtensions& Document::accessSVGExtensions()
{
if (!m_svgExtensions)
m_svgExtensions = std::make_unique<SVGDocumentExtensions>(this);
- return m_svgExtensions.get();
+ return *m_svgExtensions;
}
bool Document::hasSVGRootNode() const
Modified: trunk/Source/WebCore/dom/Document.h (173882 => 173883)
--- trunk/Source/WebCore/dom/Document.h 2014-09-23 18:38:24 UTC (rev 173882)
+++ trunk/Source/WebCore/dom/Document.h 2014-09-23 18:44:41 UTC (rev 173883)
@@ -1094,7 +1094,7 @@
virtual void removeAllEventListeners() override;
WEBCORE_EXPORT const SVGDocumentExtensions* svgExtensions();
- WEBCORE_EXPORT SVGDocumentExtensions* accessSVGExtensions();
+ WEBCORE_EXPORT SVGDocumentExtensions& accessSVGExtensions();
void initSecurityContext();
void initContentSecurityPolicy();
Modified: trunk/Source/WebCore/dom/Element.cpp (173882 => 173883)
--- trunk/Source/WebCore/dom/Element.cpp 2014-09-23 18:38:24 UTC (rev 173882)
+++ trunk/Source/WebCore/dom/Element.cpp 2014-09-23 18:44:41 UTC (rev 173883)
@@ -168,7 +168,7 @@
detachAllAttrNodesFromElement();
if (hasPendingResources()) {
- document().accessSVGExtensions()->removeElementFromPendingResources(this);
+ document().accessSVGExtensions().removeElementFromPendingResources(this);
ASSERT(!hasPendingResources());
}
}
@@ -1410,7 +1410,7 @@
ContainerNode::removedFrom(insertionPoint);
if (hasPendingResources())
- document().accessSVGExtensions()->removeElementFromPendingResources(this);
+ document().accessSVGExtensions().removeElementFromPendingResources(this);
}
void Element::unregisterNamedFlowContentElement()
Modified: trunk/Source/WebCore/editing/markup.cpp (173882 => 173883)
--- trunk/Source/WebCore/editing/markup.cpp 2014-09-23 18:38:24 UTC (rev 173882)
+++ trunk/Source/WebCore/editing/markup.cpp 2014-09-23 18:44:41 UTC (rev 173883)
@@ -746,7 +746,7 @@
if (!isHTMLDivElement(node))
return false;
- HTMLDivElement& element = toHTMLDivElement(*node);
+ HTMLDivElement& element = downcast<HTMLDivElement>(*node);
if (element.hasAttributes())
return false;
Modified: trunk/Source/WebCore/history/CachedFrame.cpp (173882 => 173883)
--- trunk/Source/WebCore/history/CachedFrame.cpp 2014-09-23 18:38:24 UTC (rev 173882)
+++ trunk/Source/WebCore/history/CachedFrame.cpp 2014-09-23 18:44:41 UTC (rev 173883)
@@ -89,7 +89,7 @@
m_cachedFrameScriptData->restore(frame);
if (m_document->svgExtensions())
- m_document->accessSVGExtensions()->unpauseAnimations();
+ m_document->accessSVGExtensions().unpauseAnimations();
frame.animation().resumeAnimationsForDocument(m_document.get());
m_document->resumeActiveDOMObjects(ActiveDOMObject::DocumentWillBecomeInactive);
Modified: trunk/Source/WebCore/rendering/FilterEffectRenderer.cpp (173882 => 173883)
--- trunk/Source/WebCore/rendering/FilterEffectRenderer.cpp 2014-09-23 18:38:24 UTC (rev 173882)
+++ trunk/Source/WebCore/rendering/FilterEffectRenderer.cpp 2014-09-23 18:44:41 UTC (rev 173883)
@@ -87,7 +87,7 @@
PassRefPtr<FilterEffect> FilterEffectRenderer::buildReferenceFilter(RenderElement* renderer, PassRefPtr<FilterEffect> previousEffect, ReferenceFilterOperation* filterOperation)
{
if (!renderer)
- return 0;
+ return nullptr;
Document* document = &renderer->document();
@@ -100,15 +100,15 @@
document = cachedSVGDocument->document();
if (!document)
- return 0;
+ return nullptr;
Element* filter = document->getElementById(filterOperation->fragment());
if (!filter) {
// Although we did not find the referenced filter, it might exist later in the document.
// FIXME: This skips anonymous RenderObjects. <https://webkit.org/b/131085>
if (Element* element = renderer->element())
- document->accessSVGExtensions()->addPendingResource(filterOperation->fragment(), element);
- return 0;
+ document->accessSVGExtensions().addPendingResource(filterOperation->fragment(), element);
+ return nullptr;
}
RefPtr<FilterEffect> effect;
Modified: trunk/Source/WebCore/rendering/svg/RenderSVGResource.cpp (173882 => 173883)
--- trunk/Source/WebCore/rendering/svg/RenderSVGResource.cpp 2014-09-23 18:38:24 UTC (rev 173882)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGResource.cpp 2014-09-23 18:44:41 UTC (rev 173883)
@@ -169,7 +169,7 @@
if (!renderer.element() || !renderer.element()->isSVGElement())
return;
- HashSet<SVGElement*>* dependencies = renderer.document().accessSVGExtensions()->setOfElementsReferencingTarget(downcast<SVGElement>(renderer.element()));
+ HashSet<SVGElement*>* dependencies = renderer.document().accessSVGExtensions().setOfElementsReferencingTarget(downcast<SVGElement>(renderer.element()));
if (!dependencies)
return;
for (auto* element : *dependencies) {
Modified: trunk/Source/WebCore/rendering/svg/RenderSVGResourceContainer.cpp (173882 => 173883)
--- trunk/Source/WebCore/rendering/svg/RenderSVGResourceContainer.cpp 2014-09-23 18:38:24 UTC (rev 173882)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGResourceContainer.cpp 2014-09-23 18:44:41 UTC (rev 173883)
@@ -31,8 +31,7 @@
static inline SVGDocumentExtensions& svgExtensionsFromElement(SVGElement& element)
{
- // FIXME: accessSVGExtensions() should return a reference.
- return *element.document().accessSVGExtensions();
+ return element.document().accessSVGExtensions();
}
RenderSVGResourceContainer::RenderSVGResourceContainer(SVGElement& element, PassRef<RenderStyle> style)
Modified: trunk/Source/WebCore/rendering/svg/RenderSVGResourceContainer.h (173882 => 173883)
--- trunk/Source/WebCore/rendering/svg/RenderSVGResourceContainer.h 2014-09-23 18:38:24 UTC (rev 173882)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGResourceContainer.h 2014-09-23 18:44:41 UTC (rev 173883)
@@ -80,12 +80,12 @@
inline RenderSVGResourceContainer* getRenderSVGResourceContainerById(Document& document, const AtomicString& id)
{
if (id.isEmpty())
- return 0;
+ return nullptr;
- if (RenderSVGResourceContainer* renderResource = document.accessSVGExtensions()->resourceById(id))
+ if (RenderSVGResourceContainer* renderResource = document.accessSVGExtensions().resourceById(id))
return renderResource;
- return 0;
+ return nullptr;
}
template<typename Renderer>
@@ -94,7 +94,7 @@
if (RenderSVGResourceContainer* container = getRenderSVGResourceContainerById(document, id))
return container->cast<Renderer>();
- return 0;
+ return nullptr;
}
}
Modified: trunk/Source/WebCore/rendering/svg/SVGResources.cpp (173882 => 173883)
--- trunk/Source/WebCore/rendering/svg/SVGResources.cpp 2014-09-23 18:38:24 UTC (rev 173882)
+++ trunk/Source/WebCore/rendering/svg/SVGResources.cpp 2014-09-23 18:44:41 UTC (rev 173883)
@@ -172,9 +172,9 @@
return container;
}
-static inline void registerPendingResource(SVGDocumentExtensions* extensions, const AtomicString& id, SVGElement& element)
+static inline void registerPendingResource(SVGDocumentExtensions& extensions, const AtomicString& id, SVGElement& element)
{
- extensions->addPendingResource(id, &element);
+ extensions.addPendingResource(id, &element);
}
bool SVGResources::buildCachedResources(const RenderElement& renderer, const SVGRenderStyle& svgStyle)
@@ -189,8 +189,7 @@
Document& document = element.document();
- SVGDocumentExtensions* extensions = document.accessSVGExtensions();
- ASSERT(extensions);
+ SVGDocumentExtensions& extensions = document.accessSVGExtensions();
const AtomicString& tagName = element.localName();
if (tagName.isNull())
Modified: trunk/Source/WebCore/rendering/svg/SVGResourcesCache.cpp (173882 => 173883)
--- trunk/Source/WebCore/rendering/svg/SVGResourcesCache.cpp 2014-09-23 18:38:24 UTC (rev 173882)
+++ trunk/Source/WebCore/rendering/svg/SVGResourcesCache.cpp 2014-09-23 18:44:41 UTC (rev 173883)
@@ -77,9 +77,7 @@
static inline SVGResourcesCache& resourcesCacheFromRenderer(const RenderElement& renderer)
{
- SVGDocumentExtensions* extensions = renderer.document().accessSVGExtensions();
- ASSERT(extensions);
- return extensions->resourcesCache();
+ return renderer.document().accessSVGExtensions().resourcesCache();
}
SVGResources* SVGResourcesCache::cachedResourcesForRenderer(const RenderElement& renderer)
@@ -175,9 +173,7 @@
// Mark users of destroyed resources as pending resolution based on the id of the old resource.
Element& resourceElement = resource.element();
Element* clientElement = it.key->element();
- SVGDocumentExtensions* extensions = clientElement->document().accessSVGExtensions();
-
- extensions->addPendingResource(resourceElement.getIdAttribute(), clientElement);
+ clientElement->document().accessSVGExtensions().addPendingResource(resourceElement.getIdAttribute(), clientElement);
}
}
Modified: trunk/Source/WebCore/svg/SVGElement.cpp (173882 => 173883)
--- trunk/Source/WebCore/svg/SVGElement.cpp 2014-09-23 18:38:24 UTC (rev 173882)
+++ trunk/Source/WebCore/svg/SVGElement.cpp 2014-09-23 18:44:41 UTC (rev 173883)
@@ -289,8 +289,8 @@
m_svgRareData = nullptr;
}
- document().accessSVGExtensions()->rebuildAllElementReferencesForTarget(*this);
- document().accessSVGExtensions()->removeAllElementReferencesForTarget(this);
+ document().accessSVGExtensions().rebuildAllElementReferencesForTarget(*this);
+ document().accessSVGExtensions().removeAllElementReferencesForTarget(this);
}
short SVGElement::tabIndex() const
@@ -347,15 +347,15 @@
return;
String errorString = "<" + tagName() + "> attribute " + name.toString() + "=\"" + value + "\"";
- SVGDocumentExtensions* extensions = document().accessSVGExtensions();
+ SVGDocumentExtensions& extensions = document().accessSVGExtensions();
if (error == NegativeValueForbiddenError) {
- extensions->reportError("Invalid negative value for " + errorString);
+ extensions.reportError("Invalid negative value for " + errorString);
return;
}
if (error == ParsingAttributeFailedError) {
- extensions->reportError("Invalid value for " + errorString);
+ extensions.reportError("Invalid value for " + errorString);
return;
}
@@ -386,8 +386,8 @@
StyledElement::removedFrom(rootParent);
if (wasInDocument) {
- document().accessSVGExtensions()->clearTargetDependencies(*this);
- document().accessSVGExtensions()->removeAllElementReferencesForTarget(this);
+ document().accessSVGExtensions().clearTargetDependencies(*this);
+ document().accessSVGExtensions().removeAllElementReferencesForTarget(this);
}
SVGElementInstance::invalidateAllInstancesOfElement(this);
}
@@ -419,13 +419,6 @@
return nullptr;
}
-
-SVGDocumentExtensions* SVGElement::accessDocumentSVGExtensions()
-{
- // This function is provided for use by SVGAnimatedProperty to avoid
- // global inclusion of Document.h in SVG code.
- return document().accessSVGExtensions();
-}
void SVGElement::mapInstanceToElement(SVGElementInstance* instance)
{
@@ -744,7 +737,7 @@
StyledElement::attributeChanged(name, oldValue, newValue);
if (name == HTMLNames::idAttr)
- document().accessSVGExtensions()->rebuildAllElementReferencesForTarget(*this);
+ document().accessSVGExtensions().rebuildAllElementReferencesForTarget(*this);
// Changes to the style attribute are processed lazily (see Element::getAttribute() and related methods),
// so we don't want changes to the style attribute to result in extra work here.
@@ -1081,20 +1074,20 @@
if (!needsPendingResourceHandling() || !inDocument() || isInShadowTree())
return;
- SVGDocumentExtensions* extensions = document().accessSVGExtensions();
+ SVGDocumentExtensions& extensions = document().accessSVGExtensions();
String resourceId = getIdAttribute();
- if (!extensions->isIdOfPendingResource(resourceId))
+ if (!extensions.isIdOfPendingResource(resourceId))
return;
// Mark pending resources as pending for removal.
- extensions->markPendingResourcesForRemoval(resourceId);
+ extensions.markPendingResourcesForRemoval(resourceId);
// Rebuild pending resources for each client of a pending resource that is being removed.
- while (Element* clientElement = extensions->removeElementFromPendingResourcesForRemovalMap(resourceId)) {
+ while (Element* clientElement = extensions.removeElementFromPendingResourcesForRemovalMap(resourceId)) {
ASSERT(clientElement->hasPendingResources());
if (clientElement->hasPendingResources()) {
clientElement->buildPendingResource();
- extensions->clearHasPendingResourcesIfPossible(clientElement);
+ extensions.clearHasPendingResourcesIfPossible(clientElement);
}
}
}
Modified: trunk/Source/WebCore/svg/SVGElement.h (173882 => 173883)
--- trunk/Source/WebCore/svg/SVGElement.h 2014-09-23 18:38:24 UTC (rev 173882)
+++ trunk/Source/WebCore/svg/SVGElement.h 2014-09-23 18:44:41 UTC (rev 173883)
@@ -74,8 +74,6 @@
void setInstanceUpdatesBlocked(bool);
virtual AffineTransform localCoordinateSpaceTransform(SVGLocatable::CTMScope) const;
- SVGDocumentExtensions* accessDocumentSVGExtensions();
-
virtual bool isSVGGraphicsElement() const { return false; }
virtual bool isFilterEffect() const { return false; }
virtual bool isGradientStop() const { return false; }
Modified: trunk/Source/WebCore/svg/SVGFEConvolveMatrixElement.cpp (173882 => 173883)
--- trunk/Source/WebCore/svg/SVGFEConvolveMatrixElement.cpp 2014-09-23 18:38:24 UTC (rev 173882)
+++ trunk/Source/WebCore/svg/SVGFEConvolveMatrixElement.cpp 2014-09-23 18:44:41 UTC (rev 173883)
@@ -136,7 +136,7 @@
setOrderXBaseValue(x);
setOrderYBaseValue(y);
} else
- document().accessSVGExtensions()->reportWarning(
+ document().accessSVGExtensions().reportWarning(
"feConvolveMatrix: problem parsing order=\"" + value
+ "\". Filtered element will not be displayed.");
return;
@@ -147,7 +147,7 @@
if (propertyValue > 0)
setEdgeModeBaseValue(propertyValue);
else
- document().accessSVGExtensions()->reportWarning(
+ document().accessSVGExtensions().reportWarning(
"feConvolveMatrix: problem parsing edgeMode=\"" + value
+ "\". Filtered element will not be displayed.");
return;
@@ -166,7 +166,7 @@
if (divisor)
setDivisorBaseValue(divisor);
else
- document().accessSVGExtensions()->reportWarning(
+ document().accessSVGExtensions().reportWarning(
"feConvolveMatrix: problem parsing divisor=\"" + value
+ "\". Filtered element will not be displayed.");
return;
@@ -193,7 +193,7 @@
setKernelUnitLengthXBaseValue(x);
setKernelUnitLengthYBaseValue(y);
} else
- document().accessSVGExtensions()->reportWarning(
+ document().accessSVGExtensions().reportWarning(
"feConvolveMatrix: problem parsing kernelUnitLength=\"" + value
+ "\". Filtered element will not be displayed.");
return;
@@ -205,7 +205,7 @@
else if (value == "false")
setPreserveAlphaBaseValue(false);
else
- document().accessSVGExtensions()->reportWarning(
+ document().accessSVGExtensions().reportWarning(
"feConvolveMatrix: problem parsing preserveAlphaAttr=\"" + value
+ "\". Filtered element will not be displayed.");
return;
Modified: trunk/Source/WebCore/svg/SVGFEGaussianBlurElement.cpp (173882 => 173883)
--- trunk/Source/WebCore/svg/SVGFEGaussianBlurElement.cpp 2014-09-23 18:38:24 UTC (rev 173882)
+++ trunk/Source/WebCore/svg/SVGFEGaussianBlurElement.cpp 2014-09-23 18:44:41 UTC (rev 173883)
@@ -114,7 +114,7 @@
if (propertyValue > 0)
setEdgeModeBaseValue(propertyValue);
else
- document().accessSVGExtensions()->reportWarning(
+ document().accessSVGExtensions().reportWarning(
"feGaussianBlur: problem parsing edgeMode=\"" + value
+ "\". Filtered element will not be displayed.");
return;
Modified: trunk/Source/WebCore/svg/SVGFEImageElement.cpp (173882 => 173883)
--- trunk/Source/WebCore/svg/SVGFEImageElement.cpp 2014-09-23 18:38:24 UTC (rev 173882)
+++ trunk/Source/WebCore/svg/SVGFEImageElement.cpp 2014-09-23 18:44:41 UTC (rev 173883)
@@ -75,7 +75,7 @@
m_cachedImage = 0;
}
- document().accessSVGExtensions()->removeAllTargetReferencesForElement(this);
+ document().accessSVGExtensions().removeAllTargetReferencesForElement(this);
}
void SVGFEImageElement::requestImageResource()
@@ -100,13 +100,13 @@
if (id.isEmpty())
requestImageResource();
else {
- document().accessSVGExtensions()->addPendingResource(id, this);
+ document().accessSVGExtensions().addPendingResource(id, this);
ASSERT(hasPendingResources());
}
} else if (target->isSVGElement()) {
// Register us with the target in the dependencies map. Any change of hrefElement
// that leads to relayout/repainting now informs us, so we can react to it.
- document().accessSVGExtensions()->addElementReferencingTarget(this, downcast<SVGElement>(target));
+ document().accessSVGExtensions().addElementReferencingTarget(this, downcast<SVGElement>(target));
}
invalidate();
Modified: trunk/Source/WebCore/svg/SVGFitToViewBox.cpp (173882 => 173883)
--- trunk/Source/WebCore/svg/SVGFitToViewBox.cpp 2014-09-23 18:38:24 UTC (rev 173882)
+++ trunk/Source/WebCore/svg/SVGFitToViewBox.cpp 2014-09-23 18:44:41 UTC (rev 173883)
@@ -56,21 +56,21 @@
return true;
}
if (!valid) {
- doc->accessSVGExtensions()->reportWarning("Problem parsing viewBox=\"" + str + "\"");
+ doc->accessSVGExtensions().reportWarning("Problem parsing viewBox=\"" + str + "\"");
return false;
}
if (width < 0.0) { // check that width is positive
- doc->accessSVGExtensions()->reportError("A negative value for ViewBox width is not allowed");
+ doc->accessSVGExtensions().reportError("A negative value for ViewBox width is not allowed");
return false;
}
if (height < 0.0) { // check that height is positive
- doc->accessSVGExtensions()->reportError("A negative value for ViewBox height is not allowed");
+ doc->accessSVGExtensions().reportError("A negative value for ViewBox height is not allowed");
return false;
}
skipOptionalSVGSpaces(c, end);
if (c < end) { // nothing should come after the last, fourth number
- doc->accessSVGExtensions()->reportWarning("Problem parsing viewBox=\"" + str + "\"");
+ doc->accessSVGExtensions().reportWarning("Problem parsing viewBox=\"" + str + "\"");
return false;
}
Modified: trunk/Source/WebCore/svg/SVGFontFaceElement.cpp (173882 => 173883)
--- trunk/Source/WebCore/svg/SVGFontFaceElement.cpp 2014-09-23 18:38:24 UTC (rev 173882)
+++ trunk/Source/WebCore/svg/SVGFontFaceElement.cpp 2014-09-23 18:44:41 UTC (rev 173883)
@@ -272,7 +272,7 @@
ASSERT(!m_fontElement);
return InsertionDone;
}
- document().accessSVGExtensions()->registerSVGFontFaceElement(this);
+ document().accessSVGExtensions().registerSVGFontFaceElement(this);
rebuildFontFace();
return InsertionDone;
@@ -284,7 +284,7 @@
if (rootParent.inDocument()) {
m_fontElement = 0;
- document().accessSVGExtensions()->unregisterSVGFontFaceElement(this);
+ document().accessSVGExtensions().unregisterSVGFontFaceElement(this);
m_fontFaceRule->mutableProperties().clear();
document().styleResolverChanged(DeferRecalcStyle);
Modified: trunk/Source/WebCore/svg/SVGMPathElement.cpp (173882 => 173883)
--- trunk/Source/WebCore/svg/SVGMPathElement.cpp 2014-09-23 18:38:24 UTC (rev 173882)
+++ trunk/Source/WebCore/svg/SVGMPathElement.cpp 2014-09-23 18:44:41 UTC (rev 173883)
@@ -66,17 +66,17 @@
Element* target = SVGURIReference::targetElementFromIRIString(href(), document(), &id);
if (!target) {
// Do not register as pending if we are already pending this resource.
- if (document().accessSVGExtensions()->isPendingResource(this, id))
+ if (document().accessSVGExtensions().isPendingResource(this, id))
return;
if (!id.isEmpty()) {
- document().accessSVGExtensions()->addPendingResource(id, this);
+ document().accessSVGExtensions().addPendingResource(id, this);
ASSERT(hasPendingResources());
}
} else if (target->isSVGElement()) {
// Register us with the target in the dependencies map. Any change of hrefElement
// that leads to relayout/repainting now informs us, so we can react to it.
- document().accessSVGExtensions()->addElementReferencingTarget(this, downcast<SVGElement>(target));
+ document().accessSVGExtensions().addElementReferencingTarget(this, downcast<SVGElement>(target));
}
targetPathChanged();
@@ -84,7 +84,7 @@
void SVGMPathElement::clearResourceReferences()
{
- document().accessSVGExtensions()->removeAllTargetReferencesForElement(this);
+ document().accessSVGExtensions().removeAllTargetReferencesForElement(this);
}
Node::InsertionNotificationRequest SVGMPathElement::insertedInto(ContainerNode& rootParent)
Modified: trunk/Source/WebCore/svg/SVGPathElement.cpp (173882 => 173883)
--- trunk/Source/WebCore/svg/SVGPathElement.cpp 2014-09-23 18:38:24 UTC (rev 173882)
+++ trunk/Source/WebCore/svg/SVGPathElement.cpp 2014-09-23 18:44:41 UTC (rev 173883)
@@ -233,14 +233,14 @@
if (name == SVGNames::dAttr) {
if (!buildSVGPathByteStreamFromString(value, m_pathByteStream.get(), UnalteredParsing))
- document().accessSVGExtensions()->reportError("Problem parsing d=\"" + value + "\"");
+ document().accessSVGExtensions().reportError("Problem parsing d=\"" + value + "\"");
return;
}
if (name == SVGNames::pathLengthAttr) {
setPathLengthBaseValue(value.toFloat());
if (pathLengthBaseValue() < 0)
- document().accessSVGExtensions()->reportError("A negative value for path attribute <pathLength> is not allowed");
+ document().accessSVGExtensions().reportError("A negative value for path attribute <pathLength> is not allowed");
return;
}
@@ -284,7 +284,7 @@
{
// <mpath> can only reference <path> but this dependency is not handled in
// markForLayoutAndParentResourceInvalidation so we update any mpath dependencies manually.
- if (HashSet<SVGElement*>* dependencies = document().accessSVGExtensions()->setOfElementsReferencingTarget(this)) {
+ if (HashSet<SVGElement*>* dependencies = document().accessSVGExtensions().setOfElementsReferencingTarget(this)) {
for (auto* element : *dependencies) {
if (isSVGMPathElement(element))
downcast<SVGMPathElement>(*element).targetPathChanged();
Modified: trunk/Source/WebCore/svg/SVGPolyElement.cpp (173882 => 173883)
--- trunk/Source/WebCore/svg/SVGPolyElement.cpp 2014-09-23 18:38:24 UTC (rev 173882)
+++ trunk/Source/WebCore/svg/SVGPolyElement.cpp 2014-09-23 18:44:41 UTC (rev 173883)
@@ -85,7 +85,7 @@
if (name == SVGNames::pointsAttr) {
SVGPointList newList;
if (!pointsListFromSVGData(newList, value))
- document().accessSVGExtensions()->reportError("Problem parsing points=\"" + value + "\"");
+ document().accessSVGExtensions().reportError("Problem parsing points=\"" + value + "\"");
if (SVGAnimatedProperty* wrapper = SVGAnimatedProperty::lookupWrapper<SVGPolyElement, SVGAnimatedPointList>(this, pointsPropertyInfo()))
static_cast<SVGAnimatedPointList*>(wrapper)->detachListWrappers(newList.size());
Modified: trunk/Source/WebCore/svg/SVGSVGElement.cpp (173882 => 173883)
--- trunk/Source/WebCore/svg/SVGSVGElement.cpp 2014-09-23 18:38:24 UTC (rev 173882)
+++ trunk/Source/WebCore/svg/SVGSVGElement.cpp 2014-09-23 18:44:41 UTC (rev 173883)
@@ -107,7 +107,7 @@
document().unregisterForPageCacheSuspensionCallbacks(this);
// There are cases where removedFromDocument() is not called.
// see ContainerNode::removeAllChildren, called by its destructor.
- document().accessSVGExtensions()->removeTimeContainer(this);
+ document().accessSVGExtensions().removeTimeContainer(this);
}
void SVGSVGElement::didMoveToNewDocument(Document* oldDocument)
@@ -481,7 +481,7 @@
Node::InsertionNotificationRequest SVGSVGElement::insertedInto(ContainerNode& rootParent)
{
if (rootParent.inDocument()) {
- document().accessSVGExtensions()->addTimeContainer(this);
+ document().accessSVGExtensions().addTimeContainer(this);
// Animations are started at the end of document parsing and after firing the load event,
// but if we miss that train (deferred programmatic element insertion for example) we need
@@ -495,7 +495,7 @@
void SVGSVGElement::removedFrom(ContainerNode& rootParent)
{
if (rootParent.inDocument())
- document().accessSVGExtensions()->removeTimeContainer(this);
+ document().accessSVGExtensions().removeTimeContainer(this);
SVGGraphicsElement::removedFrom(rootParent);
}
Modified: trunk/Source/WebCore/svg/SVGTRefElement.cpp (173882 => 173883)
--- trunk/Source/WebCore/svg/SVGTRefElement.cpp 2014-09-23 18:38:24 UTC (rev 173882)
+++ trunk/Source/WebCore/svg/SVGTRefElement.cpp 2014-09-23 18:44:41 UTC (rev 173883)
@@ -175,7 +175,7 @@
String id;
SVGURIReference::targetElementFromIRIString(href(), document(), &id);
if (!id.isEmpty())
- document().accessSVGExtensions()->addPendingResource(id, this);
+ document().accessSVGExtensions().addPendingResource(id, this);
}
bool SVGTRefElement::isSupportedAttribute(const QualifiedName& attrName)
@@ -263,7 +263,7 @@
if (id.isEmpty())
return;
- document().accessSVGExtensions()->addPendingResource(id, this);
+ document().accessSVGExtensions().addPendingResource(id, this);
ASSERT(hasPendingResources());
return;
}
Modified: trunk/Source/WebCore/svg/SVGTextPathElement.cpp (173882 => 173883)
--- trunk/Source/WebCore/svg/SVGTextPathElement.cpp 2014-09-23 18:38:24 UTC (rev 173882)
+++ trunk/Source/WebCore/svg/SVGTextPathElement.cpp 2014-09-23 18:44:41 UTC (rev 173883)
@@ -67,7 +67,7 @@
void SVGTextPathElement::clearResourceReferences()
{
- document().accessSVGExtensions()->removeAllTargetReferencesForElement(this);
+ document().accessSVGExtensions().removeAllTargetReferencesForElement(this);
}
bool SVGTextPathElement::isSupportedAttribute(const QualifiedName& attrName)
@@ -162,17 +162,17 @@
Element* target = SVGURIReference::targetElementFromIRIString(href(), document(), &id);
if (!target) {
// Do not register as pending if we are already pending this resource.
- if (document().accessSVGExtensions()->isPendingResource(this, id))
+ if (document().accessSVGExtensions().isPendingResource(this, id))
return;
if (!id.isEmpty()) {
- document().accessSVGExtensions()->addPendingResource(id, this);
+ document().accessSVGExtensions().addPendingResource(id, this);
ASSERT(hasPendingResources());
}
} else if (target->hasTagName(SVGNames::pathTag)) {
// Register us with the target in the dependencies map. Any change of hrefElement
// that leads to relayout/repainting now informs us, so we can react to it.
- document().accessSVGExtensions()->addElementReferencingTarget(this, downcast<SVGElement>(target));
+ document().accessSVGExtensions().addElementReferencingTarget(this, downcast<SVGElement>(target));
}
}
Modified: trunk/Source/WebCore/svg/SVGUseElement.cpp (173882 => 173883)
--- trunk/Source/WebCore/svg/SVGUseElement.cpp 2014-09-23 18:38:24 UTC (rev 173882)
+++ trunk/Source/WebCore/svg/SVGUseElement.cpp 2014-09-23 18:44:41 UTC (rev 173883)
@@ -390,7 +390,7 @@
m_needsShadowTreeRecreation = false;
- document().accessSVGExtensions()->removeAllTargetReferencesForElement(this);
+ document().accessSVGExtensions().removeAllTargetReferencesForElement(this);
}
void SVGUseElement::buildPendingResource()
@@ -411,7 +411,7 @@
if (id.isEmpty())
return;
- referencedDocument()->accessSVGExtensions()->addPendingResource(id, this);
+ referencedDocument()->accessSVGExtensions().addPendingResource(id, this);
ASSERT(hasPendingResources());
return;
}
@@ -550,7 +550,7 @@
if (node->isSVGElement() && downcast<SVGElement>(*node).isSVGGraphicsElement()) {
if (!isDirectReference(downcast<SVGElement>(*node))) {
// Spec: Indirect references are an error (14.3.5)
- document().accessSVGExtensions()->reportError("Not allowed to use indirect reference in <clip-path>");
+ document().accessSVGExtensions().reportError("Not allowed to use indirect reference in <clip-path>");
} else {
toSVGGraphicsElement(*node).toClipPath(path);
// FIXME: Avoid manual resolution of x/y here. Its potentially harmful.
@@ -593,7 +593,7 @@
// We only need to track first degree <use> dependencies. Indirect references are handled
// as the invalidation bubbles up the dependency chain.
if (!foundUse) {
- document().accessSVGExtensions()->addElementReferencingTarget(this, target);
+ document().accessSVGExtensions().addElementReferencingTarget(this, target);
foundUse = true;
}
} else if (isDisallowedElement(*target)) {
Modified: trunk/Source/WebCore/svg/animation/SVGSMILElement.cpp (173882 => 173883)
--- trunk/Source/WebCore/svg/animation/SVGSMILElement.cpp 2014-09-23 18:38:24 UTC (rev 173882)
+++ trunk/Source/WebCore/svg/animation/SVGSMILElement.cpp 2014-09-23 18:44:41 UTC (rev 173883)
@@ -143,7 +143,7 @@
void SVGSMILElement::clearResourceReferences()
{
- document().accessSVGExtensions()->removeAllTargetReferencesForElement(this);
+ document().accessSVGExtensions().removeAllTargetReferencesForElement(this);
}
void SVGSMILElement::clearTarget()
@@ -178,17 +178,17 @@
if (!svgTarget) {
// Do not register as pending if we are already pending this resource.
- if (document().accessSVGExtensions()->isPendingResource(this, id))
+ if (document().accessSVGExtensions().isPendingResource(this, id))
return;
if (!id.isEmpty()) {
- document().accessSVGExtensions()->addPendingResource(id, this);
+ document().accessSVGExtensions().addPendingResource(id, this);
ASSERT(hasPendingResources());
}
} else {
// Register us with the target in the dependencies map. Any change of hrefElement
// that leads to relayout/repainting now informs us, so we can react to it.
- document().accessSVGExtensions()->addElementReferencingTarget(this, svgTarget);
+ document().accessSVGExtensions().addElementReferencingTarget(this, svgTarget);
}
}