From e51968e5eb2151043fbaf6e246fc5934bfbd7e49 Mon Sep 17 00:00:00 2001 From: "sicking%bigfoot.com" Date: Wed, 20 Feb 2002 03:21:26 +0000 Subject: [PATCH] change the xbl-syntax <... inherits=".."> to <... xbl:inherits=".."> b=119317 r=jkeiser sr=hyatt git-svn-id: svn://10.0.0.236/trunk@115019 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/content/xbl/src/nsXBLPrototypeBinding.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/mozilla/content/xbl/src/nsXBLPrototypeBinding.cpp b/mozilla/content/xbl/src/nsXBLPrototypeBinding.cpp index 27a8721ec11..731c5cbb321 100644 --- a/mozilla/content/xbl/src/nsXBLPrototypeBinding.cpp +++ b/mozilla/content/xbl/src/nsXBLPrototypeBinding.cpp @@ -1174,8 +1174,14 @@ nsXBLPrototypeBinding::ShouldBuildChildFrames(PRBool* aResult) void nsXBLPrototypeBinding::ConstructAttributeTable(nsIContent* aElement) { + nsresult rv; nsAutoString inherits; - aElement->GetAttr(kNameSpaceID_None, nsXBLAtoms::inherits, inherits); + rv = aElement->GetAttr(kNameSpaceID_XBL, nsXBLAtoms::inherits, inherits); + // XXX fallback to using "inherits" in the null namespace + // We shouldn't do this once bug 119317 is fully fixed + if (rv == NS_CONTENT_ATTR_NOT_THERE) + aElement->GetAttr(kNameSpaceID_None, nsXBLAtoms::inherits, inherits); + if (!inherits.IsEmpty()) { if (!mAttributeTable) { mAttributeTable = new nsSupportsHashtable(4); @@ -1239,7 +1245,7 @@ nsXBLPrototypeBinding::ConstructAttributeTable(nsIContent* aElement) // by the template only, and we don't need it anymore. // XXXdwh Don't do this for XUL elements, since it faults them into heavyweight // elements. Should nuke from the prototype instead. - // aElement->UnsetAttr(kNameSpaceID_None, nsXBLAtoms::inherits, PR_FALSE); + // aElement->UnsetAttr(kNameSpaceID_XBL, nsXBLAtoms::inherits, PR_FALSE); token = nsCRT::strtok( newStr, ", ", &newStr ); }