Changeset 73348 in webkit


Ignore:
Timestamp:
Dec 5, 2010 5:21:40 PM (13 years ago)
Author:
tonikitoo@webkit.org
Message:

2010-12-04 Antonio Gomes <agomes@rim.com>

Reviewed by Martin Robinson.

[Gtk] Populate DumpRenderTreeSupportGtk (Part II)
https://bugs.webkit.org/show_bug.cgi?id=48429

Moved more private method declared with WEBKIT_API to
DumpRenderTreeSupportGtk, since they were only being used by DRT.

WebKit:

  • WebCoreSupport/DumpRenderTreeSupportGtk.cpp: (DumpRenderTreeSupportGtk::executeCoreCommandByName): (DumpRenderTreeSupportGtk::isCommandEnabled): (DumpRenderTreeSupportGtk::whiteListAccessFromOrigin): (DumpRenderTreeSupportGtk::resetOriginAccessWhiteLists):
  • WebCoreSupport/DumpRenderTreeSupportGtk.h:
  • webkit/webkitprivate.cpp:
  • webkit/webkitprivate.h:
  • webkit/webkitwebview.cpp:

WebKitTools:

  • DumpRenderTree/gtk/DumpRenderTree.cpp: (resetDefaultsToConsistentValues):
  • DumpRenderTree/gtk/LayoutTestControllerGtk.cpp: (LayoutTestController::addOriginAccessWhitelistEntry): (LayoutTestController::execCommand): (LayoutTestController::isCommandEnabled):
Location:
trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/gtk/ChangeLog

    r73325 r73348  
     12010-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
    1212010-11-08  Antonio Gomes  <agomes@rim.com>
    222
  • trunk/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp

    r73325 r73348  
    2525#include "AXObjectCache.h"
    2626#include "Document.h"
     27#include "FocusController.h"
    2728#include "FrameLoaderClientGtk.h"
    2829#include "FrameView.h"
     
    4041#include "RenderView.h"
    4142#include "RenderTreeAsText.h"
     43#include "SecurityOrigin.h"
    4244#if ENABLE(SVG)
    4345#include "SVGSMILElement.h"
     
    349351}
    350352
     353void 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
     362bool 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
     370void 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
     375void DumpRenderTreeSupportGtk::resetOriginAccessWhiteLists()
     376{
     377    SecurityOrigin::resetOriginAccessWhitelists();
     378}
     379
  • trunk/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h

    r73325 r73348  
    6060    static AtkObject* getFocusedAccessibleElement(WebKitWebFrame* frame);
    6161
     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
    6269private:
    6370    static bool s_drtRun;
  • trunk/WebKit/gtk/webkit/webkitprivate.cpp

    r72745 r73348  
    4444#include "ResourceHandleInternal.h"
    4545#include "ResourceResponse.h"
    46 #include "SecurityOrigin.h"
    4746#include "TextEncodingRegistry.h"
    4847#include "WebKitDOMBinding.h"
     
    324323}
    325324
    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 
    337325void webkitWebViewEnterFullscreen(WebKitWebView* webView, Node* node)
    338326{
  • trunk/WebKit/gtk/webkit/webkitprivate.h

    r73325 r73348  
    302302    webkit_web_view_get_context_menu(WebKitWebView*);
    303303
    304     WEBKIT_API void
    305     webkit_web_view_execute_core_command_by_name(WebKitWebView* webView, const gchar* name, const gchar* value);
    306 
    307     WEBKIT_API gboolean
    308     webkit_web_view_is_command_enabled(WebKitWebView* webView, const gchar* name);
    309 
    310304    WebKitDownload*
    311305    webkit_download_new_with_handle(WebKitNetworkRequest* request, WebCore::ResourceHandle* handle, const WebCore::ResourceResponse& response);
     
    369363    webkit_worker_thread_count();
    370364   
    371     WEBKIT_API void
    372     webkit_white_list_access_from_origin(const gchar* sourceOrigin, const gchar* destinationProtocol, const gchar* destinationHost, bool allowDestinationSubdomains);
    373    
    374     WEBKIT_API void
    375     webkit_reset_origin_access_white_lists();
    376 
    377365    // WebKitWebDataSource private
    378366    WebKitWebDataSource*
  • trunk/WebKit/gtk/webkit/webkitwebview.cpp

    r72909 r73348  
    50285028}
    50295029
    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 
    50475030GtkMenu* webkit_web_view_get_context_menu(WebKitWebView* webView)
    50485031{
  • trunk/WebKitTools/ChangeLog

    r73347 r73348  
     12010-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
    1182010-12-04  Antonio Gomes  <agomes@rim.com>
    219
  • trunk/WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp

    r73347 r73348  
    6666extern void webkit_web_settings_add_extra_plugin_directory(WebKitWebView* view, const gchar* directory);
    6767extern gchar* webkit_web_frame_get_response_mime_type(WebKitWebFrame* frame);
    68 extern void webkit_reset_origin_access_white_lists();
    6968}
    7069
     
    422421    webkit_web_view_set_zoom_level(webView, 1.0);
    423422
    424     webkit_reset_origin_access_white_lists();
     423    DumpRenderTreeSupportGtk::resetOriginAccessWhiteLists();
    425424
    426425    WebKitWebBackForwardList* list = webkit_web_view_get_back_forward_list(webView);
  • trunk/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp

    r73325 r73348  
    5252void webkit_application_cache_set_maximum_size(unsigned long long size);
    5353unsigned 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);
    5554void 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);
    5855}
    5956
     
    280277    gchar* protocolGChar = JSStringCopyUTF8CString(protocol);
    281278    gchar* hostGChar = JSStringCopyUTF8CString(host);
    282     webkit_white_list_access_from_origin(sourceOriginGChar, protocolGChar, hostGChar, includeSubdomains);
     279    DumpRenderTreeSupportGtk::whiteListAccessFromOrigin(sourceOriginGChar, protocolGChar, hostGChar, includeSubdomains);
    283280    g_free(sourceOriginGChar);
    284281    g_free(protocolGChar);
     
    546543    gchar* cName = JSStringCopyUTF8CString(name);
    547544    gchar* cValue = JSStringCopyUTF8CString(value);
    548     webkit_web_view_execute_core_command_by_name(view, cName, cValue);
     545    DumpRenderTreeSupportGtk::executeCoreCommandByName(view, cName, cValue);
    549546    g_free(cName);
    550547    g_free(cValue);
     
    563560
    564561    gchar* cName = JSStringCopyUTF8CString(name);
    565     gboolean result = webkit_web_view_is_command_enabled(view, cName);
     562    bool result = DumpRenderTreeSupportGtk::isCommandEnabled(view, cName);
    566563    g_free(cName);
    567564    return result;
Note: See TracChangeset for help on using the changeset viewer.