Changeset 141429 in webkit


Ignore:
Timestamp:
Jan 31, 2013 9:59:22 AM (11 years ago)
Author:
g.czajkowski@samsung.com
Message:

On Linux, can't get spelling suggestions without selection when unified text checker is enabled
https://bugs.webkit.org/show_bug.cgi?id=107684

Reviewed by Ryosuke Niwa.

No new tests, covered by context-menu-suggestions.html.

  • editing/Editor.cpp:

(WebCore::Editor::guessesForMisspelledOrUngrammatical):
For Linux, extend selection range to the closest word to get
the spelling suggestions when unified text checker is enabled.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r141427 r141429  
     12013-01-31  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
     2
     3        On Linux, can't get spelling suggestions without selection when unified text checker is enabled
     4        https://bugs.webkit.org/show_bug.cgi?id=107684
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        No new tests, covered by context-menu-suggestions.html.
     9
     10        * editing/Editor.cpp:
     11        (WebCore::Editor::guessesForMisspelledOrUngrammatical):
     12        For Linux, extend selection range to the closest word to get
     13        the spelling suggestions when unified text checker is enabled.
     14
    1152013-01-31  Florin Malita  <fmalita@chromium.org>
    216
  • trunk/Source/WebCore/editing/Editor.cpp

    r141225 r141429  
    17771777{
    17781778    if (unifiedTextCheckerEnabled()) {
    1779         RefPtr<Range> range = frame()->selection()->toNormalizedRange();
     1779        RefPtr<Range> range;
     1780        FrameSelection* frameSelection = frame()->selection();
     1781        if (frameSelection->isCaret() && behavior().shouldAllowSpellingSuggestionsWithoutSelection()) {
     1782            VisibleSelection wordSelection = VisibleSelection(frameSelection->base());
     1783            wordSelection.expandUsingGranularity(WordGranularity);
     1784            range = wordSelection.toNormalizedRange();
     1785        } else
     1786            range = frameSelection->toNormalizedRange();
    17801787        if (!range)
    17811788            return Vector<String>();
Note: See TracChangeset for help on using the changeset viewer.