Changeset 64524 in webkit


Ignore:
Timestamp:
Aug 2, 2010 7:20:09 PM (14 years ago)
Author:
Martin Robinson
Message:

2010-08-02 Martin Robinson <mrobinson@igalia.com>

Reviewed by Xan Lopez.

[GTK] DRT implement execCommand()
https://bugs.webkit.org/show_bug.cgi?id=35351

Enable tests which are now passing and re-organize some others that
will pass once we have editing callbacks enabled.

  • platform/gtk/Skipped:
  • platform/gtk/editing/deleting/5300379-expected.txt: Added.
  • platform/gtk/editing/deleting/delete-to-end-of-paragraph-expected.txt:
  • platform/gtk/editing/deleting/smart-delete-003-expected.txt: Added.
  • platform/gtk/editing/deleting/smart-delete-004-expected.txt: Added.
  • platform/gtk/editing/selection/selection-actions-expected.txt: Added.

2010-08-02 Martin Robinson <mrobinson@igalia.com>

Reviewed by Xan Lopez.

[GTK] DRT implement execCommand()
https://bugs.webkit.org/show_bug.cgi?id=35351

  • webkit/webkitprivate.h: Add some private methods for the DRT which enable LayoutTestController.execCommand and LayoutTestController.isCommandEnabled: webkit_web_view_execute_core_command_by_name and webkit_web_view_is_command_enabled.
  • webkit/webkitwebview.cpp: (webkit_web_view_execute_core_command_by_name): added. (webkit_web_view_is_command_enabled): Added.

2010-08-02 Martin Robinson <mrobinson@igalia.com>

Reviewed by Xan Lopez.

[GTK] DRT implement execCommand()
https://bugs.webkit.org/show_bug.cgi?id=35351

  • DumpRenderTree/gtk/LayoutTestControllerGtk.cpp: (LayoutTestController::execCommand): Implement using webkit_web_view_execute_core_command_by_name. (LayoutTestController::isCommandEnabled): Implement using webkit_web_view_is_command_enabled. (LayoutTestController::setCacheModel): Move below LayoutTestController::isCommandEnabled.
Location:
trunk
Files:
4 added
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r64523 r64524  
     12010-08-02  Martin Robinson  <mrobinson@igalia.com>
     2
     3        Reviewed by Xan Lopez.
     4
     5        [GTK] DRT implement execCommand()
     6        https://bugs.webkit.org/show_bug.cgi?id=35351
     7
     8        Enable tests which are now passing and re-organize some others that
     9        will pass once we have editing callbacks enabled.
     10
     11        * platform/gtk/Skipped:
     12        * platform/gtk/editing/deleting/5300379-expected.txt: Added.
     13        * platform/gtk/editing/deleting/delete-to-end-of-paragraph-expected.txt:
     14        * platform/gtk/editing/deleting/smart-delete-003-expected.txt: Added.
     15        * platform/gtk/editing/deleting/smart-delete-004-expected.txt: Added.
     16        * platform/gtk/editing/selection/selection-actions-expected.txt: Added.
     17
    1182010-08-02  Andrew Wilson  <atwilson@chromium.org>
    219
  • trunk/LayoutTests/platform/gtk/Skipped

    r64506 r64524  
    623623editing/deleting/pruning-after-merge-1.html
    624624editing/deleting/skip-virama-001.html
    625 editing/deleting/smart-editing-disabled.html
    626625editing/inserting/5994480-2.html
    627626editing/inserting/insert-thai-characters-001.html
     
    663662editing/deleting/5144139-2.html
    664663editing/deleting/5168598.html
    665 editing/deleting/5300379.html
    666664editing/deleting/5408255.html
    667665editing/deleting/delete-3857753-fix.html
     
    740738editing/deleting/smart-delete-001.html
    741739editing/deleting/smart-delete-002.html
    742 editing/deleting/smart-delete-003.html
    743 editing/deleting/smart-delete-004.html
    744740editing/deleting/table-cells.html
    745741editing/deleting/transpose-empty.html
     
    938934editing/selection/4932260-2.html
    939935editing/selection/4932260-3.html
    940 editing/selection/4947387.html
    941936editing/selection/4975120.html
    942 editing/selection/5195166-1.html
    943 editing/selection/5195166-2.html
    944937editing/selection/5240265.html
    945938editing/selection/after-line-wrap.html
     
    1005998editing/selection/select-missing-image.html
    1006999editing/selection/selection-3748164-fix.html
    1007 editing/selection/selection-actions.html
    10081000editing/selection/selection-background.html
    10091001editing/selection/table-caret-1.html
     
    50375029editing/undo/redo-style.html
    50385030editing/undo/undo-indent.html
     5031editing/execCommand/indent-with-style.html
     5032editing/execCommand/4641880-1.html
     5033editing/execCommand/4641880-2.html
     5034editing/execCommand/create-list-from-range-selection.html
     5035editing/execCommand/create-list-with-hr.html
     5036editing/execCommand/find-after-replace.html
     5037editing/execCommand/findString-2.html
     5038editing/execCommand/findString.html
     5039editing/execCommand/format-block-from-range-selection.html
     5040editing/execCommand/format-block-with-braces.html
     5041editing/execCommand/format-block-with-trailing-br.html
     5042editing/execCommand/format-block.html
     5043editing/execCommand/hilitecolor.html
     5044editing/execCommand/indent-empty-root.html
     5045editing/execCommand/indent-list-item.html
     5046editing/execCommand/indent-selection.html
     5047editing/execCommand/insert-list-and-stitch.html
     5048editing/execCommand/insertHorizontalRule.html
     5049editing/execCommand/insertImage.html
     5050editing/execCommand/nsresponder-indent.html
     5051editing/execCommand/nsresponder-outdent.html
     5052editing/execCommand/outdent-selection.html
     5053editing/execCommand/paste-1.html
     5054editing/execCommand/paste-2.html
     5055editing/execCommand/print.html
     5056editing/execCommand/remove-formatting-2.html
     5057editing/execCommand/remove-formatting.html
     5058editing/execCommand/remove-list-from-range-selection.html
     5059editing/execCommand/remove-list-item-1.html
     5060editing/execCommand/selectAll.html
     5061editing/execCommand/createLink.html
     5062editing/execCommand/enabling-and-selection-2.html
     5063editing/execCommand/findString-diacriticals.html
     5064editing/execCommand/indent-nested-lists-1.html
     5065editing/execCommand/indent-nested-lists-2.html
     5066editing/execCommand/indent-nested-lists-3.html
     5067editing/execCommand/indent-nested-lists-4.html
     5068editing/execCommand/indent-nested-lists-5.html
     5069editing/execCommand/indent-nested-lists-6.html
     5070editing/execCommand/indent-nested-lists-7.html
     5071editing/execCommand/insertHTML.html
     5072editing/execCommand/outdent-blockquote-test1.html
     5073editing/execCommand/outdent-blockquote-test2.html
     5074editing/execCommand/outdent-blockquote-test3.html
     5075editing/execCommand/outdent-blockquote-test4.html
     5076editing/execCommand/outdent-nested-lists-1.html
     5077editing/execCommand/outdent-nested-lists-2.html
     5078editing/execCommand/outdent-nested-lists-3.html
     5079editing/execCommand/outdent-nested-lists-4.html
     5080editing/execCommand/queryCommandState-01.html
     5081editing/execCommand/remove-list-1.html
     5082editing/execCommand/remove-list-items.html
     5083editing/execCommand/switch-list-type.html
     5084editing/execCommand/unlink.html
     5085editing/selection/4947387.html
     5086editing/selection/5195166-2.html
    50395087
    50405088# Requires expected results that we don't have atm
     
    57345782fast/speech
    57355783
    5736 # Tests failing because we lack execCommand support.
    5737 # https://bugs.webkit.org/show_bug.cgi?id=35351
    5738 editing/execCommand/indent-with-style.html
    5739 editing/execCommand/4641880-1.html
    5740 editing/execCommand/4641880-2.html
    5741 editing/execCommand/create-list-from-range-selection.html
    5742 editing/execCommand/create-list-with-hr.html
    5743 editing/execCommand/find-after-replace.html
    5744 editing/execCommand/findString-2.html
    5745 editing/execCommand/findString.html
    5746 editing/execCommand/format-block-from-range-selection.html
    5747 editing/execCommand/format-block-with-braces.html
    5748 editing/execCommand/format-block-with-trailing-br.html
    5749 editing/execCommand/format-block.html
    5750 editing/execCommand/hilitecolor.html
    5751 editing/execCommand/indent-empty-root.html
    5752 editing/execCommand/indent-list-item.html
    5753 editing/execCommand/indent-selection.html
    5754 editing/execCommand/insert-list-and-stitch.html
    5755 editing/execCommand/insertHorizontalRule.html
    5756 editing/execCommand/insertImage.html
    5757 editing/execCommand/nsresponder-indent.html
    5758 editing/execCommand/nsresponder-outdent.html
    5759 editing/execCommand/outdent-selection.html
    5760 editing/execCommand/paste-1.html
    5761 editing/execCommand/paste-2.html
    5762 editing/execCommand/print.html
    5763 editing/execCommand/remove-formatting-2.html
    5764 editing/execCommand/remove-formatting.html
    5765 editing/execCommand/remove-list-from-range-selection.html
    5766 editing/execCommand/remove-list-item-1.html
    5767 editing/execCommand/selectAll.html
    5768 editing/execCommand/createLink.html
    5769 editing/execCommand/delete-image-in-anchor.html
    5770 editing/execCommand/enabling-and-selection-2.html
    5771 editing/execCommand/findString-diacriticals.html
    5772 editing/execCommand/indent-nested-lists-1.html
    5773 editing/execCommand/indent-nested-lists-2.html
    5774 editing/execCommand/indent-nested-lists-3.html
    5775 editing/execCommand/indent-nested-lists-4.html
    5776 editing/execCommand/indent-nested-lists-5.html
    5777 editing/execCommand/indent-nested-lists-6.html
    5778 editing/execCommand/indent-nested-lists-7.html
    5779 editing/execCommand/insertHTML.html
    5780 editing/execCommand/outdent-blockquote-test1.html
    5781 editing/execCommand/outdent-blockquote-test2.html
    5782 editing/execCommand/outdent-blockquote-test3.html
    5783 editing/execCommand/outdent-blockquote-test4.html
    5784 editing/execCommand/outdent-nested-lists-1.html
    5785 editing/execCommand/outdent-nested-lists-2.html
    5786 editing/execCommand/outdent-nested-lists-3.html
    5787 editing/execCommand/outdent-nested-lists-4.html
    5788 editing/execCommand/queryCommandState-01.html
    5789 editing/execCommand/remove-list-1.html
    5790 editing/execCommand/remove-list-items.html
    5791 editing/execCommand/switch-list-type.html
    5792 editing/execCommand/unlink.html
    5793 editing/selection/extend-forward-after-set-base-and-extent.html
    5794 
    57955784# Missing DRT API.
    57965785http/tests/loading/preload-slow-loading.php
     
    58715860# https://bugs.webkit.org/show_bug.cgi?id=43034
    58725861inspector/debugger-breakpoints-not-activated-on-reload.html
     5862
     5863# Fails because multiple clicks in a row in the same place
     5864# register as a triple-click even though the mouse have moved
     5865# outside of the double-click distance.
     5866editing/selection/5195166-1.html
  • trunk/LayoutTests/platform/gtk/editing/deleting/delete-to-end-of-paragraph-expected.txt

    r63295 r64524  
    44  RenderBlock {HTML} at (0,0) size 800x600
    55    RenderBody {BODY} at (8,8) size 784x584
    6       RenderBlock {DIV} at (0,0) size 600x30
    7         RenderText {#text} at (0,0) size 132x30
    8           text run at (0,0) width 132: "one two three"
    9       RenderBlock {DIV} at (0,30) size 784x20
    10         RenderText {#text} at (0,0) size 76x20
    11           text run at (0,0) width 76: "four five six"
    12 caret: position 0 of child 0 {#text} of child 1 {DIV} of body
     6      RenderBlock {DIV} at (0,0) size 600x20
     7        RenderInline {SPAN} at (0,0) size 76x20
     8          RenderText {#text} at (0,0) size 76x20
     9            text run at (0,0) width 76: "four five six"
     10caret: position 0 of child 0 {#text} of child 0 {SPAN} of child 1 {DIV} of body
  • trunk/WebKit/gtk/ChangeLog

    r64513 r64524  
     12010-08-02  Martin Robinson  <mrobinson@igalia.com>
     2
     3        Reviewed by Xan Lopez.
     4
     5        [GTK] DRT implement execCommand()
     6        https://bugs.webkit.org/show_bug.cgi?id=35351
     7
     8        * webkit/webkitprivate.h: Add some private methods for the DRT which enable
     9        LayoutTestController.execCommand and LayoutTestController.isCommandEnabled:
     10        webkit_web_view_execute_core_command_by_name and webkit_web_view_is_command_enabled.
     11        * webkit/webkitwebview.cpp:
     12        (webkit_web_view_execute_core_command_by_name): added.
     13        (webkit_web_view_is_command_enabled): Added.
     14
    1152010-07-27  Luiz Agostini  <luiz.agostini@openbossa.org>
    216
  • trunk/WebKit/gtk/webkit/webkitprivate.h

    r64496 r64524  
    274274    webkit_web_view_set_tooltip_text(WebKitWebView*, const char*);
    275275
     276    WEBKIT_API void
     277    webkit_web_view_execute_core_command_by_name(WebKitWebView* webView, const gchar* name, const gchar* value);
     278
     279    WEBKIT_API gboolean
     280    webkit_web_view_is_command_enabled(WebKitWebView* webView, const gchar* name);
     281
    276282    WebKitDownload*
    277283    webkit_download_new_with_handle(WebKitNetworkRequest* request, WebCore::ResourceHandle* handle, const WebCore::ResourceResponse& response);
  • trunk/WebKit/gtk/webkit/webkitwebview.cpp

    r64496 r64524  
    46594659    return cacheModel;
    46604660}
     4661
     4662void webkit_web_view_execute_core_command_by_name(WebKitWebView* webView, const gchar* name, const gchar* value)
     4663{
     4664    g_return_if_fail(WEBKIT_IS_WEB_VIEW(webView));
     4665    g_return_if_fail(name);
     4666    g_return_if_fail(value);
     4667
     4668    core(webView)->focusController()->focusedOrMainFrame()->editor()->command(name).execute(value);
     4669}
     4670
     4671gboolean webkit_web_view_is_command_enabled(WebKitWebView* webView, const gchar* name)
     4672{
     4673    g_return_val_if_fail(WEBKIT_IS_WEB_VIEW(webView), FALSE);
     4674    g_return_val_if_fail(name, FALSE);
     4675
     4676    return core(webView)->focusController()->focusedOrMainFrame()->editor()->command(name).isEnabled();
     4677}
  • trunk/WebKitTools/ChangeLog

    r64519 r64524  
     12010-08-02  Martin Robinson  <mrobinson@igalia.com>
     2
     3        Reviewed by Xan Lopez.
     4
     5        [GTK] DRT implement execCommand()
     6        https://bugs.webkit.org/show_bug.cgi?id=35351
     7
     8        * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
     9        (LayoutTestController::execCommand): Implement using webkit_web_view_execute_core_command_by_name.
     10        (LayoutTestController::isCommandEnabled): Implement using webkit_web_view_is_command_enabled.
     11        (LayoutTestController::setCacheModel): Move below LayoutTestController::isCommandEnabled.
     12
    1132010-08-02  Sam Weinig  <sam@webkit.org>
    214
  • trunk/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp

    r64356 r64524  
    6161void webkit_web_inspector_execute_script(WebKitWebInspector* inspector, long callId, const gchar* script);
    6262gchar* webkit_web_frame_marker_text_for_list_item(WebKitWebFrame* frame, JSContextRef context, JSValueRef nodeObject);
     63void webkit_web_view_execute_core_command_by_name(WebKitWebView* webView, const gchar* name, const gchar* value);
     64gboolean webkit_web_view_is_command_enabled(WebKitWebView* webView, const gchar* name);
    6365}
    6466
     
    505507void LayoutTestController::execCommand(JSStringRef name, JSStringRef value)
    506508{
    507     // FIXME: implement
     509    WebKitWebView* view = webkit_web_frame_get_web_view(mainFrame);
     510    ASSERT(view);
     511
     512    gchar* cName = JSStringCopyUTF8CString(name);
     513    gchar* cValue = JSStringCopyUTF8CString(value);
     514    webkit_web_view_execute_core_command_by_name(view, cName, cValue);
     515    g_free(cName);
     516    g_free(cValue);
     517}
     518
     519bool LayoutTestController::isCommandEnabled(JSStringRef name)
     520{
     521    WebKitWebView* view = webkit_web_frame_get_web_view(mainFrame);
     522    ASSERT(view);
     523
     524    gchar* cName = JSStringCopyUTF8CString(name);
     525    gboolean result = webkit_web_view_is_command_enabled(view, cName);
     526    g_free(cName);
     527    return result;
    508528}
    509529
     
    511531{
    512532    // FIXME: implement
    513 }
    514 
    515 bool LayoutTestController::isCommandEnabled(JSStringRef /*name*/)
    516 {
    517     // FIXME: implement
    518     return false;
    519533}
    520534
Note: See TracChangeset for help on using the changeset viewer.