Changeset 83530 in webkit


Ignore:
Timestamp:
Apr 11, 2011 4:23:13 PM (13 years ago)
Author:
Martin Robinson
Message:

2011-02-03 Martin Robinson <mrobinson@igalia.com>

Reviewed by Eric Seidel.

[GTK] The GTK+ DRT needs an implementation of the PlainTextController
https://bugs.webkit.org/show_bug.cgi?id=53605

  • platform/gtk/Skipped: Unskipped test which is now passing.

2011-02-03 Martin Robinson <mrobinson@igalia.com>

Reviewed by Eric Seidel.

[GTK] The GTK+ DRT needs an implementation of the PlainTextController
https://bugs.webkit.org/show_bug.cgi?id=53605

Added jsValueToDOMRange to DumpRenderTreeSupportGtk. This static method can convert
a JSValueRef to a WebKitDOMRange. When it's possible to do this with the public
API, we can remove this method.

  • WebCoreSupport/DumpRenderTreeSupportGtk.cpp: (DumpRenderTreeSupportGtk::jsValueToDOMRange): Added.
  • WebCoreSupport/DumpRenderTreeSupportGtk.h: Added declaration.

2011-02-03 Martin Robinson <mrobinson@igalia.com>

Reviewed by Eric Seidel.

[GTK] The GTK+ DRT needs an implementation of the PlainTextController
https://bugs.webkit.org/show_bug.cgi?id=53605

Add an implementation of the PlainTextController for the GTK+ DRT.

  • DumpRenderTree/gtk/DumpRenderTree.cpp: (addControllerToWindow): Added this helper method. (webViewWindowObjectCleared): Use the new helper to add EventSender and the PlainTextController to the window object.
  • GNUmakefile.am: Added PlainTextController source files.
  • DumpRenderTree/gtk/PlainTextController.cpp: Added. This will rely on DumpRenderTreeSupportGtk to convert a JSValueRef into a WebKitDOMRange until that functionality exists somewhere in the WebKitGTK+ stack.
  • DumpRenderTree/gtk/PlainTextController.h: Added.
Location:
trunk
Files:
2 added
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r83528 r83530  
     12011-02-03  Martin Robinson  <mrobinson@igalia.com>
     2
     3        Reviewed by Eric Seidel.
     4
     5        [GTK] The GTK+ DRT needs an implementation of the PlainTextController
     6        https://bugs.webkit.org/show_bug.cgi?id=53605
     7
     8        * platform/gtk/Skipped: Unskipped test which is now passing.
     9
    1102011-04-11  Stephen White  <senorblanco@chromium.org>
    211
  • trunk/LayoutTests/platform/gtk/Skipped

    r83479 r83530  
    13061306http/tests/security/local-user-CSS-from-remote.html
    13071307
    1308 # Need an implementation of PlainTextController
    1309 # https://bugs.webkit.org/show_bug.cgi?id=53605
    1310 editing/text-iterator/basic-iteration.html
    1311 
    13121308# LayoutTestController needs layoutTestController.displayInvalidatedRegion
    13131309# https://bugs.webkit.org/show_bug.cgi?id=54073
  • trunk/Source/WebKit/gtk/ChangeLog

    r83493 r83530  
     12011-02-03  Martin Robinson  <mrobinson@igalia.com>
     2
     3        Reviewed by Eric Seidel.
     4
     5        [GTK] The GTK+ DRT needs an implementation of the PlainTextController
     6        https://bugs.webkit.org/show_bug.cgi?id=53605
     7
     8        Added jsValueToDOMRange to DumpRenderTreeSupportGtk. This static method can convert
     9        a JSValueRef to a WebKitDOMRange. When it's possible to do this with the public
     10        API, we can remove this method.
     11
     12        * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
     13        (DumpRenderTreeSupportGtk::jsValueToDOMRange): Added.
     14        * WebCoreSupport/DumpRenderTreeSupportGtk.h: Added declaration.
     15
    1162011-04-11  Mario Sanchez Prada  <msanchez@igalia.com>
    217
  • trunk/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp

    r83333 r83530  
    4343#include "JSLock.h"
    4444#include "JSNodeList.h"
     45#include "JSRange.h"
    4546#include "JSValue.h"
    4647#include "NodeList.h"
     
    5455#include "Settings.h"
    5556#include "TextIterator.h"
     57#include "WebKitDOMRangePrivate.h"
    5658#include "WorkerThread.h"
    5759#include "webkitglobalsprivate.h"
     
    128130}
    129131
     132WebKitDOMRange* DumpRenderTreeSupportGtk::jsValueToDOMRange(JSContextRef context, JSValueRef value)
     133{
     134    if (!value)
     135        return 0;
     136
     137    JSLock lock(SilenceAssertionsOnly);
     138    ExecState* exec = toJS(context);
     139
     140    Range* range = toRange(toJS(exec, value));
     141    if (!range)
     142        return 0;
     143    return kit(range);
     144}
     145
    130146/**
    131147 * getFrameChildren:
  • trunk/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h

    r83271 r83530  
    2121
    2222#include "JSStringRef.h"
    23 #include <webkit/webkitdefines.h>
    24 
    2523#include <atk/atk.h>
    2624#include <glib.h>
    2725#include <webkit/webkitdefines.h>
    28 #include <webkit/webkitwebframe.h>
     26#include <webkit/webkitdomdefines.h>
    2927#include <wtf/text/CString.h>
    3028
     
    6361
    6462    static JSValueRef shadowRoot(JSContextRef, JSValueRef);
     63    static WebKitDOMRange* jsValueToDOMRange(JSContextRef, JSValueRef);
    6564
    6665    // FIXME: Move these to webkitwebframe.h once their API has been discussed.
  • trunk/Tools/ChangeLog

    r83504 r83530  
     12011-02-03  Martin Robinson  <mrobinson@igalia.com>
     2
     3        Reviewed by Eric Seidel.
     4
     5        [GTK] The GTK+ DRT needs an implementation of the PlainTextController
     6        https://bugs.webkit.org/show_bug.cgi?id=53605
     7
     8        Add an implementation of the PlainTextController for the GTK+ DRT.
     9
     10        * DumpRenderTree/gtk/DumpRenderTree.cpp:
     11        (addControllerToWindow): Added this helper method.
     12        (webViewWindowObjectCleared): Use the new helper to add EventSender
     13        and the PlainTextController to the window object.
     14        * GNUmakefile.am: Added PlainTextController source files.
     15        * DumpRenderTree/gtk/PlainTextController.cpp: Added. This will rely
     16        on DumpRenderTreeSupportGtk to convert a JSValueRef into a WebKitDOMRange
     17        until that functionality exists somewhere in the WebKitGTK+ stack.
     18        * DumpRenderTree/gtk/PlainTextController.h: Added.
     19
    1202011-04-11  Yael Aharon  <yael.aharon@nokia.com>
    221
  • trunk/Tools/DumpRenderTree/gtk/DumpRenderTree.cpp

    r83077 r83530  
    4040#include "LayoutTestController.h"
    4141#include "PixelDumpSupport.h"
     42#include "PlainTextController.h"
    4243#include "TextInputController.h"
    4344#include "WebCoreSupport/DumpRenderTreeSupportGtk.h"
     
    815816}
    816817
     818static void addControllerToWindow(JSContextRef context, JSObjectRef windowObject, const char* controllerName, JSValueRef controller)
     819{
     820    JSStringRef controllerNameStr = JSStringCreateWithUTF8CString(controllerName);
     821    JSObjectSetProperty(context, windowObject, controllerNameStr, controller, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete, 0);
     822    JSStringRelease(controllerNameStr);
     823}
     824
    817825static void webViewWindowObjectCleared(WebKitWebView* view, WebKitWebFrame* frame, JSGlobalContextRef context, JSObjectRef windowObject, gpointer data)
    818826{
     
    829837    ASSERT(!exception);
    830838
    831     JSStringRef eventSenderStr = JSStringCreateWithUTF8CString("eventSender");
    832     JSValueRef eventSender = makeEventSender(context, !webkit_web_frame_get_parent(frame));
    833     JSObjectSetProperty(context, windowObject, eventSenderStr, eventSender, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete, 0);
    834     JSStringRelease(eventSenderStr);
    835 
    836     JSStringRef textInputControllerStr = JSStringCreateWithUTF8CString("textInputController");
    837     JSValueRef textInputController = makeTextInputController(context);
    838     JSObjectSetProperty(context, windowObject, textInputControllerStr, textInputController, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete, 0);
    839     JSStringRelease(textInputControllerStr);
     839    addControllerToWindow(context, windowObject, "eventSender", makeEventSender(context, !webkit_web_frame_get_parent(frame)));
     840    addControllerToWindow(context, windowObject, "plainText", makePlainTextController(context));
     841    addControllerToWindow(context, windowObject, "textInputController", makeTextInputController(context));
    840842}
    841843
  • trunk/Tools/DumpRenderTree/gtk/TextInputController.cpp

    r77917 r83530  
    3737#include <JavaScriptCore/JSStringRef.h>
    3838#include <cstring>
     39#include <webkit/webkit.h>
    3940
    4041static JSValueRef setMarkedTextCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
  • trunk/Tools/GNUmakefile.am

    r83300 r83530  
    8585        Tools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp \
    8686        Tools/DumpRenderTree/gtk/PixelDumpSupportGtk.cpp \
     87        Tools/DumpRenderTree/gtk/PlainTextController.cpp \
     88        Tools/DumpRenderTree/gtk/PlainTextController.h \
    8789        Tools/DumpRenderTree/gtk/TextInputController.h \
    8890        Tools/DumpRenderTree/gtk/TextInputController.cpp \
Note: See TracChangeset for help on using the changeset viewer.