diff options
author | Allan Sandfeld Jensen <allan.jensen@digia.com> | 2013-09-13 12:51:20 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-19 20:50:05 +0200 |
commit | d441d6f39bb846989d95bcf5caf387b42414718d (patch) | |
tree | e367e64a75991c554930278175d403c072de6bb8 /Source/WebCore/svg/SVGTextPathElement.cpp | |
parent | 0060b2994c07842f4c59de64b5e3e430525c4b90 (diff) | |
download | qtwebkit-d441d6f39bb846989d95bcf5caf387b42414718d.tar.gz |
Import Qt5x2 branch of QtWebkit for Qt 5.2
Importing a new snapshot of webkit.
Change-Id: I2d01ad12cdc8af8cb015387641120a9d7ea5f10c
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Diffstat (limited to 'Source/WebCore/svg/SVGTextPathElement.cpp')
-rw-r--r-- | Source/WebCore/svg/SVGTextPathElement.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/Source/WebCore/svg/SVGTextPathElement.cpp b/Source/WebCore/svg/SVGTextPathElement.cpp index ec4d8f781..22b78ec60 100644 --- a/Source/WebCore/svg/SVGTextPathElement.cpp +++ b/Source/WebCore/svg/SVGTextPathElement.cpp @@ -29,6 +29,7 @@ #include "RenderSVGTextPath.h" #include "SVGElementInstance.h" #include "SVGNames.h" +#include "XLinkNames.h" namespace WebCore { @@ -81,7 +82,7 @@ bool SVGTextPathElement::isSupportedAttribute(const QualifiedName& attrName) supportedAttributes.add(SVGNames::methodAttr); supportedAttributes.add(SVGNames::spacingAttr); } - return supportedAttributes.contains<QualifiedName, SVGAttributeHashTranslator>(attrName); + return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName); } void SVGTextPathElement::parseAttribute(const QualifiedName& name, const AtomicString& value) @@ -163,15 +164,18 @@ void SVGTextPathElement::buildPendingResource() String id; Element* target = SVGURIReference::targetElementFromIRIString(href(), document(), &id); if (!target) { - if (hasPendingResources() || id.isEmpty()) + // Do not register as pending if we are already pending this resource. + if (document()->accessSVGExtensions()->isElementPendingResource(this, id)) return; - document()->accessSVGExtensions()->addPendingResource(id, this); - ASSERT(hasPendingResources()); - } else if (target->isSVGElement()) { + if (!id.isEmpty()) { + 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, static_cast<SVGElement*>(target)); + document()->accessSVGExtensions()->addElementReferencingTarget(this, toSVGElement(target)); } } |