Changeset 96234 in webkit
- Timestamp:
- Sep 28, 2011 10:40:14 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r96231 r96234 1 2011-09-28 Kaustubh Atrawalkar <kaustubh@motorola.com> 2 3 [Gtk] Implement textInputController.doCommand 4 https://bugs.webkit.org/show_bug.cgi?id=66496 5 6 Reviewed by Martin Robinson. 7 8 Removed skipped tests under textInputController.doCommand for Gtk Port. 9 10 * platform/gtk/Skipped: 11 1 12 2011-09-28 Tom Sepez <tsepez@chromium.org> 2 13 -
trunk/LayoutTests/platform/gtk/Skipped
r96218 r96234 1546 1546 fast/html/set-text-direction.html 1547 1547 1548 # textInputController.doCommand is not implemented.1549 # https://bugs.webkit.org/show_bug.cgi?id=664961550 editing/input/password-echo-passnode.html1551 editing/input/password-echo-passnode2.html1552 editing/input/password-echo-passnode3.html1553 editing/input/password-echo-textnode.html1554 1555 1548 # https://bugs.webkit.org/show_bug.cgi?id=57160 1556 1549 # [GTK] layoutTestController.overridePreference("WebKitDefaultFontSize"...) does not take into account screen DPI -
trunk/Source/WebKit/gtk/ChangeLog
r96087 r96234 1 2011-09-28 Kaustubh Atrawalkar <kaustubh@motorola.com> 2 3 [Gtk] Implement textInputController.doCommand 4 https://bugs.webkit.org/show_bug.cgi?id=66496 5 6 Reviewed by Martin Robinson. 7 8 * WebCoreSupport/DumpRenderTreeSupportGtk.cpp: 9 (DumpRenderTreeSupportGtk::doCommand): Function definition for doCommand 10 callback. Converted Incoming command to match with WebCore::Editor CommandMap. 11 * WebCoreSupport/DumpRenderTreeSupportGtk.h: 12 1 13 2011-09-27 Carlos Garcia Campos <cgarcia@igalia.com> 2 14 -
trunk/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp
r95901 r96234 576 576 } 577 577 578 void DumpRenderTreeSupportGtk::doCommand(WebKitWebView* webView, const char* command) 579 { 580 g_return_if_fail(WEBKIT_IS_WEB_VIEW(webView)); 581 Frame* frame = core(webView)->focusController()->focusedOrMainFrame(); 582 if (!frame) 583 return; 584 585 Editor* editor = frame->editor(); 586 if (!editor) 587 return; 588 589 String commandString(command); 590 // Remove ending : here. 591 if (commandString.endsWith(":", true)) 592 commandString = commandString.left(commandString.length() - 1); 593 594 // Make the first char in upper case. 595 String firstChar = commandString.left(1); 596 commandString = commandString.right(commandString.length() - 1); 597 firstChar.makeUpper(); 598 commandString.insert(firstChar, 0); 599 600 editor->command(commandString).execute(); 601 } 602 578 603 bool DumpRenderTreeSupportGtk::firstRectForCharacterRange(WebKitWebView* webView, int location, int length, cairo_rectangle_int_t* rect) 579 604 { -
trunk/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h
r95901 r96234 110 110 static bool firstRectForCharacterRange(WebKitWebView*, int location, int length, cairo_rectangle_int_t*); 111 111 static bool selectedRange(WebKitWebView*, int* start, int* length); 112 112 static void doCommand(WebKitWebView*, const char*); 113 113 // GC 114 114 static void gcCollectJavascriptObjects(); -
trunk/Tools/ChangeLog
r96232 r96234 1 2011-09-28 Kaustubh Atrawalkar <kaustubh@motorola.com> 2 3 [Gtk] Implement textInputController.doCommand 4 https://bugs.webkit.org/show_bug.cgi?id=66496 5 6 Reviewed by Martin Robinson. 7 8 * DumpRenderTree/gtk/TextInputController.cpp: 9 (doCommandCallback): Callback function for textInputController.doCommand 10 1 11 2011-09-28 David Levin <levin@chromium.org> 2 12 -
trunk/Tools/DumpRenderTree/gtk/TextInputController.cpp
r89133 r96234 163 163 } 164 164 165 static JSValueRef doCommandCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) 166 { 167 WebKitWebView* view = webkit_web_frame_get_web_view(mainFrame); 168 ASSERT(view); 169 if (argumentCount < 1) 170 return JSValueMakeUndefined(context); 171 172 JSStringRef string = JSValueToStringCopy(context, arguments[0], exception); 173 ASSERT(!exception || !*exception); 174 175 size_t bufferSize = JSStringGetMaximumUTF8CStringSize(string); 176 GOwnPtr<gchar> stringBuffer(static_cast<gchar*>(g_malloc(bufferSize))); 177 JSStringGetUTF8CString(string, stringBuffer.get(), bufferSize); 178 JSStringRelease(string); 179 180 DumpRenderTreeSupportGtk::doCommand(view, stringBuffer.get()); 181 return JSValueMakeUndefined(context); 182 } 183 165 184 static JSStaticFunction staticFunctions[] = { 166 185 { "setMarkedText", setMarkedTextCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, … … 171 190 { "firstRectForCharacterRange", firstRectForCharacterRangeCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 172 191 { "selectedRange", selectedRangeCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 192 { "doCommand", doCommandCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 173 193 { 0, 0, 0 } 174 194 };
Note: See TracChangeset
for help on using the changeset viewer.