[webkit-reviews] review denied: [Bug 49509] document.activeElement doesn't point to the focused frame : [Attachment 93708] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon May 16 16:50:32 PDT 2011
Ryosuke Niwa <rniwa at webkit.org> has denied Erik Arvidsson <arv at chromium.org>'s
request for review:
Bug 49509: document.activeElement doesn't point to the focused frame
https://bugs.webkit.org/show_bug.cgi?id=49509
Attachment 93708: Patch
https://bugs.webkit.org/attachment.cgi?id=93708&action=review
------- Additional Comments from Ryosuke Niwa <rniwa at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=93708&action=review
Looks sane to me but please fix nits.
> LayoutTests/fast/dom/HTMLDocument/active-element-frames-expected.txt:9
> +PASS: doc0.activeElement is input0
> +PASS: doc1.activeElement is body1
> +PASS: doc2.activeElement is body2
> +PASS: doc3.activeElement is body3
> +PASS: doc4.activeElement is body4
All these outputs make little sense unless you know the test code. Could you
show the structure of the document used in this test?
> LayoutTests/fast/dom/HTMLDocument/active-element-frames-expected.txt:11
> +Focusing input1
This output isn't useful. What does input1 mean? You should explain that this
is an input element inside a document.
> Source/WebCore/html/HTMLDocument.cpp:144
> + } else {
I would have added an early exit above the else to avoid adding the else
clause.
> Source/WebCore/html/HTMLDocument.cpp:146
> + Page* page = this->page();
> + if (page) {
You should either declare page inside the if's condition or early exit when
!page.
> Source/WebCore/html/HTMLDocument.cpp:147
> + for (Frame* f = page->focusController()->focusedFrame(); f; f =
f->tree()->parent()) {
Please do not use one letter variable.
More information about the webkit-reviews
mailing list