Changeset 54119 in webkit


Ignore:
Timestamp:
Jan 31, 2010 5:43:29 PM (14 years ago)
Author:
tkent@chromium.org
Message:

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().
Location:
trunk/WebKit/chromium
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/chromium/ChangeLog

    r54085 r54119  
     12010-01-31  Kent Tamura  <tkent@chromium.org>
     2
     3        Reviewed by Jeremy Orlow.
     4
     5        [Chromium] Fix a bug that a selected word is not recognized as a
     6        spell-check source.
     7        https://bugs.webkit.org/show_bug.cgi?id=33660
     8
     9        * src/ContextMenuClientImpl.cpp:
     10        (WebKit::isASingleWord): Use wordBreakIterator(), and correctly check
     11        the return value of textBreakNext().
     12
    1132010-01-29  Jeremy Orlow  <jorlow@chromium.org>
    214
  • trunk/WebKit/chromium/src/ContextMenuClientImpl.cpp

    r51874 r54119  
    8080}
    8181
    82 // Helper function to determine whether text is a single word or a sentence.
     82// Helper function to determine whether text is a single word.
    8383static bool isASingleWord(const String& text)
    8484{
    85     TextBreakIterator* it = characterBreakIterator(text.characters(), text.length());
    86     return it && textBreakNext(it) == TextBreakDone;
     85    TextBreakIterator* it = wordBreakIterator(text.characters(), text.length());
     86    return it && textBreakNext(it) == static_cast<int>(text.length());
    8787}
    8888
Note: See TracChangeset for help on using the changeset viewer.