[Webkit-unassigned] [Bug 108513] [Chromium] Replace correct misspelled range

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Feb 11 09:56:40 PST 2013


https://bugs.webkit.org/show_bug.cgi?id=108513


Tony Chang <tony at chromium.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #187380|review?, commit-queue?      |review+, commit-queue-
               Flag|                            |




--- Comment #26 from Tony Chang <tony at chromium.org>  2013-02-11 09:58:53 PST ---
(From update of attachment 187380)
View in context: https://bugs.webkit.org/attachment.cgi?id=187380&action=review

> Source/WebKit/chromium/tests/WebFrameTest.cpp:2204
> +    virtual void requestCheckingOfText(const WebKit::WebString&, WebKit::WebTextCheckingCompletion* completion)

OVERRIDE

> Source/WebKit/chromium/tests/WebFrameTest.cpp:2206
> +        m_numberOfTimesChecked++;

Nit: ++m_numberOfTimesChecked

> Source/WebKit/chromium/tests/WebFrameTest.cpp:2208
> +        results.append(WebTextCheckingResult(WebTextCheckingTypeSpelling, 1, 8, WebString()));

Nit: Can we make local variables for 1 and 8 to make it more clear what the parameters are?

> Source/WebKit/chromium/tests/WebFrameTest.cpp:2226
> +    // Setup environment.

I would remove all of these comments.  They aren't "why?" comments.

> Source/WebKit/chromium/tests/WebFrameTest.cpp:2236
> +    // Select the text "_wellcome_."
> +    frame->selectRange(WebRange::fromDocumentRange(frame, 0, 11));

For example, if you made local variables like:
  int wellcomeStartOffset = 0;
  int wellcomeEndOffset = 11;
I don't think you need the comment.

> Source/WebKit/chromium/tests/WebFrameTest.cpp:2241
> +    // Wait for spellcheck.
> +    for (int i = 0; i < 10 && document->markers()->markersInRange(selectionRange.get(), DocumentMarker::Spelling).isEmpty(); ++i)
> +        webkit_support::RunAllPendingMessages();

Why 10 times?  Would it be sufficient to use "while (document->markers()->markersInRange(selectionRange.get(), DocumentMarker::Spelling).isEmpty())"?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list