Changeset 108190 in webkit


Ignore:
Timestamp:
Feb 19, 2012 11:16:25 AM (12 years ago)
Author:
kov@webkit.org
Message:

[GTK] Remove unused GSettings stuff
https://bugs.webkit.org/show_bug.cgi?id=78995

Reviewed by Martin Robinson.

.:

  • configure.ac: remove gsettings schema file creation.

Source/WebKit/gtk:

  • GNUmakefile.am: remove GSettings-related stuff.
  • WebCoreSupport/InspectorClientGtk.cpp:

(WebKit): Remove unused code.

  • org.webkitgtk.gschema.xml.in: Removed.
  • webkit/webkitwebinspector.cpp:

(webkit_web_inspector_execute_script): remove gsettings-related helper.

  • webkit/webkitwebinspectorprivate.h: Ditto.
Location:
trunk
Files:
1 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r108189 r108190  
     12012-02-19  Gustavo Noronha Silva  <gns@gnome.org>
     2
     3        [GTK] Remove unused GSettings stuff
     4        https://bugs.webkit.org/show_bug.cgi?id=78995
     5
     6        Reviewed by Martin Robinson.
     7
     8        * configure.ac: remove gsettings schema file creation.
     9
    1102012-02-19  Ryosuke Niwa  <rniwa@webkit.org>
    211
  • trunk/Source/WebKit/gtk/ChangeLog

    r108151 r108190  
     12012-02-19  Gustavo Noronha Silva  <gns@gnome.org>
     2
     3        [GTK] Remove unused GSettings stuff
     4        https://bugs.webkit.org/show_bug.cgi?id=78995
     5
     6        Reviewed by Martin Robinson.
     7
     8        * GNUmakefile.am: remove GSettings-related stuff.
     9        * WebCoreSupport/InspectorClientGtk.cpp:
     10        (WebKit): Remove unused code.
     11        * org.webkitgtk.gschema.xml.in: Removed.
     12        * webkit/webkitwebinspector.cpp:
     13        (webkit_web_inspector_execute_script): remove gsettings-related helper.
     14        * webkit/webkitwebinspectorprivate.h: Ditto.
     15
    1162012-02-17  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
    217
  • trunk/Source/WebKit/gtk/GNUmakefile.am

    r107854 r108190  
    386386        && rm -f xgen-gtc
    387387
    388 # GSettings
    389 gsettings_SCHEMAS = $(top_builddir)/Source/WebKit/gtk/org.webkitgtk-@WEBKITGTK_API_VERSION@.gschema.xml
    390 @GSETTINGS_RULES@
    391 
    392388EXTRA_DIST += \
    393389        $(WebKit)/ChangeLog \
  • trunk/Source/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp

    r106831 r108190  
    4949
    5050private:
    51 #ifdef HAVE_GSETTINGS
    52     static bool shouldIgnoreSetting(const String& key)
    53     {
    54         // GSettings considers trying to fetch or set a setting that is
    55         // not backed by a schema as programmer error, and aborts the
    56         // program's execution. We check here to avoid having an unhandled
    57         // setting as a fatal error.
    58         LOG_VERBOSE(NotYetImplemented, "Unknown key ignored: %s", key.ascii().data());
    59         return true;
    60     }
    61 
    6251    virtual String getProperty(const String& name)
    63     {
    64         if (shouldIgnoreSetting(name))
    65             return String();
    66 
    67         GSettings* settings = inspectorGSettings();
    68         if (!settings)
    69             return String();
    70 
    71         GRefPtr<GVariant> variant = adoptGRef(g_settings_get_value(settings, name.utf8().data()));
    72         return String(g_variant_get_string(variant.get(), 0));
    73     }
    74 
    75     virtual void setProperty(const String& name, const String& value)
    76     {
    77         // Avoid setting unknown keys to avoid aborting the execution.
    78         if (shouldIgnoreSetting(name))
    79             return;
    80 
    81         GSettings* settings = inspectorGSettings();
    82         if (!settings)
    83             return;
    84 
    85         GRefPtr<GVariant> variant = adoptGRef(g_variant_new_string(value.utf8().data()));
    86         g_settings_set_value(settings, name.utf8().data(), variant.get());
    87     }
    88 #else
    89     virtual String getProperty(const String&)
    9052    {
    9153        notImplemented();
     
    9355    }
    9456
    95     virtual void setProperty(const String&, const String&)
     57    virtual void setProperty(const String& name, const String& value)
    9658    {
    9759        notImplemented();
    9860    }
    99 #endif // HAVE_GSETTINGS
    10061};
    10162
  • trunk/Source/WebKit/gtk/webkit/webkitwebinspector.cpp

    r100985 r108190  
    578578    priv->page->inspectorController()->evaluateForTestInFrontend(callId, script);
    579579}
    580 
    581 #ifdef HAVE_GSETTINGS
    582 static bool isSchemaAvailable(const char* schemaID)
    583 {
    584     const char* const* availableSchemas = g_settings_list_schemas();
    585     char* const* iter = const_cast<char* const*>(availableSchemas);
    586 
    587     while (*iter) {
    588         if (g_str_equal(schemaID, *iter))
    589             return true;
    590         iter++;
    591     }
    592 
    593     return false;
    594 }
    595 
    596 GSettings* inspectorGSettings()
    597 {
    598     static GSettings* settings = 0;
    599     if (settings)
    600         return settings;
    601 
    602     // Unfortunately GSettings will abort the process execution if the schema is not
    603     // installed, which is the case for when running tests, or even the introspection dump
    604     // at build time, so check if we have the schema before trying to initialize it.
    605     const gchar* schemaID = "org.webkitgtk-"WEBKITGTK_API_VERSION_STRING".inspector";
    606     if (!isSchemaAvailable(schemaID)) {
    607 
    608         // This warning is very common on the build bots, which hides valid warnings.
    609         // Skip printing it if we are running inside DumpRenderTree.
    610         if (!DumpRenderTreeSupportGtk::dumpRenderTreeModeEnabled())
    611             g_warning("GSettings schema not found - settings will not be used or saved.");
    612         return 0;
    613     }
    614 
    615     settings = g_settings_new(schemaID);
    616     return settings;
    617 }
    618 #endif
  • trunk/Source/WebKit/gtk/webkit/webkitwebinspectorprivate.h

    r95901 r108190  
    2626extern "C" {
    2727
    28 #ifdef HAVE_GSETTINGS
    29 GSettings* inspectorGSettings();
    30 #endif
    31 
    3228void webkit_web_inspector_set_inspector_client(WebKitWebInspector*, WebCore::Page*);
    3329
  • trunk/configure.ac

    r107565 r108190  
    13901390Source/WebKit/gtk/${WEBKITGTK_PC_NAME}-${WEBKITGTK_API_VERSION}.pc:Source/WebKit/gtk/webkit.pc.in
    13911391Source/WebKit/gtk/JSCore-${WEBKITGTK_API_VERSION}.gir:Source/WebKit/gtk/JSCore.gir.in
    1392 Source/WebKit/gtk/org.webkitgtk-${WEBKITGTK_API_VERSION}.gschema.xml:Source/WebKit/gtk/org.webkitgtk.gschema.xml.in
    13931392Source/JavaScriptCore/javascriptcoregtk-${WEBKITGTK_API_VERSION}.pc:Source/JavaScriptCore/javascriptcoregtk.pc.in
    13941393]
Note: See TracChangeset for help on using the changeset viewer.