[Webkit-unassigned] [Bug 40278] [EFL] EFLWebKit doesn't support viewport meta tag
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Jun 24 20:31:48 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=40278
Lucas De Marchi <lucas.demarchi at profusion.mobi> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #59719|commit-queue? |commit-queue-
Flag| |
--- Comment #39 from Lucas De Marchi <lucas.demarchi at profusion.mobi> 2010-06-24 20:31:47 PST ---
(From update of attachment 59719)
>Index: WebKit/efl/EWebLauncher/main.c
>===================================================================
>--- WebKit/efl/EWebLauncher/main.c (revision 61229)
>+++ WebKit/efl/EWebLauncher/main.c (working copy)
>@@ -47,6 +47,9 @@
>
> #define DEFAULT_WIDTH 800
> #define DEFAULT_HEIGHT 600
>+#define DEFAULT_ZOOM_INIT 1.0
>+#define DEFAULT_ZOOM_MIN 1.0
>+#define DEFAULT_ZOOM_MAX 1.0
Suppose the following scenario:
1. The function on_viewport_changed() is implemented by browser to cover the case in which there's a viewport meta tag.
2. You go to a website that doesn't use the tag;
3. As WebKit always sends the notification about viewport (even if the meta tag doesn't exist), a notification will arrive with all fields == -1.0.
4. At that time the browser will call on_viewport_changed() and you will set
+ if ((int)initScale == -1)
+ initScale = DEFAULT_ZOOM_INIT;
+ if ((int)minScale == -1)
+ minScale = DEFAULT_ZOOM_MIN;
+ if ((int)maxScale == -1)
+ maxScale = DEFAULT_ZOOM_MAX
5. What happens now if browser tries to zoom in and call ewk_view_zoom_set()?
+ if (zoom > priv->settings.zoom_range.max_scale) {
+ WRN("zoom level is > %f : %f", (double)priv->settings.zoom_range.max_scale, (double)zoom);
return EINA_FALSE;
}
But:
maxScale == DEFAULT_ZOOM_MAX == 1.0
Bang! Browser can't zoom in anymore. With the same reasoning, it can't zoom out neither. This is why you have to set ZOOM_MIN and ZOOM_MAX to the same values of webkit or add the proper APIs as I've suggested.
--
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