[webkit-gtk] WebKit2 zoom API

Martin Robinson mrobinson at webkit.org
Thu Dec 29 00:31:05 PST 2011

On Thu, Dec 29, 2011 at 12:11 AM, Carlos Garcia Campos
<cgarcia at igalia.com> wrote:
> so, if we decide to add zoom_in/out methods we would end up with 4
> methods more, text_zoom_in/out and page_zoom_in/out. I find it very
> confusing, users expose only one zoom control in their UIs and they
> decide whether it affects only the text or not, but I can't think of any
> use case where it's needed to change both at the same time or even
> expose two zoom controls (one for text and one for the page).

Perhaps I am mistaken, but after reading the API it seems that some
types of documents do not support text zoom (thus the
WKPageSupportsTextZoom method). Matching the full C API here allows a
client to prefer text zooms, but resort to full content zoom when the
document does not support it. Zoom type as a property on
WebKitSettings prevents properly handling this case, unecessarily
limits the API in relation to what WebCore can do and, in my opinion,
doesn't make it any more clear. The API consumer would still need to
understand the difference between full page zoom and text only zoom.

I would prefer an approach that doesn't expose text-only zoom at all,
rather than exposing it in a slightly broken way. I don't mean to hold
up your work here, but I think the C API is designed this way for a


More information about the webkit-gtk mailing list