Closed
Bug 895974
Opened 11 years ago
Closed 11 years ago
document.firstElementChild is not defined
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla25
People
(Reporter: erik, Assigned: bzbarsky)
References
Details
(Keywords: dev-doc-complete)
Attachments
(2 files, 1 obsolete file)
21.07 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
2.88 KB,
patch
|
Details | Diff | Splinter Review |
http://dom.spec.whatwg.org/#interface-parentnode
Document should implement the ParentNode interface
Assignee | ||
Comment 1•11 years ago
|
||
Yeah, might as well.
Assignee: nobody → bzbarsky
Whiteboard: [need review]
Assignee | ||
Comment 2•11 years ago
|
||
Attachment #778785 -
Flags: review?(bugs)
Comment 3•11 years ago
|
||
Comment on attachment 778785 [details] [diff] [review]
Implement ParentNode on document fragments and documents and move previousElementSibling and nextElementSibling to ChildNode.
Could you test also .children, and the patch is missing ParentNode.webidl file.
Attachment #778785 -
Flags: review?(bugs) → review-
Assignee | ||
Comment 4•11 years ago
|
||
Attachment #778900 -
Flags: review?(bugs)
Assignee | ||
Updated•11 years ago
|
Attachment #778785 -
Attachment is obsolete: true
Assignee | ||
Comment 5•11 years ago
|
||
Comment 6•11 years ago
|
||
Comment on attachment 778900 [details] [diff] [review]
With review comments addressed
Thanks, the interdiff was good.
Attachment #778900 -
Flags: review?(bugs) → review+
Comment 7•11 years ago
|
||
Comment on attachment 778900 [details] [diff] [review]
With review comments addressed
Review of attachment 778900 [details] [diff] [review]:
-----------------------------------------------------------------
::: content/base/src/nsINode.cpp
@@ +1407,5 @@
> +Element*
> +nsINode::GetPreviousElementSibling() const
> +{
> + nsIContent* previousSibling = GetPreviousSibling();
> + while (previousSibling) {
Nit: a for loop like you have in GetFirstElementChild() seems nicer.
Assignee | ||
Comment 8•11 years ago
|
||
> Nit: a for loop like you have in GetFirstElementChild() seems nicer.
Hmm.. I guess; I just moved the code.
In any case, I pushed this before I saw the nit comment: https://hg.mozilla.org/integration/mozilla-inbound/rev/0a196c0e9f96
Assignee | ||
Updated•11 years ago
|
Flags: in-testsuite+
Whiteboard: [need review]
Target Milestone: --- → mozilla25
Comment 9•11 years ago
|
||
Either this patch or the patch from bug 895974 (pushed at the same time) was causing frequent mochitest-1 asserts on the Ubuntu32 test slaves. Backed out.
https://hg.mozilla.org/integration/mozilla-inbound/rev/3794beed0e34
https://tbpl.mozilla.org/php/getParsedLog.php?id=25574572&tree=Mozilla-Inbound
13:26:23 INFO - [Parent 2282] ###!!! ASSERTION: Clock should go forwards if the playback rate is > 0.: 'mCurrentFrameTime <= clock_time || mPlaybackRate <= 0', file ../../../content/media/MediaDecoderStateMachine.cpp, line 2435
13:26:23 INFO - mozilla::MediaDecoderStateMachine::GetClock() [content/media/MediaDecoderStateMachine.cpp:2434]
13:26:23 INFO - mozilla::MediaDecoderStateMachine::AdvanceFrame() [content/media/MediaDecoderStateMachine.cpp:2462]
13:26:23 INFO - mozilla::MediaDecoderStateMachine::RunStateMachine() [content/media/MediaDecoderStateMachine.cpp:2235]
13:26:23 INFO - mozilla::MediaDecoderStateMachine::CallRunStateMachine() [content/media/MediaDecoderStateMachine.cpp:2741]
13:26:23 INFO - mozilla::MediaDecoderStateMachine::Run() [content/media/MediaDecoderStateMachine.cpp:2715]
13:26:23 INFO - nsThread::ProcessNextEvent(bool, bool*) [xpcom/threads/nsThread.cpp:621]
13:26:23 INFO - NS_ProcessNextEvent(nsIThread*, bool) [obj-firefox/xpcom/build/nsThreadUtils.cpp:238]
13:26:23 INFO - nsThread::ThreadFunc(void*) [xpcom/threads/nsThread.cpp:249]
13:26:23 INFO - _pt_root [nsprpub/pr/src/pthreads/ptthread.c:207]
13:26:23 INFO - libpthread.so.0 + 0x6d4c
13:26:23 INFO - [Parent 2282] ###!!! ASSERTION: Should have positive clock time.: 'clock_time >= mStartTime', file ../../../content/media/MediaDecoderStateMachine.cpp, line 2462
13:26:23 INFO - mozilla::MediaDecoderStateMachine::AdvanceFrame() [content/media/MediaDecoderStateMachine.cpp:2462]
13:26:23 INFO - mozilla::MediaDecoderStateMachine::RunStateMachine() [content/media/MediaDecoderStateMachine.cpp:2235]
13:26:23 INFO - mozilla::MediaDecoderStateMachine::CallRunStateMachine() [content/media/MediaDecoderStateMachine.cpp:2741]
13:26:23 INFO - mozilla::MediaDecoderStateMachine::Run() [content/media/MediaDecoderStateMachine.cpp:2715]
13:26:23 INFO - nsThread::ProcessNextEvent(bool, bool*) [xpcom/threads/nsThread.cpp:621]
13:26:23 INFO - NS_ProcessNextEvent(nsIThread*, bool) [obj-firefox/xpcom/build/nsThreadUtils.cpp:238]
13:26:23 INFO - nsThread::ThreadFunc(void*) [xpcom/threads/nsThread.cpp:249]
13:26:23 INFO - _pt_root [nsprpub/pr/src/pthreads/ptthread.c:207]
13:26:23 INFO - libpthread.so.0 + 0x6d4c
Assignee | ||
Comment 10•11 years ago
|
||
This patch was the one that triggered those assertions, but they're due to bugs in the test. Annotated the test, and relanded: https://hg.mozilla.org/integration/mozilla-inbound/rev/5b59f2f35bb3
Comment 11•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Updated•11 years ago
|
Keywords: dev-doc-needed
Comment 12•11 years ago
|
||
I updated the documentation:
https://developer.mozilla.org/en-US/docs/Web/API/ParentNode
https://developer.mozilla.org/en-US/docs/Web/API/ParentNode.children
https://developer.mozilla.org/en-US/docs/Web/API/ParentNode.firstElementChild
https://developer.mozilla.org/en-US/docs/Web/API/ParentNode.lastElementChild
https://developer.mozilla.org/en-US/docs/Web/API/ParentNode.childElementCount
https://developer.mozilla.org/en-US/docs/Web/API/ChildNode
https://developer.mozilla.org/en-US/docs/Web/API/ChildNode.previousElementSibling
https://developer.mozilla.org/en-US/docs/Web/API/ChildNode.nextElementSibling
https://developer.mozilla.org/en-US/docs/Web/API/Element
https://developer.mozilla.org/en-US/docs/Web/API/DocumentFragment
https://developer.mozilla.org/en-US/docs/Web/API/Document
https://developer.mozilla.org/en-US/docs/Web/API/CharacterData
https://developer.mozilla.org/en-US/docs/Web/API/DocumentType
and
https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/25
Updated•11 years ago
|
Keywords: dev-doc-needed → dev-doc-complete
You need to log in
before you can comment on or make changes to this bug.
Description
•