Changeset 66721 in webkit


Ignore:
Timestamp:
Sep 3, 2010 3:36:04 AM (14 years ago)
Author:
commit-queue@webkit.org
Message:

2010-09-03 Hironori Bono <hbono@chromium.org>

Reviewed by Kent Tamura.

Adds textInputController.hasSpellingMarker() to avoid using pixel tests for spellchecking tests
and implements it for Mac.
https://bugs.webkit.org/show_bug.cgi?id=41832

  • editing/spelling/spelling-contenteditable-expected.txt: Added the expected result for spelling-contenteditable.html.
  • editing/spelling/spelling-contenteditable.html: Added a text test of spellcheker APIs for contenteditable <div> elements.
  • editing/spelling/spelling-textarea-expected.txt: Added the expected result for spelling-textarea.html.
  • editing/spelling/spelling-textarea.html: Added a text test of spellchecker APIs for <textarea> elements.
  • platform/chromium/test_expectations.txt: Skipped the new tests because textInputController.hasSpelingMarker() is not implemented.
  • platform/gtk/Skipped: ditto.
  • platform/qt/Skipped: ditto.
  • platform/win/Skipped: ditto.

2010-09-03 Hironori Bono <hbono@chromium.org>

Reviewed by Kent Tamura.

Adds textInputController.hasSpellingMarker() to avoid using pixel tests for spellchecking tests
and implements it for Mac.
https://bugs.webkit.org/show_bug.cgi?id=41832

Tests: editing/spelling/spelling-contenteditable.html

editing/spelling/spelling-textarea.html

  • WebCore.exp.in: Exported symbols used by [WebFrame hasSpellingMarker:length:].

2010-09-03 Hironori Bono <hbono@chromium.org>

Reviewed by Kent Tamura.

Adds textInputController.hasSpellingMarker() to avoid using pixel tests for spellchecking tests
and implements it for Mac.
https://bugs.webkit.org/show_bug.cgi?id=41832

  • WebView/WebFrame.mm: Implemented [WebFrame hasSpellingMarker:length:]. (spellingNode): (-[WebFrame hasSpellingMarker:length:]):
  • WebView/WebFramePrivate.h: Added [WebFrame hasSpellingMarker:length:] so TextInputController can use it.

2010-09-03 Hironori Bono <hbono@chromium.org>

Reviewed by Kent Tamura.

Adds textInputController.hasSpellingMarker() to avoid using pixel tests for spellchecking tests
and implements it for Mac.
https://bugs.webkit.org/show_bug.cgi?id=41832

  • DumpRenderTree/mac/TextInputController.m: Added [TextInputController hasSpellingMarker:length:] and bind it so we can call it from JavaScript. (+[TextInputController isSelectorExcludedFromWebScript:]): (+[TextInputController webScriptNameForSelector:]): (-[TextInputController hasSpellingMarker:length:]):
Location:
trunk
Files:
4 added
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r66718 r66721  
     12010-09-03  Hironori Bono  <hbono@chromium.org>
     2
     3        Reviewed by Kent Tamura.
     4
     5        Adds textInputController.hasSpellingMarker() to avoid using pixel tests for spellchecking tests
     6        and implements it for Mac.
     7        https://bugs.webkit.org/show_bug.cgi?id=41832
     8
     9        * editing/spelling/spelling-contenteditable-expected.txt: Added the expected result for
     10        spelling-contenteditable.html.
     11        * editing/spelling/spelling-contenteditable.html: Added a text test of spellcheker APIs
     12        for contenteditable <div> elements.
     13        * editing/spelling/spelling-textarea-expected.txt: Added the expected result for spelling-textarea.html.
     14        * editing/spelling/spelling-textarea.html: Added a text test of spellchecker APIs
     15        for <textarea> elements.
     16        * platform/chromium/test_expectations.txt: Skipped the new tests because
     17        textInputController.hasSpelingMarker() is not implemented.
     18        * platform/gtk/Skipped: ditto.
     19        * platform/qt/Skipped: ditto.
     20        * platform/win/Skipped: ditto.
     21
    1222010-09-03  Philippe Normand  <pnormand@igalia.com>
    223
  • trunk/LayoutTests/platform/chromium/test_expectations.txt

    r66697 r66721  
    27502750BUGWK41311 WIN LINUX : fast/borders/borderRadiusDouble09.html = IMAGE
    27512751
     2752// Need to implement textInputController.hasSpellingMarkers().
     2753BUGWK41832 : editing/spelling/spelling-textarea.html = FAIL
     2754BUGWK41832 : editing/spelling/spelling-contenteditable.html = FAIL
     2755
    27522756// Flaky tests.
    27532757BUG44345 LINUX : svg/zoom/text/zoom-hixie-mixed-009.xml = IMAGE PASS
  • trunk/LayoutTests/platform/gtk/Skipped

    r66605 r66721  
    10141014editing/spelling/inline_spelling_markers.html
    10151015editing/spelling/spellcheck-attribute.html
     1016editing/spelling/spelling-contenteditable.html
     1017editing/spelling/spelling-textarea.html
    10161018editing/style/5065910.html
    10171019editing/style/apple-style-editable-mix.html
  • trunk/LayoutTests/platform/qt/Skipped

    r66648 r66721  
    22972297editing/spelling/spellcheck-attribute.html
    22982298editing/spelling/spelling.html
     2299
     2300# textInputController.hasSpellingMarkers() is not implemented.
     2301editing/spelling/spelling-contenteditable.html
     2302editing/spelling/spelling-textarea.html
    22992303
    23002304# ============================================================================= #
  • trunk/LayoutTests/platform/win/Skipped

    r66462 r66721  
    879879editing/spelling/context-menu-suggestions.html
    880880
     881# textInputController.hasSpellingMarkers() is not implemented.
     882editing/spelling/spelling-contenteditable.html
     883editing/spelling/spelling-textarea.html
     884
    881885# IndexedDB is not yet enabled.
    882886storage/indexeddb
  • trunk/WebCore/ChangeLog

    r66720 r66721  
     12010-09-03  Hironori Bono  <hbono@chromium.org>
     2
     3        Reviewed by Kent Tamura.
     4
     5        Adds textInputController.hasSpellingMarker() to avoid using pixel tests for spellchecking tests
     6        and implements it for Mac.
     7        https://bugs.webkit.org/show_bug.cgi?id=41832
     8
     9        Tests: editing/spelling/spelling-contenteditable.html
     10               editing/spelling/spelling-textarea.html
     11
     12        * WebCore.exp.in: Exported symbols used by [WebFrame hasSpellingMarker:length:].
     13
    1142010-09-02  Yury Semikhatsky  <yurys@chromium.org>
    215
  • trunk/WebCore/WebCore.exp.in

    r66677 r66721  
    463463__ZN7WebCore24BinaryPropertyListWriter17writePropertyListEv
    464464__ZN7WebCore24DocumentMarkerController13removeMarkersENS_14DocumentMarker10MarkerTypeE
     465__ZN7WebCore24DocumentMarkerController14markersForNodeEPNS_4NodeE
    465466__ZN7WebCore24DocumentMarkerController23renderedRectsForMarkersENS_14DocumentMarker10MarkerTypeE
    466467__ZN7WebCore24contextMenuItemTagItalicEv
     
    887888__ZNK7WebCore12IconDatabase24shouldStopThreadActivityEv
    888889__ZNK7WebCore12IconDatabase9isEnabledEv
     890__ZNK7WebCore12RenderObject7childAtEj
    889891__ZNK7WebCore12RenderObject14enclosingLayerEv
    890892__ZNK7WebCore12RenderObject15localToAbsoluteENS_10FloatPointEbb
  • trunk/WebKit/mac/ChangeLog

    r66720 r66721  
     12010-09-03  Hironori Bono  <hbono@chromium.org>
     2
     3        Reviewed by Kent Tamura.
     4
     5        Adds textInputController.hasSpellingMarker() to avoid using pixel tests for spellchecking tests
     6        and implements it for Mac.
     7        https://bugs.webkit.org/show_bug.cgi?id=41832
     8
     9        * WebView/WebFrame.mm: Implemented [WebFrame hasSpellingMarker:length:].
     10        (spellingNode):
     11        (-[WebFrame hasSpellingMarker:length:]):
     12        * WebView/WebFramePrivate.h: Added [WebFrame hasSpellingMarker:length:] so TextInputController can use it.
     13
    1142010-09-02  Yury Semikhatsky  <yurys@chromium.org>
    215
  • trunk/WebKit/mac/WebView/WebFrame.mm

    r66323 r66721  
    13671367}
    13681368
     1369static Node* spellingNode(Frame* coreFrame)
     1370{
     1371    Node* focusedNode = coreFrame->document()->focusedNode();
     1372    if (!focusedNode || !focusedNode->renderer())
     1373        return 0;
     1374
     1375    for (const RenderObject* renderer = focusedNode->renderer(); renderer; renderer = renderer->childAt(0)) {
     1376        if (renderer->isText())
     1377            return renderer->node();
     1378    }
     1379    return 0;
     1380}
     1381
     1382- (BOOL)hasSpellingMarker:(int)from length:(int)length
     1383{
     1384    Frame* coreFrame = _private->coreFrame;
     1385    if (!coreFrame)
     1386        return NO;
     1387
     1388    Node* node = spellingNode(coreFrame);
     1389    if (!node)
     1390        return NO;
     1391
     1392    unsigned int startOffset = static_cast<unsigned int>(from);
     1393    unsigned int endOffset = static_cast<unsigned int>(from + length);
     1394    Vector<DocumentMarker> markers = coreFrame->document()->markers()->markersForNode(node);
     1395    for (size_t i = 0; i < markers.size(); ++i) {
     1396        DocumentMarker marker = markers[i];
     1397        if (marker.startOffset <= startOffset && endOffset <= marker.endOffset && marker.type == DocumentMarker::Spelling)
     1398            return YES;
     1399    }
     1400    return NO;
     1401}
     1402
    13691403@end
    13701404
  • trunk/WebKit/mac/WebView/WebFramePrivate.h

    r66323 r66721  
    144144- (NSString*)_layerTreeAsText;
    145145
     146// Returns whether there is a spelling marker in the specified range of the focused node.
     147- (BOOL)hasSpellingMarker:(int)location length:(int)length;
     148
    146149@end
  • trunk/WebKitTools/ChangeLog

    r66707 r66721  
     12010-09-03  Hironori Bono  <hbono@chromium.org>
     2
     3        Reviewed by Kent Tamura.
     4
     5        Adds textInputController.hasSpellingMarker() to avoid using pixel tests for spellchecking tests
     6        and implements it for Mac.
     7        https://bugs.webkit.org/show_bug.cgi?id=41832
     8
     9        * DumpRenderTree/mac/TextInputController.m: Added [TextInputController hasSpellingMarker:length:]
     10        and bind it so we can call it from JavaScript.
     11        (+[TextInputController isSelectorExcludedFromWebScript:]):
     12        (+[TextInputController webScriptNameForSelector:]):
     13        (-[TextInputController hasSpellingMarker:length:]):
     14
    1152010-09-02  Eric Seidel  <eric@webkit.org>
    216
  • trunk/WebKitTools/DumpRenderTree/mac/TextInputController.m

    r46340 r66721  
    3434#import <WebKit/WebDocument.h>
    3535#import <WebKit/WebFrame.h>
     36#import <WebKit/WebFramePrivate.h>
    3637#import <WebKit/WebFrameView.h>
    3738#import <WebKit/WebHTMLViewPrivate.h>
     
    170171            || aSelector == @selector(validAttributesForMarkedText)
    171172            || aSelector == @selector(attributedStringWithString:)
    172             || aSelector == @selector(setInputMethodHandler:))
     173            || aSelector == @selector(setInputMethodHandler:)
     174            || aSelector == @selector(hasSpellingMarker:length:))
    173175        return NO;
    174176    return YES;
     
    195197    else if (aSelector == @selector(setInputMethodHandler:))
    196198        return @"setInputMethodHandler";
     199    else if (aSelector == @selector(hasSpellingMarker:length:))
     200        return @"hasSpellingMarker";
    197201
    198202    return nil;
     
    428432}
    429433
    430 @end
     434- (BOOL)hasSpellingMarker:(int)from length:(int)length
     435{
     436    return [[webView mainFrame] hasSpellingMarker:from length:length];
     437}
     438
     439@end
Note: See TracChangeset for help on using the changeset viewer.