Changeset 73348 in webkit
- Timestamp:
- Dec 5, 2010 5:21:40 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit/gtk/ChangeLog
r73325 r73348 1 2010-12-04 Antonio Gomes <agomes@rim.com> 2 3 Reviewed by Martin Robinson. 4 5 [Gtk] Populate DumpRenderTreeSupportGtk (Part II) 6 https://bugs.webkit.org/show_bug.cgi?id=48429 7 8 Moved more private method declared with WEBKIT_API to 9 DumpRenderTreeSupportGtk, since they were only being used by DRT. 10 11 * WebCoreSupport/DumpRenderTreeSupportGtk.cpp: 12 (DumpRenderTreeSupportGtk::executeCoreCommandByName): 13 (DumpRenderTreeSupportGtk::isCommandEnabled): 14 (DumpRenderTreeSupportGtk::whiteListAccessFromOrigin): 15 (DumpRenderTreeSupportGtk::resetOriginAccessWhiteLists): 16 * WebCoreSupport/DumpRenderTreeSupportGtk.h: 17 * webkit/webkitprivate.cpp: 18 * webkit/webkitprivate.h: 19 * webkit/webkitwebview.cpp: 20 1 21 2010-11-08 Antonio Gomes <agomes@rim.com> 2 22 -
trunk/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp
r73325 r73348 25 25 #include "AXObjectCache.h" 26 26 #include "Document.h" 27 #include "FocusController.h" 27 28 #include "FrameLoaderClientGtk.h" 28 29 #include "FrameView.h" … … 40 41 #include "RenderView.h" 41 42 #include "RenderTreeAsText.h" 43 #include "SecurityOrigin.h" 42 44 #if ENABLE(SVG) 43 45 #include "SVGSMILElement.h" … … 349 351 } 350 352 353 void DumpRenderTreeSupportGtk::executeCoreCommandByName(WebKitWebView* webView, const gchar* name, const gchar* value) 354 { 355 g_return_if_fail(WEBKIT_IS_WEB_VIEW(webView)); 356 g_return_if_fail(name); 357 g_return_if_fail(value); 358 359 core(webView)->focusController()->focusedOrMainFrame()->editor()->command(name).execute(value); 360 } 361 362 bool DumpRenderTreeSupportGtk::isCommandEnabled(WebKitWebView* webView, const gchar* name) 363 { 364 g_return_val_if_fail(WEBKIT_IS_WEB_VIEW(webView), FALSE); 365 g_return_val_if_fail(name, FALSE); 366 367 return core(webView)->focusController()->focusedOrMainFrame()->editor()->command(name).isEnabled(); 368 } 369 370 void DumpRenderTreeSupportGtk::whiteListAccessFromOrigin(const gchar* sourceOrigin, const gchar* destinationProtocol, const gchar* destinationHost, bool allowDestinationSubdomains) 371 { 372 SecurityOrigin::addOriginAccessWhitelistEntry(*SecurityOrigin::createFromString(sourceOrigin), destinationProtocol, destinationHost, allowDestinationSubdomains); 373 } 374 375 void DumpRenderTreeSupportGtk::resetOriginAccessWhiteLists() 376 { 377 SecurityOrigin::resetOriginAccessWhitelists(); 378 } 379 -
trunk/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h
r73325 r73348 60 60 static AtkObject* getFocusedAccessibleElement(WebKitWebFrame* frame); 61 61 62 // WebKitWebView 63 static void executeCoreCommandByName(WebKitWebView* webView, const gchar* name, const gchar* value); 64 static bool isCommandEnabled(WebKitWebView* webView, const gchar* name); 65 66 static void whiteListAccessFromOrigin(const gchar* sourceOrigin, const gchar* destinationProtocol, const gchar* destinationHost, bool allowDestinationSubdomains); 67 static void resetOriginAccessWhiteLists(); 68 62 69 private: 63 70 static bool s_drtRun; -
trunk/WebKit/gtk/webkit/webkitprivate.cpp
r72745 r73348 44 44 #include "ResourceHandleInternal.h" 45 45 #include "ResourceResponse.h" 46 #include "SecurityOrigin.h"47 46 #include "TextEncodingRegistry.h" 48 47 #include "WebKitDOMBinding.h" … … 324 323 } 325 324 326 void webkit_white_list_access_from_origin(const gchar* sourceOrigin, const gchar* destinationProtocol, const gchar* destinationHost, bool allowDestinationSubdomains)327 {328 SecurityOrigin::addOriginAccessWhitelistEntry(*SecurityOrigin::createFromString(sourceOrigin), destinationProtocol, destinationHost, allowDestinationSubdomains);329 }330 331 void webkit_reset_origin_access_white_lists()332 {333 SecurityOrigin::resetOriginAccessWhitelists();334 }335 336 337 325 void webkitWebViewEnterFullscreen(WebKitWebView* webView, Node* node) 338 326 { -
trunk/WebKit/gtk/webkit/webkitprivate.h
r73325 r73348 302 302 webkit_web_view_get_context_menu(WebKitWebView*); 303 303 304 WEBKIT_API void305 webkit_web_view_execute_core_command_by_name(WebKitWebView* webView, const gchar* name, const gchar* value);306 307 WEBKIT_API gboolean308 webkit_web_view_is_command_enabled(WebKitWebView* webView, const gchar* name);309 310 304 WebKitDownload* 311 305 webkit_download_new_with_handle(WebKitNetworkRequest* request, WebCore::ResourceHandle* handle, const WebCore::ResourceResponse& response); … … 369 363 webkit_worker_thread_count(); 370 364 371 WEBKIT_API void372 webkit_white_list_access_from_origin(const gchar* sourceOrigin, const gchar* destinationProtocol, const gchar* destinationHost, bool allowDestinationSubdomains);373 374 WEBKIT_API void375 webkit_reset_origin_access_white_lists();376 377 365 // WebKitWebDataSource private 378 366 WebKitWebDataSource* -
trunk/WebKit/gtk/webkit/webkitwebview.cpp
r72909 r73348 5028 5028 } 5029 5029 5030 void webkit_web_view_execute_core_command_by_name(WebKitWebView* webView, const gchar* name, const gchar* value)5031 {5032 g_return_if_fail(WEBKIT_IS_WEB_VIEW(webView));5033 g_return_if_fail(name);5034 g_return_if_fail(value);5035 5036 core(webView)->focusController()->focusedOrMainFrame()->editor()->command(name).execute(value);5037 }5038 5039 gboolean webkit_web_view_is_command_enabled(WebKitWebView* webView, const gchar* name)5040 {5041 g_return_val_if_fail(WEBKIT_IS_WEB_VIEW(webView), FALSE);5042 g_return_val_if_fail(name, FALSE);5043 5044 return core(webView)->focusController()->focusedOrMainFrame()->editor()->command(name).isEnabled();5045 }5046 5047 5030 GtkMenu* webkit_web_view_get_context_menu(WebKitWebView* webView) 5048 5031 { -
trunk/WebKitTools/ChangeLog
r73347 r73348 1 2010-12-04 Antonio Gomes <agomes@rim.com> 2 3 Reviewed by Martin Robinson. 4 5 [Gtk] Populate DumpRenderTreeSupportGtk (Part II) 6 https://bugs.webkit.org/show_bug.cgi?id=48429 7 8 Moved more private method declared with WEBKIT_API to 9 DumpRenderTreeSupportGtk, since they were only being used by DRT. 10 11 * DumpRenderTree/gtk/DumpRenderTree.cpp: 12 (resetDefaultsToConsistentValues): 13 * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp: 14 (LayoutTestController::addOriginAccessWhitelistEntry): 15 (LayoutTestController::execCommand): 16 (LayoutTestController::isCommandEnabled): 17 1 18 2010-12-04 Antonio Gomes <agomes@rim.com> 2 19 -
trunk/WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp
r73347 r73348 66 66 extern void webkit_web_settings_add_extra_plugin_directory(WebKitWebView* view, const gchar* directory); 67 67 extern gchar* webkit_web_frame_get_response_mime_type(WebKitWebFrame* frame); 68 extern void webkit_reset_origin_access_white_lists();69 68 } 70 69 … … 422 421 webkit_web_view_set_zoom_level(webView, 1.0); 423 422 424 webkit_reset_origin_access_white_lists();423 DumpRenderTreeSupportGtk::resetOriginAccessWhiteLists(); 425 424 426 425 WebKitWebBackForwardList* list = webkit_web_view_get_back_forward_list(webView); -
trunk/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
r73325 r73348 52 52 void webkit_application_cache_set_maximum_size(unsigned long long size); 53 53 unsigned int webkit_worker_thread_count(void); 54 void webkit_white_list_access_from_origin(const gchar* sourceOrigin, const gchar* destinationProtocol, const gchar* destinationHost, bool allowDestinationSubdomains);55 54 void webkit_web_inspector_execute_script(WebKitWebInspector* inspector, long callId, const gchar* script); 56 void webkit_web_view_execute_core_command_by_name(WebKitWebView* webView, const gchar* name, const gchar* value);57 gboolean webkit_web_view_is_command_enabled(WebKitWebView* webView, const gchar* name);58 55 } 59 56 … … 280 277 gchar* protocolGChar = JSStringCopyUTF8CString(protocol); 281 278 gchar* hostGChar = JSStringCopyUTF8CString(host); 282 webkit_white_list_access_from_origin(sourceOriginGChar, protocolGChar, hostGChar, includeSubdomains);279 DumpRenderTreeSupportGtk::whiteListAccessFromOrigin(sourceOriginGChar, protocolGChar, hostGChar, includeSubdomains); 283 280 g_free(sourceOriginGChar); 284 281 g_free(protocolGChar); … … 546 543 gchar* cName = JSStringCopyUTF8CString(name); 547 544 gchar* cValue = JSStringCopyUTF8CString(value); 548 webkit_web_view_execute_core_command_by_name(view, cName, cValue);545 DumpRenderTreeSupportGtk::executeCoreCommandByName(view, cName, cValue); 549 546 g_free(cName); 550 547 g_free(cValue); … … 563 560 564 561 gchar* cName = JSStringCopyUTF8CString(name); 565 gboolean result = webkit_web_view_is_command_enabled(view, cName);562 bool result = DumpRenderTreeSupportGtk::isCommandEnabled(view, cName); 566 563 g_free(cName); 567 564 return result;
Note: See TracChangeset
for help on using the changeset viewer.