Commit 9e1ab24d authored by Fredrik Söderquist's avatar Fredrik Söderquist Committed by Commit Bot

Mark SVGURIReference::IsKnownAttribute static

Also use it SVGSMILElement::SvgAttributeChanged(...).

Change-Id: Ic3352bf30eda7b86736858e7f68c50a6ce8a628c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1912240
Commit-Queue: Philip Rogers <pdr@chromium.org>
Auto-Submit: Fredrik Söderquist <fs@opera.com>
Reviewed-by: default avatarPhilip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#714691}
parent 3975f271
......@@ -38,7 +38,6 @@
#include "third_party/blink/renderer/core/svg/animation/smil_time_container.h"
#include "third_party/blink/renderer/core/svg/svg_svg_element.h"
#include "third_party/blink/renderer/core/svg/svg_uri_reference.h"
#include "third_party/blink/renderer/core/xlink_names.h"
#include "third_party/blink/renderer/platform/heap/handle.h"
#include "third_party/blink/renderer/platform/heap/heap.h"
#include "third_party/blink/renderer/platform/instrumentation/use_counter.h"
......@@ -524,8 +523,7 @@ void SVGSMILElement::ParseAttribute(const AttributeModificationParams& params) {
}
void SVGSMILElement::SvgAttributeChanged(const QualifiedName& attr_name) {
if (attr_name.Matches(svg_names::kHrefAttr) ||
attr_name.Matches(xlink_names::kHrefAttr)) {
if (SVGURIReference::IsKnownAttribute(attr_name)) {
// TODO(fs): Could be smarter here when 'href' is specified and 'xlink:href'
// is changed.
SVGElement::InvalidationGuard invalidation_guard(this);
......
......@@ -40,7 +40,7 @@ class CORE_EXPORT SVGURIReference : public GarbageCollectedMixin {
public:
virtual ~SVGURIReference() = default;
bool IsKnownAttribute(const QualifiedName&);
static bool IsKnownAttribute(const QualifiedName&);
// Use this for accesses to 'href' or 'xlink:href' (in that order) for
// elements where both are allowed and don't necessarily inherit from
......
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