зеркало из https://github.com/mozilla/gecko-dev.git
Use IsHtml(foo) instead of NodeInfo()->Equals(foo). Bug 828166, r=peterv
This commit is contained in:
Родитель
9293f672ad
Коммит
b99e3d5e1c
|
@ -339,7 +339,7 @@ public:
|
|||
// false
|
||||
inline bool HasDirAuto() const {
|
||||
return (!HasFixedDir() &&
|
||||
(HasValidDir() || NodeInfo()->Equals(nsGkAtoms::bdi)));
|
||||
(HasValidDir() || IsHTML(nsGkAtoms::bdi)));
|
||||
}
|
||||
|
||||
protected:
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче