[Webkit-unassigned] [Bug 99081] [GTK] Add user style sheet setting to WebKit2 GTK+ API

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 11 10:28:51 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=99081





--- Comment #8 from Carlos Garcia Campos <cgarcia at igalia.com>  2012-10-11 10:29:30 PST ---
(In reply to comment #5)
> (From update of attachment 168246 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=168246&action=review
> 
> Seems reasonable. It'd be nice to get the Apple guys to take a quick look at the new platform-independent WebKit2 parts.
> 
> > Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp:1082
> > +    g_object_class_install_property(gObjectClass,
> > +                                    PROP_USER_STYLE_SHEET_URI,
> > +                                    g_param_spec_string("user-style-sheet-uri",
> > +                                                        _("User Style Sheet URI"),
> > +                                                        _("The URI of a style sheet that is applied to every page."),
> > +                                                        0,
> > +                                                        readWriteConstructParamFlags));
> 
> This can be written as:
> 
> g_object_class_install_property(gObjectClass,PROP_USER_STYLE_SHEET_URI, g_param_spec_string(
>         "user-style-sheet-uri",
>          _("User Style Sheet URI"),
>          _("The URI of a style sheet that is applied to every page."),
>          0,
>          readWriteConstructParamFlags));
> 
> and it's still fairly readable.

And very inconsistent with the rest of the code in this file and all other files. We should add an exception to the style checker at least for GObject signal and properties declarations. 

> > Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp:2755
> > +    if (!g_strcmp0(priv->userStyleSheetURI.data(), uri))
> 
> Seems that you can just do:
> 
> if (priv->userStyleSheetURI.data() == uri)

We are using this in all other properties, but I don't remember why :-P

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list