Closed
Bug 270640
Opened 20 years ago
Closed 20 years ago
Implement DOM 3 isDefaultNamespace()
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: smaug, Unassigned)
References
()
Details
Attachments
(1 file, 1 obsolete file)
2.95 KB,
patch
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a4) Gecko/20040927 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a4) Gecko/20040927 Summary says all. http://lxr.mozilla.org/seamonkey/source/content/base/src/nsGenericElement.cpp#489 Reproducible: Always Steps to Reproduce: 1. 2. 3.
Reporter | ||
Comment 1•20 years ago
|
||
+also for other Nodes, not only for Element.
Reporter | ||
Comment 2•20 years ago
|
||
Reporter | ||
Updated•20 years ago
|
Attachment #166370 -
Flags: superreview?(jst)
Attachment #166370 -
Flags: review?(jst)
Comment 3•20 years ago
|
||
Comment on attachment 166370 [details] [diff] [review] For Elements, Attributes, Documents and DocumentFragments nsNode3Tearoff::IsDefaultNamespace(const nsAString& aNamespaceURI, PRBool* aReturn) { - NS_NOTYETIMPLEMENTED("nsNode3Tearoff::IsDefaultNamespace()"); - - return NS_ERROR_NOT_IMPLEMENTED; + *aReturn = PR_FALSE; + nsAutoString defaultNamespace; + LookupNamespaceURI(EmptyString(), defaultNamespace); + if (aNamespaceURI.Equals(defaultNamespace)) + *aReturn = PR_TRUE; + return NS_OK; You can eliminate that if check and the initalization of *aReturn to PR_FALSE there if you write this as: + nsAutoString defaultNamespace; + LookupNamespaceURI(EmptyString(), defaultNamespace); + *aReturn = aNamespaceURI.Equals(defaultNamespace); + return NS_OK; r+sr=jst with that change.
Attachment #166370 -
Flags: superreview?(jst)
Attachment #166370 -
Flags: superreview+
Attachment #166370 -
Flags: review?(jst)
Attachment #166370 -
Flags: review+
Reporter | ||
Comment 4•20 years ago
|
||
If someone can check this in when the tree is open again.
Attachment #166370 -
Attachment is obsolete: true
Comment 5•20 years ago
|
||
patch checked in
Reporter | ||
Updated•20 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Comment 6•20 years ago
|
||
Tp on btek regressed ever so slightly after this was checked in. But, I don't see anything obvious in this patch that could explain that :-/
You need to log in
before you can comment on or make changes to this bug.
Description
•