[webkit-reviews] review denied: [Bug 86707] document.activeElement should not return an element not in the document tree : [Attachment 149258] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jun 25 20:35:40 PDT 2012


Hajime Morrita <morrita at google.com> has denied Arpita Bahuguna
<arpitabahuguna at gmail.com>'s request for review:
Bug 86707: document.activeElement should not return an element not in the
document tree
https://bugs.webkit.org/show_bug.cgi?id=86707

Attachment 149258: Patch
https://bugs.webkit.org/attachment.cgi?id=149258&action=review

------- Additional Comments from Hajime Morrita <morrita at google.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=149258&action=review


Hi, thanks for the patch.
The change basically looks good. I added some comments about style and small
caveats.

> Source/WebCore/dom/Document.cpp:3769
> +    if (newFocusedNode && newFocusedNode->attached()) {

Using Node::inDocument() would be preferred in this case. attached() has
slightly different semantics.

> LayoutTests/ChangeLog:6
> +	   Reviewed by NOBODY (OOPS!).

Text test instead of ref test would be preferable in this case
because the expectation file can be less cryptic.
See "Writing JavaScript-based DOM-only Test Cases" section in
http://trac.webkit.org/wiki/Writing%20Layout%20Tests%20for%20DumpRenderTree
Also, this test better fit under dom/HTMLDocument/ because the test is about
activeElement.
Putting stuff directly under fast/dom is good to avoid if possible.


More information about the webkit-reviews mailing list