Changeset 77971 in webkit


Ignore:
Timestamp:
Feb 8, 2011 2:25:36 PM (13 years ago)
Author:
Martin Robinson
Message:

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

Reviewed by Xan Lopez.

[GTK] DRT needs an implementation of LayoutTestController.setIconDatabaseEnabled
https://bugs.webkit.org/show_bug.cgi?id=54033

  • platform/gtk/Skipped: Unskip a test that is now passing.

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

Reviewed by Xan Lopez.

[GTK] DRT needs an implementation of LayoutTestController.setIconDatabaseEnabled
https://bugs.webkit.org/show_bug.cgi?id=54033

Add a DumpRenderTreeSupportGtk method for turning the icon database on and off.
This is a likely candidate for a new API point.

  • WebCoreSupport/DumpRenderTreeSupportGtk.cpp: (DumpRenderTreeSupportGtk::setIconDatabaseEnabled): Added.
  • WebCoreSupport/DumpRenderTreeSupportGtk.h:
  • webkit/webkitglobals.cpp: (webkitInit): Call setIconDatabaseEnabled(true) on startup, instead of initializing the database manually. (WebKit::setIconDatabaseEnabled): Added.
  • webkit/webkitglobalsprivate.h: Added declarations.

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

Reviewed by Xan Lopez.

[GTK] DRT needs an implementation of LayoutTestController.setIconDatabaseEnabled
https://bugs.webkit.org/show_bug.cgi?id=54033

Add an implementation of LayoutTestController.setIconDatabaseEnabled that just
call DumpRenderTreeSupportGtk. Turn off the icon database between tests.

  • DumpRenderTree/gtk/DumpRenderTree.cpp: (resetDefaultsToConsistentValues): Turn off the icon database.
  • DumpRenderTree/gtk/LayoutTestControllerGtk.cpp: (LayoutTestController::setIconDatabaseEnabled): Call the appropriate DumpRenderTreeSupportGtk method.
Location:
trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r77969 r77971  
     12011-02-08  Martin Robinson  <mrobinson@igalia.com>
     2
     3        Reviewed by Xan Lopez.
     4
     5        [GTK] DRT needs an implementation of LayoutTestController.setIconDatabaseEnabled
     6        https://bugs.webkit.org/show_bug.cgi?id=54033
     7
     8        * platform/gtk/Skipped: Unskip a test that is now passing.
     9
    1102011-02-08  Zhenyao Mo  <zmo@google.com>
    211
  • trunk/LayoutTests/platform/gtk/Skipped

    r77967 r77971  
    46474647fast/frames/set-parent-src-synchronously.html
    46484648fast/frames/sandboxed-iframe-storage.html
    4649 
    4650 # GTK+ DRT should support enabling and disabling the icon database
    4651 http/tests/inspector/resource-har-conversion.html
  • trunk/Source/WebKit/gtk/ChangeLog

    r77963 r77971  
     12011-02-08  Martin Robinson  <mrobinson@igalia.com>
     2
     3        Reviewed by Xan Lopez.
     4
     5        [GTK] DRT needs an implementation of LayoutTestController.setIconDatabaseEnabled
     6        https://bugs.webkit.org/show_bug.cgi?id=54033
     7
     8        Add a DumpRenderTreeSupportGtk method for turning the icon database on and off.
     9        This is a likely candidate for a new API point.
     10
     11        * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
     12        (DumpRenderTreeSupportGtk::setIconDatabaseEnabled): Added.
     13        * WebCoreSupport/DumpRenderTreeSupportGtk.h:
     14        * webkit/webkitglobals.cpp:
     15        (webkitInit): Call setIconDatabaseEnabled(true) on startup, instead
     16        of initializing the database manually.
     17        (WebKit::setIconDatabaseEnabled): Added.
     18        * webkit/webkitglobalsprivate.h: Added declarations.
     19
    1202011-02-08  Adam Barth  <abarth@webkit.org>
    221
  • trunk/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp

    r77917 r77971  
    5151#include "TextIterator.h"
    5252#include "WorkerThread.h"
     53#include "webkitglobalsprivate.h"
    5354#include "webkitwebframe.h"
    5455#include "webkitwebframeprivate.h"
     
    9495{
    9596    return s_linksIncludedInTabChain;
     97}
     98
     99void DumpRenderTreeSupportGtk::setIconDatabaseEnabled(bool enabled)
     100{
     101    WebKit::setIconDatabaseEnabled(enabled);
    96102}
    97103
  • trunk/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h

    r77917 r77971  
    5454    static void setLinksIncludedInFocusChain(bool);
    5555    static bool linksIncludedInFocusChain();
     56    static void setIconDatabaseEnabled(bool);
    5657    static JSValueRef nodesFromRect(JSContextRef context, JSValueRef value, int x, int y, unsigned top, unsigned right, unsigned bottom, unsigned left, bool ignoreClipping);
    5758    static void dumpConfigurationForViewport(WebKitWebView* webView, gint availableWidth, gint availableHeight);
  • trunk/Source/WebKit/gtk/webkit/webkitglobals.cpp

    r77710 r77971  
    259259
    260260    Pasteboard::generalPasteboard()->setHelper(WebKit::pasteboardHelperInstance());
    261 
    262     iconDatabase()->setEnabled(true);
    263 
    264     GOwnPtr<gchar> iconDatabasePath(g_build_filename(g_get_user_data_dir(), "webkit", "icondatabase", NULL));
    265     iconDatabase()->open(iconDatabasePath.get());
    266 
    267     atexit(closeIconDatabaseOnExit);
     261    WebKit::setIconDatabaseEnabled(true);
    268262
    269263    SoupSession* session = webkit_get_default_session();
     
    289283}
    290284
     285void setIconDatabaseEnabled(bool enabled)
     286{
     287    static bool initialized = false;
     288    if (enabled && !initialized) {
     289        initialized = true;
     290        atexit(closeIconDatabaseOnExit);
     291    }
     292
     293    if (enabled) {
     294        iconDatabase()->setEnabled(true);
     295        GOwnPtr<gchar> iconDatabasePath(g_build_filename(g_get_user_data_dir(), "webkit", "icondatabase", NULL));
     296        iconDatabase()->open(iconDatabasePath.get());
     297        return;
     298    }
     299
     300    iconDatabase()->setEnabled(false);
     301    iconDatabase()->close();
     302}
     303
     304
    291305} /** end namespace WebKit */
    292306
  • trunk/Source/WebKit/gtk/webkit/webkitglobalsprivate.h

    r74933 r77971  
    3434PasteboardHelperGtk* pasteboardHelperInstance();
    3535
     36void setIconDatabaseEnabled(bool);
    3637}
    3738
  • trunk/Tools/ChangeLog

    r77947 r77971  
     12011-02-08  Martin Robinson  <mrobinson@igalia.com>
     2
     3        Reviewed by Xan Lopez.
     4
     5        [GTK] DRT needs an implementation of LayoutTestController.setIconDatabaseEnabled
     6        https://bugs.webkit.org/show_bug.cgi?id=54033
     7
     8        Add an implementation of LayoutTestController.setIconDatabaseEnabled that just
     9        call DumpRenderTreeSupportGtk. Turn off the icon database between tests.
     10
     11        * DumpRenderTree/gtk/DumpRenderTree.cpp:
     12        (resetDefaultsToConsistentValues): Turn off the icon database.
     13        * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
     14        (LayoutTestController::setIconDatabaseEnabled): Call the appropriate DumpRenderTreeSupportGtk
     15        method.
     16
    1172011-02-08  Kundu Suchismita  <suchi.kundu@nokia.com>
    218
  • trunk/Tools/DumpRenderTree/gtk/DumpRenderTree.cpp

    r77917 r77971  
    446446
    447447    DumpRenderTreeSupportGtk::setLinksIncludedInFocusChain(true);
     448    DumpRenderTreeSupportGtk::setIconDatabaseEnabled(false);
    448449}
    449450
  • trunk/Tools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp

    r77868 r77971  
    491491}
    492492
    493 void LayoutTestController::setIconDatabaseEnabled(bool flag)
    494 {
    495     // FIXME: implement
     493void LayoutTestController::setIconDatabaseEnabled(bool enabled)
     494{
     495    DumpRenderTreeSupportGtk::setIconDatabaseEnabled(enabled);
    496496}
    497497
Note: See TracChangeset for help on using the changeset viewer.