[webkit-reviews] review denied: [Bug 92640] Slider should snap to datalist tick marks : [Attachment 155490] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Jul 31 07:17:27 PDT 2012
Kent Tamura <tkent at chromium.org> has denied Keishi Hattori
<keishi at webkit.org>'s request for review:
Bug 92640: Slider should snap to datalist tick marks
https://bugs.webkit.org/show_bug.cgi?id=92640
Attachment 155490: Patch
https://bugs.webkit.org/attachment.cgi?id=155490&action=review
------- Additional Comments from Kent Tamura <tkent at chromium.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=155490&action=review
> Source/WebCore/html/shadow/SliderThumbElement.cpp:277
> +#if ENABLE(DATALIST_ELEMENT)
We should have a new function for this code.
> Source/WebCore/html/shadow/SliderThumbElement.cpp:283
> + for (unsigned i = 0; Node* node = options->item(i); i++) {
Please follow an idiom; for (unsigned i = 0; i < options->length(); ++i) {
Your current code disturbs code readers.
BTW, this code is called whenever mousemove is dispatched during the thumb
dragging, and this code is O(N). We should improve the complexity.
> Source/WebCore/html/shadow/SliderThumbElement.cpp:285
> + ASSERT(node->hasTagName(optionTag));
> + HTMLOptionElement* optionElement =
static_cast<HTMLOptionElement*>(node);
We have toHTMLOptionElement().
> Source/WebCore/html/shadow/SliderThumbElement.cpp:306
> +&& closest.isFinite() && !closest.isNaN())
wrong indentation
More information about the webkit-reviews
mailing list