[webkit-reviews] review granted: [Bug 108513] [Chromium] Replace correct misspelled range : [Attachment 187380] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Feb 11 09:56:39 PST 2013
Tony Chang <tony at chromium.org> has granted Rouslan Solomakhin
<rouslan+webkit at chromium.org>'s request for review:
Bug 108513: [Chromium] Replace correct misspelled range
https://bugs.webkit.org/show_bug.cgi?id=108513
Attachment 187380: Patch
https://bugs.webkit.org/attachment.cgi?id=187380&action=review
------- Additional Comments from Tony Chang <tony at chromium.org>
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())"?
More information about the webkit-reviews
mailing list