[webkit-gtk] WebKit2 zoom API

Martin Robinson mrobinson at webkit.org
Wed Dec 28 16:59:04 PST 2011


On Tue, Dec 27, 2011 at 11:50 PM, Carlos Garcia Campos
<cgarcia at igalia.com> wrote:

> I guess form controls are scaled because they contain text. The C API is
> WKPageSetTextZoomFactor(), the WebCore API is Frame::textZoomFactor()
> and Mac API is setTextSizeMultiplier() and the method
> _setZoomMultiplier() uses a preference called zoomsTextOnly to decide.

This seems like a reasonable name then. Another thing I think we
should at least discuss is that this API prevents having both a text
zoom and a full-page zoom concurrently. This is something that the C
API allows.

It seems that internally text and page zoom factors are per-frame
decisions, not per WebView. My guess is that this is why it doesn't
hang off of Settings.h. The more I look at this API, the less I see
any reason to deviate from the C API here.

What's wrong with this?

webkit_web_view_supports_page_zoom
webkit_web_view_set_page_zoom_factor
webkit_web_view_get_page_zoom_factor

webkit_web_view_supports_text_zoom
webkit_web_view_set_text_zoom_factor
webkit_web_view_get_text_zoom_factor

--Martin


More information about the webkit-gtk mailing list