Closed
Bug 801404
Opened 12 years ago
Closed 12 years ago
DocumentType.textContent needs to be null, not ""
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: ayg, Assigned: ayg)
References
Details
Attachments
(1 file)
1.05 KB,
patch
|
bzbarsky
:
review-
|
Details | Diff | Splinter Review |
data:text/html,<!DOCTYPE html>
<script>
document.documentElement.textContent =
typeof document.doctype.textContent + " " +
document.doctype.textContent;
</script>
Should be "object null" per spec and all other browsers. Is actually "string ". I stared at the code for a while and didn't figure out what the problem was, until Ms2ger helpfully pointed out that nsGenericDOMDataNode::GetTextContent's call to GetValue() actually called a non-virtual method of nsGenericDOMDataNode by that name, not the virtual method that was overridden in derived classes. I don't suppose we can get the compiler to emit warnings when a non-virtual method is defined with the same name as a method in a base or derived class, by any chance?
This will be tested by <http://w3c-test.org/webapps/DOMCore/tests/approved/Node-properties.html> as soon as I update it upstream and it gets synced back down to us, so marking in-testsuite+.
Flags: in-testsuite+
Assignee | ||
Comment 1•12 years ago
|
||
This is quite unlikely to break any tests, but I figured a one-platform run would be reasonable anyway: https://tbpl.mozilla.org/?tree=Try&rev=0e5a32245865
Attachment #671209 -
Flags: review?(bzbarsky)
![]() |
||
Comment 2•12 years ago
|
||
Comment on attachment 671209 [details] [diff] [review]
Patch
This conflicts with the patch in bug 773780. Please coordinate with Peter what order we want to do this in? Personally, I'd prefer people stop bitrotting his patch so he can land it... ;)
Assignee | ||
Comment 3•12 years ago
|
||
This patch is trivial and not very important, so if he's actively working on his patch, he can go ahead and land first. It's not exactly much effort for me to rewrite this from scratch if need be.
![]() |
||
Comment 4•12 years ago
|
||
Comment on attachment 671209 [details] [diff] [review]
Patch
Please do this on top of Peter's patch.
Attachment #671209 -
Flags: review?(bzbarsky) → review-
Assignee | ||
Comment 5•12 years ago
|
||
Test now passes -- someone fixed this at some point.
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → WORKSFORME
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•