diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2017-08-18 13:39:37 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-03-12 10:01:04 +0100 |
commit | ea44e60b7ed5f674b6de65fad669ac43a45438cc (patch) | |
tree | 38b4e34c1859e6881c428f962cf47a1cc52cbd5b /dom/xul | |
parent | 6be9e507077bfdd2b8c82c203cf70f010ecce086 (diff) | |
download | UXP-ea44e60b7ed5f674b6de65fad669ac43a45438cc.tar UXP-ea44e60b7ed5f674b6de65fad669ac43a45438cc.tar.gz UXP-ea44e60b7ed5f674b6de65fad669ac43a45438cc.tar.lz UXP-ea44e60b7ed5f674b6de65fad669ac43a45438cc.tar.xz UXP-ea44e60b7ed5f674b6de65fad669ac43a45438cc.zip |
HTML - implement the labels attribute (follow up)
Diffstat (limited to 'dom/xul')
-rw-r--r-- | dom/xul/XULDocument.cpp | 14 | ||||
-rw-r--r-- | dom/xul/XULDocument.h | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/dom/xul/XULDocument.cpp b/dom/xul/XULDocument.cpp index ae3cdb7eb..1dcb55aee 100644 --- a/dom/xul/XULDocument.cpp +++ b/dom/xul/XULDocument.cpp @@ -1919,26 +1919,26 @@ XULDocument::StartLayout(void) /* static */ bool -XULDocument::MatchAttribute(nsIContent* aContent, +XULDocument::MatchAttribute(Element* aElement, int32_t aNamespaceID, nsIAtom* aAttrName, void* aData) { - NS_PRECONDITION(aContent, "Must have content node to work with!"); + NS_PRECONDITION(aElement, "Must have content node to work with!"); nsString* attrValue = static_cast<nsString*>(aData); if (aNamespaceID != kNameSpaceID_Unknown && aNamespaceID != kNameSpaceID_Wildcard) { return attrValue->EqualsLiteral("*") ? - aContent->HasAttr(aNamespaceID, aAttrName) : - aContent->AttrValueIs(aNamespaceID, aAttrName, *attrValue, + aElement->HasAttr(aNamespaceID, aAttrName) : + aElement->AttrValueIs(aNamespaceID, aAttrName, *attrValue, eCaseMatters); } // Qualified name match. This takes more work. - uint32_t count = aContent->GetAttrCount(); + uint32_t count = aElement->GetAttrCount(); for (uint32_t i = 0; i < count; ++i) { - const nsAttrName* name = aContent->GetAttrNameAt(i); + const nsAttrName* name = aElement->GetAttrNameAt(i); bool nameMatch; if (name->IsAtom()) { nameMatch = name->Atom() == aAttrName; @@ -1950,7 +1950,7 @@ XULDocument::MatchAttribute(nsIContent* aContent, if (nameMatch) { return attrValue->EqualsLiteral("*") || - aContent->AttrValueIs(name->NamespaceID(), name->LocalName(), + aElement->AttrValueIs(name->NamespaceID(), name->LocalName(), *attrValue, eCaseMatters); } } diff --git a/dom/xul/XULDocument.h b/dom/xul/XULDocument.h index a2f82bb89..06abb797f 100644 --- a/dom/xul/XULDocument.h +++ b/dom/xul/XULDocument.h @@ -180,7 +180,7 @@ public: NS_IMETHOD OnScriptCompileComplete(JSScript* aScript, nsresult aStatus) override; static bool - MatchAttribute(nsIContent* aContent, + MatchAttribute(Element* aContent, int32_t aNameSpaceID, nsIAtom* aAttrName, void* aData); |