Backing out bug 275196, xml:id, to fix tp regression
git-svn-id: svn://10.0.0.236/trunk@231054 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1493,21 +1493,9 @@ nsGenericHTMLElement::GetClasses() const
|
||||
}
|
||||
|
||||
nsIAtom *
|
||||
nsGenericHTMLElement::GetIDAttributeName(PRInt32& aNameSpaceID) const
|
||||
nsGenericHTMLElement::GetIDAttributeName() const
|
||||
{
|
||||
if (HasAttr(kNameSpaceID_None, nsGkAtoms::id)) {
|
||||
aNameSpaceID = kNameSpaceID_None;
|
||||
return nsGkAtoms::id;
|
||||
}
|
||||
return nsGenericElement::GetIDAttributeName(aNameSpaceID);
|
||||
}
|
||||
|
||||
PRBool
|
||||
nsGenericHTMLElement::IsPotentialIDAttributeName(PRInt32 aNameSpaceID,
|
||||
nsIAtom* aAtom) const
|
||||
{
|
||||
return (aNameSpaceID == kNameSpaceID_None && aAtom == nsGkAtoms::id) ||
|
||||
nsGenericElement::IsPotentialIDAttributeName(aNameSpaceID, aAtom);
|
||||
return nsGkAtoms::id;
|
||||
}
|
||||
|
||||
nsIAtom *
|
||||
|
||||
@@ -241,9 +241,7 @@ public:
|
||||
virtual void UpdateEditableState();
|
||||
|
||||
virtual const nsAttrValue* GetClasses() const;
|
||||
virtual nsIAtom *GetIDAttributeName(PRInt32& aNameSpaceID) const;
|
||||
virtual PRBool IsPotentialIDAttributeName(PRInt32 aNameSpaceID,
|
||||
nsIAtom* aAtom) const;
|
||||
virtual nsIAtom *GetIDAttributeName() const;
|
||||
virtual nsIAtom *GetClassAttributeName() const;
|
||||
NS_IMETHOD WalkContentStyleRules(nsRuleWalker* aRuleWalker);
|
||||
virtual nsICSSStyleRule* GetInlineStyleRule();
|
||||
|
||||
@@ -1376,7 +1376,8 @@ nsHTMLDocument::AttributeWillChange(nsIContent* aContent, PRInt32 aNameSpaceID,
|
||||
return;
|
||||
}
|
||||
}
|
||||
} else if (aContent->IsPotentialIDAttributeName(aNameSpaceID, aAttribute)) {
|
||||
} else if (aAttribute == aContent->GetIDAttributeName() &&
|
||||
aNameSpaceID == kNameSpaceID_None) {
|
||||
nsresult rv = RemoveFromIdTable(aContent);
|
||||
|
||||
if (NS_FAILED(rv)) {
|
||||
@@ -1405,7 +1406,8 @@ nsHTMLDocument::AttributeChanged(nsIDocument* aDocument,
|
||||
if (name) {
|
||||
UpdateNameTableEntry(name, aContent);
|
||||
}
|
||||
} else if (aContent->IsPotentialIDAttributeName(aNameSpaceID, aAttribute)) {
|
||||
} else if (aAttribute == aContent->GetIDAttributeName() &&
|
||||
aNameSpaceID == kNameSpaceID_None) {
|
||||
nsIAtom* id = aContent->GetID();
|
||||
if (id) {
|
||||
UpdateIdTableEntry(id, aContent);
|
||||
|
||||
Reference in New Issue
Block a user