[webkit-reviews] review granted: [Bug 128478] HTMLTextFormControlElement::setSelectionRange shouldn't use VisiblePosition : [Attachment 223594] Cleanup

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Feb 9 23:44:27 PST 2014


Darin Adler <darin at apple.com> has granted Ryosuke Niwa <rniwa at webkit.org>'s
request for review:
Bug 128478: HTMLTextFormControlElement::setSelectionRange shouldn't use
VisiblePosition
https://bugs.webkit.org/show_bug.cgi?id=128478

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

------- Additional Comments from Darin Adler <darin at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=223594&action=review


> Source/WebCore/html/HTMLTextFormControlElement.cpp:55
> +static Position positionForIndex(TextControlInnerTextElement*, unsigned);

I suggest taking a reference here rather than a pointer.

> Source/WebCore/html/HTMLTextFormControlElement.cpp:324
>  int HTMLTextFormControlElement::indexForVisiblePosition(const
VisiblePosition& pos) const

Why not rename pos to position while you are changing this entire function?

> Source/WebCore/html/HTMLTextFormControlElement.cpp:569
> +	       Text* text = toText(node);

This should be:

    Text& text = toText(*node);

Because we know node is non-null.


More information about the webkit-reviews mailing list