[Webkit-unassigned] [Bug 185381] Remove Document#selectedStylesheetSet/preferredStylesheetSet
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri May 11 07:06:06 PDT 2018
https://bugs.webkit.org/show_bug.cgi?id=185381
--- Comment #8 from Michael Catanzaro <mcatanzaro at igalia.com> ---
Comment on attachment 340137
--> https://bugs.webkit.org/attachment.cgi?id=340137
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=340137&action=review
> Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentGtk.cpp:-134
> - DOM_DOCUMENT_PROP_PREFERRED_STYLESHEET_SET,
> - DOM_DOCUMENT_PROP_SELECTED_STYLESHEET_SET,
For GTK, the public methods and properties can never be removed. But since it's quite likely that no applications have ever used these, and they are already deprecated, it would be fine to make them do nothing and print a runtime warning. In the unlikely event it breaks an application, we can deal with it.
> Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentGtk.cpp:-185
> - case DOM_DOCUMENT_PROP_SELECTED_STYLESHEET_SET:
> - webkit_dom_document_set_selected_stylesheet_set(self, g_value_get_string(value));
> - break;
case DOM_DOCUMENT_PROP_SELECTED_STYLESHEET_SET:
g_warning("%s: The selected-stylesheet-set property has been removed and no longer works.", __func__);
break;
> Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentGtk.cpp:-298
> - case DOM_DOCUMENT_PROP_PREFERRED_STYLESHEET_SET:
> - g_value_take_string(value, webkit_dom_document_get_preferred_stylesheet_set(self));
> - break;
> - case DOM_DOCUMENT_PROP_SELECTED_STYLESHEET_SET:
> - g_value_take_string(value, webkit_dom_document_get_selected_stylesheet_set(self));
> - break;
Ditto.
> Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentGtk.cpp:-700
> - g_object_class_install_property(
> - gobjectClass,
> - DOM_DOCUMENT_PROP_PREFERRED_STYLESHEET_SET,
> - g_param_spec_string(
> - "preferred-stylesheet-set",
> - "Document:preferred-stylesheet-set",
> - "read-only gchar* Document:preferred-stylesheet-set",
> - "",
> - WEBKIT_PARAM_READABLE));
> -
> - g_object_class_install_property(
> - gobjectClass,
> - DOM_DOCUMENT_PROP_SELECTED_STYLESHEET_SET,
> - g_param_spec_string(
> - "selected-stylesheet-set",
> - "Document:selected-stylesheet-set",
> - "read-write gchar* Document:selected-stylesheet-set",
> - "",
> - WEBKIT_PARAM_READWRITE));
> -
Leave these.
> Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentGtk.cpp:-1794
> - WebCore::JSMainThreadNullState state;
> - g_return_val_if_fail(WEBKIT_DOM_IS_DOCUMENT(self), 0);
> - WebCore::Document* item = WebKit::core(self);
> - gchar* result = convertToUTF8String(item->preferredStylesheetSet());
> - return result;
{
g_warning("%s: this function has been removed and does nothing", __func__);
return nullptr;
}
> Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentGtk.cpp:-1814
> -gchar* webkit_dom_document_get_selected_stylesheet_set(WebKitDOMDocument* self)
> -{
> - WebCore::JSMainThreadNullState state;
> - g_return_val_if_fail(WEBKIT_DOM_IS_DOCUMENT(self), 0);
> - WebCore::Document* item = WebKit::core(self);
> - gchar* result = convertToUTF8String(item->selectedStylesheetSet());
> - return result;
> -}
> -
> -void webkit_dom_document_set_selected_stylesheet_set(WebKitDOMDocument* self, const gchar* value)
> -{
> - WebCore::JSMainThreadNullState state;
> - g_return_if_fail(WEBKIT_DOM_IS_DOCUMENT(self));
> - g_return_if_fail(value);
> - WebCore::Document* item = WebKit::core(self);
> - WTF::String convertedValue = WTF::String::fromUTF8(value);
> - item->setSelectedStylesheetSet(convertedValue);
> -}
Ditto.
> Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/docs/webkitdomgtk-4.0-sections.txt:-501
> -webkit_dom_document_get_preferred_stylesheet_set
> -webkit_dom_document_get_selected_stylesheet_set
> -webkit_dom_document_set_selected_stylesheet_set
Leave these.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180511/867ac870/attachment-0001.html>
More information about the webkit-unassigned
mailing list