From ea44e60b7ed5f674b6de65fad669ac43a45438cc Mon Sep 17 00:00:00 2001 From: janekptacijarabaci Date: Fri, 18 Aug 2017 13:39:37 +0200 Subject: HTML - implement the labels attribute (follow up) --- dom/xul/XULDocument.cpp | 14 +++++++------- dom/xul/XULDocument.h | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'dom/xul') diff --git a/dom/xul/XULDocument.cpp b/dom/xul/XULDocument.cpp index ae3cdb7eb9..1dcb55aee4 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(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 a2f82bb896..06abb797f0 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); -- cgit v1.2.3