summaryrefslogtreecommitdiffstats
path: root/dom/xbl/XBLChildrenElement.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dom/xbl/XBLChildrenElement.cpp')
-rw-r--r--dom/xbl/XBLChildrenElement.cpp39
1 files changed, 15 insertions, 24 deletions
diff --git a/dom/xbl/XBLChildrenElement.cpp b/dom/xbl/XBLChildrenElement.cpp
index e4058a789..f785a3058 100644
--- a/dom/xbl/XBLChildrenElement.cpp
+++ b/dom/xbl/XBLChildrenElement.cpp
@@ -7,6 +7,7 @@
#include "mozilla/dom/XBLChildrenElement.h"
#include "nsCharSeparatedTokenizer.h"
#include "mozilla/dom/NodeListBinding.h"
+#include "nsAttrValueOrString.h"
namespace mozilla {
namespace dom {
@@ -27,34 +28,24 @@ NS_INTERFACE_MAP_END_INHERITING(Element)
NS_IMPL_ELEMENT_CLONE(XBLChildrenElement)
nsresult
-XBLChildrenElement::UnsetAttr(int32_t aNameSpaceID, nsIAtom* aAttribute,
- bool aNotify)
+XBLChildrenElement::BeforeSetAttr(int32_t aNamespaceID, nsIAtom* aName,
+ const nsAttrValueOrString* aValue,
+ bool aNotify)
{
- if (aAttribute == nsGkAtoms::includes &&
- aNameSpaceID == kNameSpaceID_None) {
- mIncludes.Clear();
- }
-
- return Element::UnsetAttr(aNameSpaceID, aAttribute, aNotify);
-}
-
-bool
-XBLChildrenElement::ParseAttribute(int32_t aNamespaceID,
- nsIAtom* aAttribute,
- const nsAString& aValue,
- nsAttrValue& aResult)
-{
- if (aAttribute == nsGkAtoms::includes &&
- aNamespaceID == kNameSpaceID_None) {
- mIncludes.Clear();
- nsCharSeparatedTokenizer tok(aValue, '|',
- nsCharSeparatedTokenizer::SEPARATOR_OPTIONAL);
- while (tok.hasMoreTokens()) {
- mIncludes.AppendElement(NS_Atomize(tok.nextToken()));
+ if (aNamespaceID == kNameSpaceID_None) {
+ if (aName == nsGkAtoms::includes) {
+ mIncludes.Clear();
+ if (aValue) {
+ nsCharSeparatedTokenizer tok(aValue->String(), '|',
+ nsCharSeparatedTokenizer::SEPARATOR_OPTIONAL);
+ while (tok.hasMoreTokens()) {
+ mIncludes.AppendElement(NS_Atomize(tok.nextToken()));
+ }
+ }
}
}
- return false;
+ return nsXMLElement::BeforeSetAttr(aNamespaceID, aName, aValue, aNotify);
}
} // namespace dom