Changeset 101002 in webkit


Ignore:
Timestamp:
Nov 22, 2011 7:39:57 AM (12 years ago)
Author:
commit-queue@webkit.org
Message:

Source/WebCore: Spellcheck should be able to run asynchronously.
https://bugs.webkit.org/show_bug.cgi?id=71991

Patch by Shinya Kawanaka <shinyak@google.com> on 2011-11-22
Reviewed by Hajime Morita.

Run asynchronous spell checker if both asynchronous flag and unified text checker flag are ON.

When multiple asynchronous spellchecking are requested, only the first request will be processed.

Test: editing/spelling/spellcheck-async.html

  • editing/Editor.cpp:

(WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):

Uses asynchronous spell checker if asynchronous flag is ON.

LayoutTests: Spellcheck should be able to run asynchronously
https://bugs.webkit.org/show_bug.cgi?id=71991

Patch by Shinya Kawanaka <shinyak@google.com> on 2011-11-22
Reviewed by Hajime Morita.

Added asynchronouse spell checking tests.
Fixed tests that fails tearing down.

  • editing/spelling/script-tests/spellcheck-paste.js: Fixed tearing down.
  • editing/spelling/spellcheck-async-expected.txt: Added.
  • editing/spelling/spellcheck-async.html: Added.
  • editing/spelling/spelling-unified-emulation.html: Fixed tearing down.
Location:
trunk
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r100991 r101002  
     12011-11-22  Shinya Kawanaka  <shinyak@google.com>
     2
     3        Spellcheck should be able to run asynchronously
     4        https://bugs.webkit.org/show_bug.cgi?id=71991
     5
     6        Reviewed by Hajime Morita.
     7
     8        Added asynchronouse spell checking tests.
     9        Fixed tests that fails tearing down.
     10
     11        * editing/spelling/script-tests/spellcheck-paste.js: Fixed tearing down.
     12        * editing/spelling/spellcheck-async-expected.txt: Added.
     13        * editing/spelling/spellcheck-async.html: Added.
     14        * editing/spelling/spelling-unified-emulation.html: Fixed tearing down.
     15
    1162011-11-22  Vsevolod Vlasov  <vsevik@chromium.org>
    217
  • trunk/LayoutTests/editing/spelling/script-tests/spellcheck-paste.js

    r100887 r101002  
    4040        return window.setTimeout(next, 0);
    4141    testRoot.style.display = "none";
     42
     43    layoutTestController.setAsynchronousSpellCheckingEnabled(false);
    4244    layoutTestController.notifyDone();
    4345}
  • trunk/LayoutTests/editing/spelling/spelling-unified-emulation.html

    r100050 r101002  
    8585}
    8686
     87if (window.internals)
     88    internals.setUnifiedTextCheckingEnabled(document, false);
     89
    8790var successfullyParsed = true;
    8891</script>
  • trunk/Source/WebCore/ChangeLog

    r101000 r101002  
     12011-11-22  Shinya Kawanaka  <shinyak@google.com>
     2
     3        Spellcheck should be able to run asynchronously.
     4        https://bugs.webkit.org/show_bug.cgi?id=71991
     5
     6        Reviewed by Hajime Morita.
     7
     8        Run asynchronous spell checker if both asynchronous flag and unified text checker flag are ON.
     9
     10        When multiple asynchronous spellchecking are requested, only the first request will be processed.
     11
     12        Test: editing/spelling/spellcheck-async.html
     13
     14        * editing/Editor.cpp:
     15        (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
     16          Uses asynchronous spell checker if asynchronous flag is ON.
     17
    1182011-11-22  Alexander Pavlov  <apavlov@chromium.org>
    219
  • trunk/Source/WebCore/editing/Editor.cpp

    r100890 r101002  
    20432043    }
    20442044
     2045
     2046    bool asynchronous = m_frame && m_frame->settings() && m_frame->settings()->asynchronousSpellCheckingEnabled() && !shouldShowCorrectionPanel;
     2047    if (asynchronous) {
     2048        if (shouldMarkGrammar)
     2049            m_spellChecker->requestCheckingFor(resolveTextCheckingTypeMask(textCheckingOptions), grammarParagraph.paragraphRange());
     2050        else
     2051            m_spellChecker->requestCheckingFor(resolveTextCheckingTypeMask(textCheckingOptions), spellingParagraph.paragraphRange());
     2052        return;
     2053    }
     2054
    20452055    Vector<TextCheckingResult> results;
    20462056    if (shouldMarkGrammar)
Note: See TracChangeset for help on using the changeset viewer.