WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Proposed patch
enable-caret-api.patch (text/plain), 5.82 KB, created by
Alejandro G. Castro
on 2009-12-16 08:54:37 PST
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Alejandro G. Castro
Created:
2009-12-16 08:54:37 PST
Size:
5.82 KB
patch
obsolete
>diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog >index d58c5ca..4c6cf87 100644 >--- a/WebKitTools/ChangeLog >+++ b/WebKitTools/ChangeLog >@@ -1,3 +1,20 @@ >+2009-12-16 Alejandro G. Castro <alex@igalia.com> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Add enableCaretBrowsing API to the LayoutTestController >+ https://bugs.webkit.org/show_bug.cgi?id=32612 >+ >+ This API enables the caret browsing in the settings. >+ >+ * DumpRenderTree/LayoutTestController.cpp: >+ * DumpRenderTree/LayoutTestController.h: >+ * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp: >+ * DumpRenderTree/mac/LayoutTestControllerMac.mm: >+ * DumpRenderTree/qt/LayoutTestControllerQt.cpp: >+ * DumpRenderTree/win/LayoutTestControllerWin.cpp: >+ * DumpRenderTree/wx/LayoutTestControllerWx.cpp: >+ > 2009-12-15 Chris Jerdonek <chris.jerdonek@gmail.com> > > Reviewed by David Levin. >diff --git a/WebKitTools/DumpRenderTree/LayoutTestController.cpp b/WebKitTools/DumpRenderTree/LayoutTestController.cpp >index 572d610..fec289b 100644 >--- a/WebKitTools/DumpRenderTree/LayoutTestController.cpp >+++ b/WebKitTools/DumpRenderTree/LayoutTestController.cpp >@@ -1150,6 +1150,14 @@ static JSValueRef addUserStyleSheetCallback(JSContextRef context, JSObjectRef, J > return JSValueMakeUndefined(context); > } > >+static JSValueRef enableCaretBrowsingCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) >+{ >+ // Has gtk implementation >+ LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject)); >+ controller->enableCaretBrowsing(); >+ return JSValueMakeUndefined(context); >+} >+ > // Static Values > > static JSValueRef getGlobalFlagCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) >@@ -1316,6 +1324,7 @@ JSStaticFunction* LayoutTestController::staticFunctions() > { "waitUntilDone", waitUntilDoneCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, > { "windowCount", windowCountCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, > { "whiteListAccessFromOrigin", whiteListAccessFromOriginCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, >+ { "enableCaretBrowsing", enableCaretBrowsingCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, > { 0, 0, 0 } > }; > >diff --git a/WebKitTools/DumpRenderTree/LayoutTestController.h b/WebKitTools/DumpRenderTree/LayoutTestController.h >index 7e18dce..a9d9597 100644 >--- a/WebKitTools/DumpRenderTree/LayoutTestController.h >+++ b/WebKitTools/DumpRenderTree/LayoutTestController.h >@@ -91,6 +91,7 @@ public: > size_t webHistoryItemCount(); > unsigned workerThreadCount() const; > int windowCount(); >+ void enableCaretBrowsing(); > > void grantDesktopNotificationPermission(JSStringRef origin); > bool checkDesktopNotificationPermission(JSStringRef origin); >diff --git a/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp b/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp >index 6e94c1c..95c6e8c 100644 >--- a/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp >+++ b/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp >@@ -556,3 +556,11 @@ void LayoutTestController::removeAllVisitedLinks() > { > // FIXME: Implement this. > } >+ >+void LayoutTestController::enableCaretBrowsing() >+{ >+ WebKitWebView* webView = webkit_web_frame_get_web_view(mainFrame); >+ WebKitWebSettings* webSettings = webkit_web_view_get_settings(webView); >+ >+ g_object_set(webSettings, "enable-caret-browsing", TRUE, NULL); >+} >diff --git a/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm b/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm >index 69fe19f..27be23b 100644 >--- a/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm >+++ b/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm >@@ -589,3 +589,8 @@ void LayoutTestController::evaluateScriptInIsolatedWorld(unsigned worldID, JSObj > > [mainFrame _stringByEvaluatingJavaScriptFromString:scriptNS withGlobalObject:globalObject inScriptWorld:world]; > } >+ >+void LayoutTestController::enableCaretBrowsing() >+{ >+ // FIXME: Not implemented >+} >diff --git a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp >index bc617f8..3aede7d 100644 >--- a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp >+++ b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp >@@ -369,3 +369,8 @@ void LayoutTestController::overridePreference(const QString& name, const QVarian > else if (name == "WebKitUsesPageCachePreferenceKey") > QWebSettings::setMaximumPagesInCache(value.toInt()); > } >+ >+void LayoutTestController::enableCaretBrowsing() >+{ >+ // FIXME: Not implemented >+} >diff --git a/WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp b/WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp >index 5debf16..55ae97e 100644 >--- a/WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp >+++ b/WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp >@@ -1093,3 +1093,7 @@ JSRetainPtr<JSStringRef> LayoutTestController::counterValueForElementById(JSStri > return counterValueJS; > } > >+void LayoutTestController::enableCaretBrowsing() >+{ >+ // FIXME: Not implemented >+} >diff --git a/WebKitTools/DumpRenderTree/wx/LayoutTestControllerWx.cpp b/WebKitTools/DumpRenderTree/wx/LayoutTestControllerWx.cpp >index 2c46950..5fbe6f6 100644 >--- a/WebKitTools/DumpRenderTree/wx/LayoutTestControllerWx.cpp >+++ b/WebKitTools/DumpRenderTree/wx/LayoutTestControllerWx.cpp >@@ -354,3 +354,8 @@ JSRetainPtr<JSStringRef> LayoutTestController::counterValueForElementById(JSStri > { > > } >+ >+void LayoutTestController::enableCaretBrowsing() >+{ >+ // FIXME: Not implemented >+}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 32612
:
44981
|
44982
|
45051