Use IsHtml(foo) instead of NodeInfo()->Equals(foo). Bug 828166, r=peterv

This commit is contained in:
Simon Montagu 2013-01-13 08:08:59 -08:00
parent bae5f7b024
commit f132bdba21
3 changed files with 5 additions and 5 deletions

View File

@ -339,7 +339,7 @@ public:
// false
inline bool HasDirAuto() const {
return (!HasFixedDir() &&
(HasValidDir() || NodeInfo()->Equals(nsGkAtoms::bdi)));
(HasValidDir() || IsHTML(nsGkAtoms::bdi)));
}
protected:

View File

@ -250,7 +250,7 @@ static bool
DoesNotAffectDirectionOfAncestors(const Element* aElement)
{
return (DoesNotParticipateInAutoDirection(aElement) ||
aElement->NodeInfo()->Equals(nsGkAtoms::bdi) ||
aElement->IsHTML(nsGkAtoms::bdi) ||
aElement->HasFixedDir());
}
@ -870,7 +870,7 @@ void
OnSetDirAttr(Element* aElement, const nsAttrValue* aNewValue,
bool hadValidDir, bool aNotify)
{
if (aElement->IsHTML() && aElement->NodeInfo()->Equals(nsGkAtoms::input)) {
if (aElement->IsHTML(nsGkAtoms::input)) {
return;
}

View File

@ -1838,7 +1838,7 @@ Element::SetAttrAndNotify(int32_t aNamespaceID,
if (aNamespaceID == kNameSpaceID_None) {
if (aName == nsGkAtoms::dir) {
hadValidDir = HasValidDir() || NodeInfo()->Equals(nsGkAtoms::bdi);
hadValidDir = HasValidDir() || IsHTML(nsGkAtoms::bdi);
}
// XXXbz Perhaps we should push up the attribute mapping function
@ -2085,7 +2085,7 @@ Element::UnsetAttr(int32_t aNameSpaceID, nsIAtom* aName,
bool hadValidDir = false;
if (aNameSpaceID == kNameSpaceID_None && aName == nsGkAtoms::dir) {
hadValidDir = HasValidDir() || NodeInfo()->Equals(nsGkAtoms::bdi);
hadValidDir = HasValidDir() || IsHTML(nsGkAtoms::bdi);
}
nsAttrValue oldValue;