2015-05-03 22:32:37 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2007-01-27 02:45:15 +03:00
|
|
|
|
2013-01-10 09:30:13 +04:00
|
|
|
#include "mozilla/dom/SVGAElement.h"
|
2013-07-10 13:56:47 +04:00
|
|
|
|
2014-03-18 08:48:21 +04:00
|
|
|
#include "mozilla/EventDispatcher.h"
|
2019-03-29 18:11:04 +03:00
|
|
|
#include "mozilla/dom/DocumentInlines.h"
|
2013-01-10 09:30:13 +04:00
|
|
|
#include "mozilla/dom/SVGAElementBinding.h"
|
2024-05-07 00:54:37 +03:00
|
|
|
#include "mozilla/FocusModel.h"
|
2007-01-27 02:45:15 +03:00
|
|
|
#include "nsCOMPtr.h"
|
2011-08-11 17:29:50 +04:00
|
|
|
#include "nsContentUtils.h"
|
2013-07-10 13:56:47 +04:00
|
|
|
#include "nsGkAtoms.h"
|
2018-06-08 22:57:13 +03:00
|
|
|
#include "nsIContentInlines.h"
|
2013-08-24 06:42:40 +04:00
|
|
|
#include "nsIURI.h"
|
2007-01-27 02:45:15 +03:00
|
|
|
|
2018-12-21 14:43:29 +03:00
|
|
|
NS_IMPL_NS_NEW_SVG_ELEMENT(A)
|
2013-01-10 09:30:13 +04:00
|
|
|
|
2022-05-09 23:41:15 +03:00
|
|
|
namespace mozilla::dom {
|
2013-01-10 09:30:13 +04:00
|
|
|
|
Bug 1117172 part 3. Change the wrappercached WrapObject methods to allow passing in aGivenProto. r=peterv
The only manual changes here are to BindingUtils.h, BindingUtils.cpp,
Codegen.py, Element.cpp, IDBFileRequest.cpp, IDBObjectStore.cpp,
dom/workers/Navigator.cpp, WorkerPrivate.cpp, DeviceStorageRequestChild.cpp,
Notification.cpp, nsGlobalWindow.cpp, MessagePort.cpp, nsJSEnvironment.cpp,
Sandbox.cpp, XPCConvert.cpp, ExportHelpers.cpp, and DataStoreService.cpp. The
rest of this diff was generated by running the following commands:
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObject\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(Binding(?:_workers)?::Wrap\((?:aCx|cx|aContext|aCtx|js), [^,)]+)\)/\1, aGivenProto)/g'
2015-03-19 17:13:33 +03:00
|
|
|
JSObject* SVGAElement::WrapNode(JSContext* aCx,
|
|
|
|
JS::Handle<JSObject*> aGivenProto) {
|
2018-06-26 00:20:54 +03:00
|
|
|
return SVGAElement_Binding::Wrap(aCx, this, aGivenProto);
|
2013-01-10 09:30:13 +04:00
|
|
|
}
|
|
|
|
|
2018-12-21 11:58:14 +03:00
|
|
|
SVGElement::StringInfo SVGAElement::sStringInfo[3] = {
|
2018-03-29 12:45:24 +03:00
|
|
|
{nsGkAtoms::href, kNameSpaceID_None, true},
|
|
|
|
{nsGkAtoms::href, kNameSpaceID_XLink, true},
|
|
|
|
{nsGkAtoms::target, kNameSpaceID_None, true}};
|
2008-06-14 13:01:02 +04:00
|
|
|
|
2007-01-27 02:45:15 +03:00
|
|
|
//----------------------------------------------------------------------
|
|
|
|
// nsISupports methods
|
|
|
|
|
2018-04-14 16:53:37 +03:00
|
|
|
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(SVGAElement)
|
2017-09-06 00:12:31 +03:00
|
|
|
NS_INTERFACE_MAP_ENTRY(Link)
|
|
|
|
NS_INTERFACE_MAP_END_INHERITING(SVGAElementBase)
|
2013-12-12 23:30:27 +04:00
|
|
|
|
2018-04-14 16:53:37 +03:00
|
|
|
NS_IMPL_CYCLE_COLLECTION_INHERITED(SVGAElement, SVGAElementBase, mRelList)
|
|
|
|
|
2017-09-06 20:18:06 +03:00
|
|
|
NS_IMPL_ADDREF_INHERITED(SVGAElement, SVGAElementBase)
|
|
|
|
NS_IMPL_RELEASE_INHERITED(SVGAElement, SVGAElementBase)
|
2007-01-27 02:45:15 +03:00
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
// Implementation
|
|
|
|
|
2018-09-21 23:45:49 +03:00
|
|
|
SVGAElement::SVGAElement(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
|
|
|
|
: SVGAElementBase(std::move(aNodeInfo)), Link(this) {}
|
2007-01-27 02:45:15 +03:00
|
|
|
|
2019-03-19 03:01:03 +03:00
|
|
|
already_AddRefed<DOMSVGAnimatedString> SVGAElement::Href() {
|
2016-06-28 12:22:30 +03:00
|
|
|
return mStringAttributes[HREF].IsExplicitlySet()
|
|
|
|
? mStringAttributes[HREF].ToDOMAnimatedString(this)
|
|
|
|
: mStringAttributes[XLINK_HREF].ToDOMAnimatedString(this);
|
2007-01-27 02:45:15 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
// nsINode methods
|
|
|
|
|
2016-10-21 05:11:07 +03:00
|
|
|
void SVGAElement::GetEventTargetParent(EventChainPreVisitor& aVisitor) {
|
2018-04-05 20:42:41 +03:00
|
|
|
Element::GetEventTargetParent(aVisitor);
|
2007-04-23 11:31:21 +04:00
|
|
|
|
2018-04-05 20:42:41 +03:00
|
|
|
GetEventTargetParentForLinks(aVisitor);
|
2007-04-23 11:31:21 +04:00
|
|
|
}
|
|
|
|
|
2014-03-18 08:48:20 +04:00
|
|
|
nsresult SVGAElement::PostHandleEvent(EventChainPostVisitor& aVisitor) {
|
2007-01-27 02:45:15 +03:00
|
|
|
return PostHandleEventForLinks(aVisitor);
|
|
|
|
}
|
|
|
|
|
2013-01-10 09:30:13 +04:00
|
|
|
NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGAElement)
|
2007-01-27 02:45:15 +03:00
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
|
2019-03-19 03:01:03 +03:00
|
|
|
already_AddRefed<DOMSVGAnimatedString> SVGAElement::Target() {
|
2013-03-10 11:58:53 +04:00
|
|
|
return mStringAttributes[TARGET].ToDOMAnimatedString(this);
|
2013-01-10 09:30:13 +04:00
|
|
|
}
|
|
|
|
|
2018-04-04 06:58:49 +03:00
|
|
|
void SVGAElement::GetDownload(nsAString& aDownload) {
|
|
|
|
GetAttr(nsGkAtoms::download, aDownload);
|
2013-02-19 02:48:53 +04:00
|
|
|
}
|
2013-01-10 09:30:13 +04:00
|
|
|
|
2018-04-04 06:58:49 +03:00
|
|
|
void SVGAElement::SetDownload(const nsAString& aDownload, ErrorResult& rv) {
|
|
|
|
SetAttr(nsGkAtoms::download, aDownload, rv);
|
2013-02-19 02:48:53 +04:00
|
|
|
}
|
2007-01-27 02:45:15 +03:00
|
|
|
|
2018-04-14 16:53:37 +03:00
|
|
|
void SVGAElement::GetPing(nsAString& aPing) { GetAttr(nsGkAtoms::ping, aPing); }
|
|
|
|
|
|
|
|
void SVGAElement::SetPing(const nsAString& aPing, ErrorResult& rv) {
|
|
|
|
SetAttr(nsGkAtoms::ping, aPing, rv);
|
|
|
|
}
|
|
|
|
|
|
|
|
void SVGAElement::GetRel(nsAString& aRel) { GetAttr(nsGkAtoms::rel, aRel); }
|
|
|
|
|
|
|
|
void SVGAElement::SetRel(const nsAString& aRel, ErrorResult& rv) {
|
|
|
|
SetAttr(nsGkAtoms::rel, aRel, rv);
|
|
|
|
}
|
|
|
|
|
|
|
|
void SVGAElement::GetReferrerPolicy(nsAString& aPolicy) {
|
2020-09-23 18:17:15 +03:00
|
|
|
GetEnumAttr(nsGkAtoms::referrerpolicy, "", aPolicy);
|
2018-04-14 16:53:37 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
void SVGAElement::SetReferrerPolicy(const nsAString& aPolicy,
|
|
|
|
mozilla::ErrorResult& rv) {
|
|
|
|
SetAttr(nsGkAtoms::referrerpolicy, aPolicy, rv);
|
|
|
|
}
|
|
|
|
|
|
|
|
nsDOMTokenList* SVGAElement::RelList() {
|
|
|
|
if (!mRelList) {
|
2024-02-06 19:47:38 +03:00
|
|
|
mRelList =
|
|
|
|
new nsDOMTokenList(this, nsGkAtoms::rel, sAnchorAndFormRelValues);
|
2018-04-14 16:53:37 +03:00
|
|
|
}
|
|
|
|
return mRelList;
|
|
|
|
}
|
|
|
|
|
|
|
|
void SVGAElement::GetHreflang(nsAString& aHreflang) {
|
|
|
|
GetAttr(nsGkAtoms::hreflang, aHreflang);
|
|
|
|
}
|
|
|
|
|
|
|
|
void SVGAElement::SetHreflang(const nsAString& aHreflang,
|
|
|
|
mozilla::ErrorResult& rv) {
|
|
|
|
SetAttr(nsGkAtoms::hreflang, aHreflang, rv);
|
|
|
|
}
|
|
|
|
|
|
|
|
void SVGAElement::GetType(nsAString& aType) { GetAttr(nsGkAtoms::type, aType); }
|
|
|
|
|
|
|
|
void SVGAElement::SetType(const nsAString& aType, mozilla::ErrorResult& rv) {
|
|
|
|
SetAttr(nsGkAtoms::type, aType, rv);
|
|
|
|
}
|
|
|
|
|
2022-11-16 03:21:30 +03:00
|
|
|
void SVGAElement::GetText(nsAString& aText, mozilla::ErrorResult& rv) const {
|
2018-04-14 16:53:37 +03:00
|
|
|
if (NS_WARN_IF(
|
|
|
|
!nsContentUtils::GetNodeTextContent(this, true, aText, fallible))) {
|
|
|
|
rv.Throw(NS_ERROR_OUT_OF_MEMORY);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void SVGAElement::SetText(const nsAString& aText, mozilla::ErrorResult& rv) {
|
|
|
|
rv = nsContentUtils::SetNodeTextContent(this, aText, false);
|
|
|
|
}
|
|
|
|
|
2007-01-27 02:45:15 +03:00
|
|
|
//----------------------------------------------------------------------
|
2009-07-13 15:48:06 +04:00
|
|
|
// nsIContent methods
|
2007-01-27 02:45:15 +03:00
|
|
|
|
Bug 1555216 - Change the signature of BindToTree to be (BindContext&, nsINode& aParentNode). r=bzbarsky
BindContext was going to have way more information at first, but then I realized
that most of the things I wanted to know were basically a flag away using the
parent node.
Still I think it's worth it, now experimenting with BindToTree will only mean
adding a field to a struct that's included from a couple cpp files, instead of a
massive pain.
I also think this is clearer, and doing this highlights quite a few
inconsistencies in our code which I've left untouched, but commented with
FIXMEs.
Steps are:
$ for file in $(rg 'nsresult BindToTree\(' | cut -d : -f 1 | sort | uniq); do sed -i 's#nsresult BindToTree(Document\* aDocument, nsIContent\* aParent,#nsresult BindToTree(BindContext\&, nsINode\& aParent)#g' $file; done
$ for file in $(rg 'nsresult BindToTree\(' | cut -d : -f 1 | sort | uniq); do sed -i 's# nsIContent\* aBindingParent) override#override#g' $file; done
$ for file in $(rg '::BindToTree\(' | cut -d : -f 1 | sort | uniq); do sed -i 's#::BindToTree(Document\* aDocument, nsIContent\* aParent,#::BindToTree(BindContext\& aContext, nsINode\& aParent)#g' $file; done
$ for file in $(rg '::BindToTree\(' | cut -d : -f 1 | sort | uniq); do sed -i 's#nsIContent\* aBindingParent)##g' $file; done
$ for file in $(rg '::BindToTree\(' | cut -d : -f 1 | sort | uniq); do sed -i 's#::BindToTree(aDocument, aParent, aBindingParent)#::BindToTree(aContext, aParent)#g' $file; done
$ ./mach clang-format
Then manual fixups.
Depends on D32948
Differential Revision: https://phabricator.services.mozilla.com/D32949
2019-05-29 07:27:04 +03:00
|
|
|
nsresult SVGAElement::BindToTree(BindContext& aContext, nsINode& aParent) {
|
|
|
|
nsresult rv = SVGAElementBase::BindToTree(aContext, aParent);
|
2009-11-23 21:48:52 +03:00
|
|
|
NS_ENSURE_SUCCESS(rv, rv);
|
2023-08-30 12:18:32 +03:00
|
|
|
Link::BindToTree(aContext);
|
2009-11-23 21:48:52 +03:00
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
2024-02-20 18:05:40 +03:00
|
|
|
void SVGAElement::UnbindFromTree(UnbindContext& aContext) {
|
|
|
|
SVGAElementBase::UnbindFromTree(aContext);
|
2018-12-13 18:16:52 +03:00
|
|
|
// Without removing the link state we risk a dangling pointer
|
|
|
|
// in the mStyledLinks hashtable
|
2023-08-30 12:18:32 +03:00
|
|
|
Link::UnbindFromTree();
|
2009-11-23 21:48:52 +03:00
|
|
|
}
|
|
|
|
|
2016-09-28 05:21:50 +03:00
|
|
|
int32_t SVGAElement::TabIndexDefault() { return 0; }
|
|
|
|
|
2024-05-07 00:54:37 +03:00
|
|
|
Focusable SVGAElement::IsFocusableWithoutStyle(IsFocusableFlags) {
|
2023-12-08 14:34:06 +03:00
|
|
|
Focusable result;
|
|
|
|
if (IsSVGFocusable(&result.mFocusable, &result.mTabIndex)) {
|
|
|
|
return result;
|
2016-09-28 05:21:50 +03:00
|
|
|
}
|
|
|
|
|
2019-07-09 19:17:27 +03:00
|
|
|
if (!OwnerDoc()->LinkHandlingEnabled()) {
|
2023-12-08 14:34:06 +03:00
|
|
|
return {};
|
2016-09-28 05:21:50 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
// Links that are in an editable region should never be focusable, even if
|
|
|
|
// they are in a contenteditable="false" region.
|
2019-10-05 14:39:16 +03:00
|
|
|
if (nsContentUtils::IsNodeInEditableRegion(this)) {
|
2023-12-08 14:34:06 +03:00
|
|
|
return {};
|
2007-01-27 02:45:15 +03:00
|
|
|
}
|
2016-09-28 05:21:50 +03:00
|
|
|
|
2020-04-04 23:03:09 +03:00
|
|
|
if (GetTabIndexAttrValue().isNothing()) {
|
2016-09-28 05:21:50 +03:00
|
|
|
// check whether we're actually a link
|
2022-03-30 20:34:31 +03:00
|
|
|
if (!IsLink()) {
|
2016-09-28 05:21:50 +03:00
|
|
|
// Not tabbable or focusable without href (bug 17605), unless
|
|
|
|
// forced to be via presence of nonnegative tabindex attribute
|
2023-12-08 14:34:06 +03:00
|
|
|
return {};
|
2016-09-28 05:21:50 +03:00
|
|
|
}
|
2016-05-24 07:22:17 +03:00
|
|
|
}
|
2024-05-07 00:54:37 +03:00
|
|
|
if (!FocusModel::IsTabFocusable(TabFocusableType::Links)) {
|
2023-12-08 14:34:06 +03:00
|
|
|
result.mTabIndex = -1;
|
2007-01-27 02:45:15 +03:00
|
|
|
}
|
2023-12-08 14:34:06 +03:00
|
|
|
return result;
|
2007-01-27 02:45:15 +03:00
|
|
|
}
|
|
|
|
|
2022-03-31 17:33:57 +03:00
|
|
|
bool SVGAElement::HasHref() const {
|
|
|
|
// Currently our SMIL implementation does not modify the DOM attributes. Once
|
|
|
|
// we implement the SVG 2 SMIL behaviour this can be removed.
|
|
|
|
return mStringAttributes[HREF].IsExplicitlySet() ||
|
|
|
|
mStringAttributes[XLINK_HREF].IsExplicitlySet();
|
|
|
|
}
|
2007-01-27 02:45:15 +03:00
|
|
|
|
2022-03-31 17:33:57 +03:00
|
|
|
already_AddRefed<nsIURI> SVGAElement::GetHrefURI() const {
|
2007-01-27 02:45:15 +03:00
|
|
|
// Optimization: check for href first for early return
|
2017-05-06 22:32:14 +03:00
|
|
|
bool useBareHref = mStringAttributes[HREF].IsExplicitlySet();
|
2022-03-31 17:33:57 +03:00
|
|
|
if (useBareHref || mStringAttributes[XLINK_HREF].IsExplicitlySet()) {
|
2007-01-27 02:45:15 +03:00
|
|
|
// Get absolute URI
|
2009-01-22 03:56:51 +03:00
|
|
|
nsAutoString str;
|
2017-05-06 22:32:14 +03:00
|
|
|
const uint8_t idx = useBareHref ? HREF : XLINK_HREF;
|
2016-06-28 12:22:30 +03:00
|
|
|
mStringAttributes[idx].GetAnimValue(str, this);
|
2022-03-30 20:34:31 +03:00
|
|
|
nsCOMPtr<nsIURI> uri;
|
|
|
|
nsContentUtils::NewURIWithDocumentCharset(getter_AddRefs(uri), str,
|
|
|
|
OwnerDoc(), GetBaseURI());
|
|
|
|
return uri.forget();
|
2007-01-27 02:45:15 +03:00
|
|
|
}
|
2022-03-30 20:34:31 +03:00
|
|
|
return nullptr;
|
2007-01-27 02:45:15 +03:00
|
|
|
}
|
|
|
|
|
2024-05-24 11:09:36 +03:00
|
|
|
void SVGAElement::GetLinkTargetImpl(nsAString& aTarget) {
|
2009-01-22 03:56:51 +03:00
|
|
|
mStringAttributes[TARGET].GetAnimValue(aTarget, this);
|
2007-04-03 12:59:11 +04:00
|
|
|
if (aTarget.IsEmpty()) {
|
2017-12-07 21:13:50 +03:00
|
|
|
static Element::AttrValuesArray sShowVals[] = {nsGkAtoms::_new,
|
2018-04-03 06:21:06 +03:00
|
|
|
nsGkAtoms::replace, nullptr};
|
2018-11-30 13:46:48 +03:00
|
|
|
|
2008-08-01 13:52:23 +04:00
|
|
|
switch (FindAttrValueIn(kNameSpaceID_XLink, nsGkAtoms::show, sShowVals,
|
|
|
|
eCaseMatters)) {
|
|
|
|
case 0:
|
|
|
|
aTarget.AssignLiteral("_blank");
|
|
|
|
return;
|
|
|
|
case 1:
|
|
|
|
return;
|
|
|
|
}
|
2019-01-02 16:05:23 +03:00
|
|
|
Document* ownerDoc = OwnerDoc();
|
2007-04-03 12:59:11 +04:00
|
|
|
if (ownerDoc) {
|
|
|
|
ownerDoc->GetBaseTarget(aTarget);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2008-06-14 13:01:02 +04:00
|
|
|
|
2023-04-21 11:56:27 +03:00
|
|
|
void SVGAElement::AfterSetAttr(int32_t aNameSpaceID, nsAtom* aName,
|
|
|
|
const nsAttrValue* aValue,
|
|
|
|
const nsAttrValue* aOldValue,
|
|
|
|
nsIPrincipal* aMaybeScriptedPrincipal,
|
|
|
|
bool aNotify) {
|
2016-06-28 12:22:30 +03:00
|
|
|
if (aName == nsGkAtoms::href && (aNameSpaceID == kNameSpaceID_XLink ||
|
|
|
|
aNameSpaceID == kNameSpaceID_None)) {
|
2018-01-03 22:21:22 +03:00
|
|
|
// We can't assume that null aValue means we no longer have an href, because
|
|
|
|
// we could be unsetting xlink:href but still have a null-namespace href, or
|
|
|
|
// vice versa. But we can fast-path the case when we _do_ have a new value.
|
|
|
|
Link::ResetLinkState(aNotify, aValue || Link::ElementHasHref());
|
2010-02-24 19:37:02 +03:00
|
|
|
}
|
|
|
|
|
2018-01-03 22:21:22 +03:00
|
|
|
return SVGAElementBase::AfterSetAttr(aNameSpaceID, aName, aValue, aOldValue,
|
|
|
|
aMaybeScriptedPrincipal, aNotify);
|
2010-02-24 19:37:02 +03:00
|
|
|
}
|
|
|
|
|
2008-06-14 13:01:02 +04:00
|
|
|
//----------------------------------------------------------------------
|
2018-12-21 11:58:14 +03:00
|
|
|
// SVGElement methods
|
2008-06-14 13:01:02 +04:00
|
|
|
|
2018-12-21 11:58:14 +03:00
|
|
|
SVGElement::StringAttributesInfo SVGAElement::GetStringInfo() {
|
2008-06-14 13:01:02 +04:00
|
|
|
return StringAttributesInfo(mStringAttributes, sStringInfo,
|
2011-10-11 09:50:08 +04:00
|
|
|
ArrayLength(sStringInfo));
|
2008-06-14 13:01:02 +04:00
|
|
|
}
|
2013-01-10 09:30:13 +04:00
|
|
|
|
2024-04-12 18:26:36 +03:00
|
|
|
void SVGAElement::DidAnimateAttribute(int32_t aNameSpaceID,
|
|
|
|
nsAtom* aAttribute) {
|
|
|
|
if ((aNameSpaceID == kNameSpaceID_None ||
|
|
|
|
aNameSpaceID == kNameSpaceID_XLink) &&
|
|
|
|
aAttribute == nsGkAtoms::href) {
|
2024-04-09 18:35:30 +03:00
|
|
|
Link::ResetLinkState(true, Link::ElementHasHref());
|
|
|
|
}
|
2024-04-12 18:26:36 +03:00
|
|
|
SVGAElementBase::DidAnimateAttribute(aNameSpaceID, aAttribute);
|
2024-04-09 18:35:30 +03:00
|
|
|
}
|
|
|
|
|
2022-05-09 23:41:15 +03:00
|
|
|
} // namespace mozilla::dom
|