Changeset 108190 in webkit
- Timestamp:
- Feb 19, 2012 11:16:25 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 1 deleted
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r108189 r108190 1 2012-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 1 10 2012-02-19 Ryosuke Niwa <rniwa@webkit.org> 2 11 -
trunk/Source/WebKit/gtk/ChangeLog
r108151 r108190 1 2012-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 1 16 2012-02-17 Gyuyoung Kim <gyuyoung.kim@samsung.com> 2 17 -
trunk/Source/WebKit/gtk/GNUmakefile.am
r107854 r108190 386 386 && rm -f xgen-gtc 387 387 388 # GSettings389 gsettings_SCHEMAS = $(top_builddir)/Source/WebKit/gtk/org.webkitgtk-@WEBKITGTK_API_VERSION@.gschema.xml390 @GSETTINGS_RULES@391 392 388 EXTRA_DIST += \ 393 389 $(WebKit)/ChangeLog \ -
trunk/Source/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp
r106831 r108190 49 49 50 50 private: 51 #ifdef HAVE_GSETTINGS52 static bool shouldIgnoreSetting(const String& key)53 {54 // GSettings considers trying to fetch or set a setting that is55 // not backed by a schema as programmer error, and aborts the56 // program's execution. We check here to avoid having an unhandled57 // setting as a fatal error.58 LOG_VERBOSE(NotYetImplemented, "Unknown key ignored: %s", key.ascii().data());59 return true;60 }61 62 51 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 #else89 virtual String getProperty(const String&)90 52 { 91 53 notImplemented(); … … 93 55 } 94 56 95 virtual void setProperty(const String& , const String&)57 virtual void setProperty(const String& name, const String& value) 96 58 { 97 59 notImplemented(); 98 60 } 99 #endif // HAVE_GSETTINGS100 61 }; 101 62 -
trunk/Source/WebKit/gtk/webkit/webkitwebinspector.cpp
r100985 r108190 578 578 priv->page->inspectorController()->evaluateForTestInFrontend(callId, script); 579 579 } 580 581 #ifdef HAVE_GSETTINGS582 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 not603 // installed, which is the case for when running tests, or even the introspection dump604 // 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 26 26 extern "C" { 27 27 28 #ifdef HAVE_GSETTINGS29 GSettings* inspectorGSettings();30 #endif31 32 28 void webkit_web_inspector_set_inspector_client(WebKitWebInspector*, WebCore::Page*); 33 29 -
trunk/configure.ac
r107565 r108190 1390 1390 Source/WebKit/gtk/${WEBKITGTK_PC_NAME}-${WEBKITGTK_API_VERSION}.pc:Source/WebKit/gtk/webkit.pc.in 1391 1391 Source/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.in1393 1392 Source/JavaScriptCore/javascriptcoregtk-${WEBKITGTK_API_VERSION}.pc:Source/JavaScriptCore/javascriptcoregtk.pc.in 1394 1393 ]
Note: See TracChangeset
for help on using the changeset viewer.