[webkit-reviews] review denied: [Bug 68996] [GTK][WEBKIT2] Add Font and Encoding properties to WebKitWebSettings. : [Attachment 109142] Font and encoding related properties.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 20 23:25:49 PDT 2011


Martin Robinson <mrobinson at webkit.org> has denied Nayan Kumar K
<nayankk at motorola.com>'s request for review:
Bug 68996: [GTK][WEBKIT2] Add Font and Encoding properties to
WebKitWebSettings.
https://bugs.webkit.org/show_bug.cgi?id=68996

Attachment 109142: Font and encoding related properties.
https://bugs.webkit.org/attachment.cgi?id=109142&action=review

------- Additional Comments from Martin Robinson <mrobinson at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=109142&action=review


this patch needs to be updated to reflect the current state of the tree.
WebKitWebSettings is now called WebKitSettings and the testing looks a bit
different.

> Source/WebKit2/UIProcess/API/gtk/WebKitWebSettings.cpp:62
> +	   WKStringRef defaultFontFamilyRef =
WKPreferencesCopyStandardFontFamily(preferences);
> +	   defaultFontFamily = 
WebKit::toImpl(defaultFontFamilyRef)->string().utf8();
> +	   WKRelease(defaultFontFamilyRef);
> +
> +	   WKStringRef monospaceFontFamilyRef =
WKPreferencesCopyFixedFontFamily(preferences);
> +	   monospaceFontFamily =
WebKit::toImpl(monospaceFontFamilyRef)->string().utf8();
> +	   WKRelease(monospaceFontFamilyRef);
> +
> +	   WKStringRef serifFontFamilyRef =
WKPreferencesCopySerifFontFamily(preferences);

Please use smart pointers to hold these values and move this initialization to
the GObject instance initialization.

> Source/WebKit2/UIProcess/API/gtk/WebKitWebSettings.cpp:300
> +    WEBKIT_WEB_SETTINGS(gObject)->priv->~_WebKitWebSettingsPrivate();
> +    G_OBJECT_CLASS(webkit_web_settings_parent_class)->finalize(gObject);

You are not freeing the WKPreferences object here! Better to store it in the
private section as a smart pointer so this happens automatically.

> Source/WebKit2/UIProcess/API/gtk/WebKitWebSettings.cpp:508
> +							   _("Default Font
Family"),

Why is this Title Cased?

> Source/WebKit2/UIProcess/API/gtk/WebKitWebSettings.cpp:522
> +							   _("Monospace Font
Family"),

Ditto.

> Source/WebKit2/UIProcess/API/gtk/WebKitWebSettings.cpp:536
> +							   _("Serif Font
Family"),

Ditto and continued below.

> Source/WebKit2/UIProcess/API/gtk/WebKitWebSettings.cpp:600
> +    * The default font size used to display text.

You should say explicitly that this font size is in pixels.

> Source/WebKit2/UIProcess/API/gtk/WebKitWebSettings.cpp:608
> +							 5, G_MAXINT, 12,

Why the arbitrary minimum bottom limit on font size?

> Source/WebKit2/UIProcess/API/gtk/WebKitWebSettings.cpp:623
> +    *
> +    * The default font size used to display monospace text.
> +    *
> +    */
> +    g_object_class_install_property(gObjectClass,
> +				       PROP_DEFAULT_MONOSPACE_FONT_SIZE,
> +				      
g_param_spec_uint("default-monospace-font-size",
> +							 _("Default Monospace
Font Size"),
> +							 _("The default font
size used to display monospace text."),
> +							 5, G_MAXINT, 10,

Ditto.

> Source/WebKit2/UIProcess/API/gtk/WebKitWebSettings.cpp:629
> +    * The minimum font size used to display text.

You should say this is in points and also mention that choosing a value other
than 0 can break the layout of some sites.

> Source/WebKit2/UIProcess/API/gtk/WebKitWebSettings.cpp:637
> +							 0, G_MAXINT, 5,

The default minimum font size should be zero, I think. Why 5?

> Source/WebKit2/UIProcess/API/gtk/WebKitWebSettings.cpp:645
> +    * WebKitWebSettings:default-encoding
> +    *
> +    * The default encoding used to display text.
> +    *
> +    */

I believe Carlos used "charset" in another patch. Whatever it is, we need to
make the name standard.

> Source/WebKit2/UIProcess/API/gtk/WebKitWebSettings.cpp:651
> +							   "iso-8859-1",

Why did you choose this encoding as the default?

> Source/WebKit2/UIProcess/API/gtk/WebKitWebSettings.cpp:1175
> + * Get property #Object:default-font-family.

The format should be:

(Get/Set) the #WebKitSettings:default-font-family-property.

for all of these getters and setters.


More information about the webkit-reviews mailing list