Commit b9c4b68e authored by tkent@chromium.org's avatar tkent@chromium.org

2010-01-31 Kent Tamura <tkent@chromium.org>

        Reviewed by Jeremy Orlow.

        [Chromium] Fix a bug that a selected word is not recognized as a
        spell-check source.
        https://bugs.webkit.org/show_bug.cgi?id=33660

        * src/ContextMenuClientImpl.cpp:
        (WebKit::isASingleWord): Use wordBreakIterator(), and correctly check
        the return value of textBreakNext().

git-svn-id: svn://svn.chromium.org/blink/trunk@54119 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 63d65aca
2010-01-31 Kent Tamura <tkent@chromium.org>
Reviewed by Jeremy Orlow.
[Chromium] Fix a bug that a selected word is not recognized as a
spell-check source.
https://bugs.webkit.org/show_bug.cgi?id=33660
* src/ContextMenuClientImpl.cpp:
(WebKit::isASingleWord): Use wordBreakIterator(), and correctly check
the return value of textBreakNext().
2010-01-29 Jeremy Orlow <jorlow@chromium.org> 2010-01-29 Jeremy Orlow <jorlow@chromium.org>
Reviewed by Dimitri Glazkov. Reviewed by Dimitri Glazkov.
......
...@@ -79,11 +79,11 @@ static WebURL urlFromFrame(Frame* frame) ...@@ -79,11 +79,11 @@ static WebURL urlFromFrame(Frame* frame)
return WebURL(); return WebURL();
} }
// Helper function to determine whether text is a single word or a sentence. // Helper function to determine whether text is a single word.
static bool isASingleWord(const String& text) static bool isASingleWord(const String& text)
{ {
TextBreakIterator* it = characterBreakIterator(text.characters(), text.length()); TextBreakIterator* it = wordBreakIterator(text.characters(), text.length());
return it && textBreakNext(it) == TextBreakDone; return it && textBreakNext(it) == static_cast<int>(text.length());
} }
// Helper function to get misspelled word on which context menu // Helper function to get misspelled word on which context menu
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment