Changeset 144752 in webkit


Ignore:
Timestamp:
Mar 5, 2013 5:29:37 AM (11 years ago)
Author:
g.czajkowski@samsung.com
Message:

[WK2] WTR needs an implementation of setAsynchronousSpellCheckingEnabled
https://bugs.webkit.org/show_bug.cgi?id=81042

Reviewed by Enrica Casucci.

Source/WebKit2:

Expose WK2 setting to enable/disabled asynchronous spell checking.
It's used by WebKitTestRunner to reset the setting at the beginning
of the test.
WebKit2 ports might be interested in this setting if they are going
to enable this feature.

  • Shared/WebPreferencesStore.h:
  • UIProcess/API/C/WKPreferences.cpp:

(WKPreferencesSetAsynchronousSpellCheckingEnabled):
(WKPreferencesGetAsynchronousSpellCheckingEnabled):

  • UIProcess/API/C/WKPreferences.h:
  • WebProcess/InjectedBundle/API/c/WKBundle.cpp:

(WKBundleSetAsynchronousSpellCheckingEnabled):

  • WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
  • WebProcess/InjectedBundle/InjectedBundle.cpp:

(WebKit::InjectedBundle::setAsynchronousSpellCheckingEnabled):

  • WebProcess/InjectedBundle/InjectedBundle.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences):

Tools:

Add setAsynchronousSpellCheckingEnabled implementation for
WebKitTestRunner to have the possibility to test asynchronous
spell checking implementation from bug 109577.

  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::setAsynchronousSpellCheckingEnabled):

  • WebKitTestRunner/InjectedBundle/TestRunner.h:
  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::resetStateToConsistentValues):

LayoutTests:

Gardening of the asynchronous spell checking tests.

  • platform/efl-wk2/TestExpectations:
  • platform/efl/TestExpectations:

Some tests need to be skipped as they require features not
implemented for EFL yet (pasteboard, grammar checking, text replacement).

  • platform/gtk-wk2/TestExpectations:
  • platform/mac-wk2/TestExpectations:
  • platform/qt-5.0-wk2/TestExpectations:

Skip asynchronous spell checking for GTK+, Mac, Qt unless
they implement TextChecker::requestCheckingOfText.

  • platform/wk2/TestExpectations:

Remove asynchronous spell checking tests from global wk2's
as they are passing for EFL.

Location:
trunk
Files:
21 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r144748 r144752  
     12013-03-05  Tim Horton  <timothy_horton@apple.com>, Grzegorz Czajkowski  <g.czajkowski@samsung.com>
     2
     3        [WK2] WTR needs an implementation of setAsynchronousSpellCheckingEnabled
     4        https://bugs.webkit.org/show_bug.cgi?id=81042
     5
     6        Reviewed by Enrica Casucci.
     7
     8        Gardening of the asynchronous spell checking tests.
     9
     10        * platform/efl-wk2/TestExpectations:
     11        * platform/efl/TestExpectations:
     12        Some tests need to be skipped as they require features not
     13        implemented for EFL yet (pasteboard, grammar checking, text replacement).
     14
     15        * platform/gtk-wk2/TestExpectations:
     16        * platform/mac-wk2/TestExpectations:
     17        * platform/qt-5.0-wk2/TestExpectations:
     18        Skip asynchronous spell checking for GTK+, Mac, Qt unless
     19        they implement TextChecker::requestCheckingOfText.
     20
     21        * platform/wk2/TestExpectations:
     22        Remove asynchronous spell checking tests from global wk2's
     23        as they are passing for EFL.
     24
    1252013-03-05  Tommy Widenflycht  <tommyw@google.com>
    226
  • trunk/LayoutTests/platform/efl-wk2/TestExpectations

    r144639 r144752  
    326326# Needs grammar checking
    327327Bug(EFL) editing/spelling/grammar-edit-word.html [ Failure ]
     328Bug(EFL) editing/spelling/grammar-markers.html [ Failure ]
     329Bug(EFL) editing/spelling/grammar-markers-hidpi.html [ Failure ]
     330Bug(EFL) editing/spelling/grammar-paste.html [ Failure ]
    328331Bug(EFL) editing/spelling/markers.html [ Failure ]
     332
     333# EFL's text checker doesn't support the text replacement feature.
     334Bug(EFL) editing/spelling/spelling-marker-description.html [ Failure ]
    329335
    330336# Fails because MutationObservers are not notified at end-of-task.
  • trunk/LayoutTests/platform/efl/TestExpectations

    r144737 r144752  
    10221022webkit.org/b/84338 editing/pasteboard/style-from-rules.html [ Failure ]
    10231023webkit.org/b/84338 editing/pasteboard/testcase-9507.html [ Failure ]
     1024webkit.org/b/84338 editing/spelling/spellcheck-async-mutation.html [ Failure ]
     1025webkit.org/b/84338 editing/spelling/spellcheck-queue.html [ Failure ]
     1026webkit.org/b/84338 editing/spelling/spellcheck-paste-disabled.html [ Failure ]
     1027webkit.org/b/84338 editing/spelling/spellcheck-paste.html [ Failure ]
    10241028webkit.org/b/84338 editing/style/apply-through-end-of-document.html [ Failure ]
    10251029webkit.org/b/84338 editing/style/non-inheritable-styles.html [ Failure ]
     
    14141418webkit.org/b/89830 fast/text/hyphenate-locale.html [ Skip ]
    14151419
    1416 # EFL's LayoutTestController does not implement setAsynchronousSpellCheckingEnabled
    1417 webkit.org/b/86637 editing/spelling/spellcheck-async.html [ Failure ]
    1418 webkit.org/b/86637 editing/spelling/spellcheck-async-mutation.html [ Failure ]
    1419 webkit.org/b/86637 editing/spelling/spellcheck-paste.html [ Failure ]
    1420 webkit.org/b/86637 editing/spelling/spellcheck-paste-disabled.html [ Failure ]
    1421 webkit.org/b/86637 editing/spelling/spellcheck-queue.html [ Failure ]
    1422 webkit.org/b/86637 editing/spelling/spellcheck-sequencenum.html [ Failure ]
    1423 webkit.org/b/86637 editing/spelling/spelling-marker-description.html [ Failure ]
    1424 
    14251420# Missing test infrastructure, no gamepads available.
    14261421Bug(EFL) gamepad/gamepad-polling-access.html [ Failure ]
  • trunk/LayoutTests/platform/gtk-wk2/TestExpectations

    r143234 r144752  
    185185webkit.org/b/42194 fast/events/5056619.html [ Failure ]
    186186webkit.org/b/42194 http/tests/security/drag-drop-same-unique-origin.html [ Failure ]
     187
     188# Missing TextChecker::requestCheckingOfString() implementation for Gtk.
     189Bug(GTK) editing/spelling/grammar-markers.html [ Skip ]
     190Bug(GTK) editing/spelling/grammar-paste.html [ Skip ]
     191Bug(GTK) editing/spelling/grammar-markers-hidpi.html [ Skip ]
     192Bug(GTK) editing/spelling/spellcheck-async-mutation.html [ Skip ]
     193Bug(GTK) editing/spelling/spellcheck-async-remove-frame.html [ Skip ]
     194Bug(GTK) editing/spelling/spellcheck-async.html [ Skip ]
     195Bug(GTK) editing/spelling/spellcheck-queue.html [ Skip ]
     196Bug(GTK) editing/spelling/spellcheck-sequencenum.html [ Skip ]
     197Bug(GTK) editing/spelling/spelling-marker-description.html [ Skip ]
    187198
    188199#////////////////////////////////////////////////////////////////////////////////////////
  • trunk/LayoutTests/platform/mac-wk2/TestExpectations

    r144430 r144752  
    321321### START OF (2) Classified failures without bug reports (yet)
    322322
     323# Missing TextChecker::requestCheckingOfString() implementation for Mac.
     324editing/spelling/grammar-markers.html
     325editing/spelling/grammar-paste.html
     326editing/spelling/grammar-markers-hidpi.html
     327editing/spelling/spellcheck-async-mutation.html
     328editing/spelling/spellcheck-async-remove-frame.html
     329editing/spelling/spellcheck-async.html
     330editing/spelling/spellcheck-queue.html
     331editing/spelling/spellcheck-sequencenum.html
     332editing/spelling/spelling-marker-description.html
     333
    323334### END OF (2) Classified failures without bug reports (yet)
    324335########################################
  • trunk/LayoutTests/platform/qt-5.0-wk2/TestExpectations

    r144639 r144752  
    739739svg/text/select-x-list-with-tspans-1.svg
    740740svg/text/select-x-list-1.svg
     741
     742# Missing TextChecker::requestCheckingOfString() implementation for Qt.
     743editing/spelling/grammar-markers.html
     744editing/spelling/grammar-paste.html
     745editing/spelling/grammar-markers-hidpi.html
     746editing/spelling/spellcheck-async-mutation.html
     747editing/spelling/spellcheck-async-remove-frame.html
     748editing/spelling/spellcheck-async.html
     749editing/spelling/spellcheck-queue.html
     750editing/spelling/spellcheck-sequencenum.html
     751editing/spelling/spelling-marker-description.html
  • trunk/LayoutTests/platform/wk2/TestExpectations

    r144677 r144752  
    528528fast/block/lineboxcontain/block-glyphs.html
    529529fast/block/lineboxcontain/font.html
    530 
    531 # [WK2] WTR needs an implementation of setAsynchronousSpellCheckingEnabled.
    532 # https://bugs.webkit.org/show_bug.cgi?id=81042
    533 editing/spelling/grammar-markers.html
    534 editing/spelling/grammar-paste.html
    535 editing/spelling/grammar-markers-hidpi.html
    536 editing/spelling/spellcheck-async-mutation.html
    537 editing/spelling/spellcheck-async-remove-frame.html
    538 editing/spelling/spellcheck-async.html
    539 editing/spelling/spellcheck-queue.html
    540 editing/spelling/spellcheck-sequencenum.html
    541 editing/spelling/spelling-marker-description.html
    542530
    543531# WTR needs an implementation of setAutomaticLinkDetectionEnabled.
  • trunk/Source/WebKit2/ChangeLog

    r144745 r144752  
     12013-03-05  Tim Horton  <timothy_horton@apple.com>, Grzegorz Czajkowski  <g.czajkowski@samsung.com>
     2
     3        [WK2] WTR needs an implementation of setAsynchronousSpellCheckingEnabled
     4        https://bugs.webkit.org/show_bug.cgi?id=81042
     5
     6        Reviewed by Enrica Casucci.
     7
     8        Expose WK2 setting to enable/disabled asynchronous spell checking.
     9        It's used by WebKitTestRunner to reset the setting at the beginning
     10        of the test.
     11        WebKit2 ports might be interested in this setting if they are going
     12        to enable this feature.
     13
     14        * Shared/WebPreferencesStore.h:
     15        * UIProcess/API/C/WKPreferences.cpp:
     16        (WKPreferencesSetAsynchronousSpellCheckingEnabled):
     17        (WKPreferencesGetAsynchronousSpellCheckingEnabled):
     18        * UIProcess/API/C/WKPreferences.h:
     19        * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
     20        (WKBundleSetAsynchronousSpellCheckingEnabled):
     21        * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
     22        * WebProcess/InjectedBundle/InjectedBundle.cpp:
     23        (WebKit::InjectedBundle::setAsynchronousSpellCheckingEnabled):
     24        * WebProcess/InjectedBundle/InjectedBundle.h:
     25        * WebProcess/WebPage/WebPage.cpp:
     26        (WebKit::WebPage::updatePreferences):
     27
    1282013-03-03  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
    229
  • trunk/Source/WebKit2/Shared/WebPreferencesStore.h

    r144550 r144752  
    100100    macro(ShouldPrintBackgrounds, shouldPrintBackgrounds, Bool, bool, false) \
    101101    macro(FullScreenEnabled, fullScreenEnabled, Bool, bool, false) \
     102    macro(AsynchronousSpellCheckingEnabled, asynchronousSpellCheckingEnabled, Bool, bool, false) \
    102103    macro(WebSecurityEnabled, webSecurityEnabled, Bool, bool, true) \
    103104    macro(AllowUniversalAccessFromFileURLs, allowUniversalAccessFromFileURLs, Bool, bool, false) \
  • trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp

    r144550 r144752  
    659659}
    660660
     661void WKPreferencesSetAsynchronousSpellCheckingEnabled(WKPreferencesRef preferencesRef, bool enabled)
     662{
     663    toImpl(preferencesRef)->setAsynchronousSpellCheckingEnabled(enabled);
     664}
     665
     666bool WKPreferencesGetAsynchronousSpellCheckingEnabled(WKPreferencesRef preferencesRef)
     667{
     668    return toImpl(preferencesRef)->asynchronousSpellCheckingEnabled();
     669}
     670
    661671void WKPreferencesSetAVFoundationEnabled(WKPreferencesRef preferencesRef, bool enabled)
    662672{
  • trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.h

    r139899 r144752  
    233233WK_EXPORT bool WKPreferencesGetQTKitEnabled(WKPreferencesRef preferencesRef);
    234234
     235// Defaults to false
     236WK_EXPORT void WKPreferencesSetAsynchronousSpellCheckingEnabled(WKPreferencesRef preferencesRef, bool enabled);
     237WK_EXPORT bool WKPreferencesGetAsynchronousSpellCheckingEnabled(WKPreferencesRef preferencesRef);
     238
    235239#ifdef __cplusplus
    236240}
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp

    r142509 r144752  
    214214}
    215215
     216void WKBundleSetAsynchronousSpellCheckingEnabled(WKBundleRef bundleRef, WKBundlePageGroupRef pageGroupRef, bool enabled)
     217{
     218    toImpl(bundleRef)->setAsynchronousSpellCheckingEnabled(toImpl(pageGroupRef), enabled);
     219}
     220
    216221void WKBundleReportException(JSContextRef context, JSValueRef exception)
    217222{
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h

    r142509 r144752  
    6868WK_EXPORT uint64_t WKBundleGetWebNotificationID(WKBundleRef bundle, JSContextRef context, JSValueRef notification);
    6969WK_EXPORT WKDataRef WKBundleCreateWKDataFromUInt8Array(WKBundleRef bundle, JSContextRef context, JSValueRef data);
     70WK_EXPORT void WKBundleSetAsynchronousSpellCheckingEnabled(WKBundleRef bundleRef, WKBundlePageGroupRef pageGroupRef, bool enabled);
    7071
    7172// UserContent API
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp

    r144568 r144752  
    348348}
    349349
     350void InjectedBundle::setAsynchronousSpellCheckingEnabled(WebPageGroupProxy* pageGroup, bool enabled)
     351{
     352    const HashSet<Page*>& pages = PageGroup::pageGroup(pageGroup->identifier())->pages();
     353    for (HashSet<Page*>::iterator iter = pages.begin(); iter != pages.end(); ++iter)
     354        (*iter)->settings()->setAsynchronousSpellCheckingEnabled(enabled);
     355}
     356
    350357void InjectedBundle::clearAllDatabases()
    351358{
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h

    r142509 r144752  
    120120    void removeOriginAccessWhitelistEntry(const String&, const String&, const String&, bool);
    121121    void resetOriginAccessWhitelists();
     122    void setAsynchronousSpellCheckingEnabled(WebPageGroupProxy*, bool);
    122123    int numberOfPages(WebFrame*, double, double);
    123124    int pageNumberForElementById(WebFrame*, const String&, double, double);
  • trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp

    r144670 r144752  
    24022402
    24032403    settings->setLogsPageMessagesToSystemConsoleEnabled(store.getBoolValueForKey(WebPreferencesKey::logsPageMessagesToSystemConsoleEnabledKey()));
     2404    settings->setAsynchronousSpellCheckingEnabled(store.getBoolValueForKey(WebPreferencesKey::asynchronousSpellCheckingEnabledKey()));
    24042405
    24052406    settings->setSmartInsertDeleteEnabled(store.getBoolValueForKey(WebPreferencesKey::smartInsertDeleteEnabledKey()));
  • trunk/Tools/ChangeLog

    r144748 r144752  
     12013-03-05  Tim Horton  <timothy_horton@apple.com>, Grzegorz Czajkowski  <g.czajkowski@samsung.com>
     2
     3        [WK2] WTR needs an implementation of setAsynchronousSpellCheckingEnabled
     4        https://bugs.webkit.org/show_bug.cgi?id=81042
     5
     6        Reviewed by Enrica Casucci.
     7
     8        Add setAsynchronousSpellCheckingEnabled implementation for
     9        WebKitTestRunner to have the possibility to test asynchronous
     10        spell checking implementation from bug 109577.
     11
     12        * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
     13        * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
     14        (WTR::TestRunner::setAsynchronousSpellCheckingEnabled):
     15        * WebKitTestRunner/InjectedBundle/TestRunner.h:
     16        * WebKitTestRunner/TestController.cpp:
     17        (WTR::TestController::resetStateToConsistentValues):
     18
    1192013-03-05  Tommy Widenflycht  <tommyw@google.com>
    220
  • trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl

    r144547 r144752  
    7272    void dispatchPendingLoadRequests();
    7373    void setCacheModel(in int model);
     74    void setAsynchronousSpellCheckingEnabled(in boolean value);
    7475
    7576    // Special DOM functions.
  • trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp

    r144547 r144752  
    652652}
    653653
     654void TestRunner::setAsynchronousSpellCheckingEnabled(bool enabled)
     655{
     656    WKBundleSetAsynchronousSpellCheckingEnabled(InjectedBundle::shared().bundle(), InjectedBundle::shared().pageGroup(), enabled);
     657}
     658
    654659void TestRunner::grantWebNotificationPermission(JSStringRef origin)
    655660{
  • trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h

    r144547 r144752  
    116116    void dispatchPendingLoadRequests();
    117117    void setCacheModel(int);
     118    void setAsynchronousSpellCheckingEnabled(bool);
    118119
    119120    // Special DOM functions.
  • trunk/Tools/WebKitTestRunner/TestController.cpp

    r144415 r144752  
    570570    WKPreferencesSetScreenFontSubstitutionEnabled(preferences, true);
    571571    WKPreferencesSetInspectorUsesWebKitUserInterface(preferences, true);
     572    WKPreferencesSetAsynchronousSpellCheckingEnabled(preferences, false);
    572573#if !PLATFORM(MAC)
    573574    WKTextCheckerContinuousSpellCheckingEnabledStateChanged(true);
Note: See TracChangeset for help on using the changeset viewer.