[Webkit-unassigned] [Bug 40278] [EFL] EFLWebKit doesn't support viewport meta tag

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jun 14 21:09:19 PDT 2010


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





--- Comment #26 from Gyuyoung Kim <gyuyoung.kim at samsung.com>  2010-06-14 21:09:16 PST ---
(In reply to comment #25)
> (In reply to comment #23)
> > Zoom range can be set via the ewk_view_zoom_range_set() as below,
> > +void ewk_view_zoom_range_set(...)
> > +{
> > +    priv->settings.zoom_range.min_scale = min_scale;
> > +    priv->settings.zoom_range.max_scale = max_scale;
> > +}
> > 
> > I needed to have min_scale, max_scale, init_scale and user_scalable respectively.
> 
> Missing sanity checks here, min_scale <= max_scale.
> 
> 
> > >+void ChromeClientEfl::didReceiveViewportArguments(Frame* frame, const ViewportArguments& arguments) const
> > >+{
> > >+    Eina_Bool userScalable;
> > >+
> > 
> > >+
> > >+    userScalable = (int)arguments.userScalable == 1 ? EINA_TRUE : EINA_FALSE;
> > >>You should check for arguments.userScalable == -1, not just == 1.
> > 
> > As you know, userScalable is boolean(yes or no) check if user can scale or not. So, I process it in the didReceiveViewportArguments directly. If userScalable is "1", user can scalable, If not so, user can't scalable. The user-scalable is defined as below,
> 
> WebCore/dom/ViewportArguments.h: 
> 
>     enum { ValueUndefined = -1 };
>     ...
>     userScalable(ValueUndefined)
> 
> so Lucas is right, must check for it being -1. The type of this variable is float (no idea why :-P).
> 
> 
> > +void   ewk_view_init_layout_completed_set(Evas_Object *o, Eina_Bool init_layout);
> > +Eina_Bool ewk_view_init_layout_completed_get(Evas_Object *o);
> > 
> > Do you think should we send viewport signal twice ?
> 
> No, but as he said this should be controlled in FrameLoaderClientEfl itself. No need to have these C-like functions in "ewk", just have them in WebCoreSupport/FrameLoaderClientEfl and use them from ChromeClientEfl.
> 
> 
> (In reply to comment #24)
> >>+EAPI void ewk_view_viewport_get(Evas_Object *o, int* w, int* h, float* init_scale, float* max_scale, float* min_scale, Eina_Bool* user_scalable);
> >>+EAPI void ewk_view_zoom_range_set(Evas_Object* o, float min_scale, float max_scale);
> >>+EAPI void ewk_view_user_scalable_set(Evas_Object* o, Eina_Bool user_scalable);
> >>> Missing the getters for these functions.
> >
> >One more thing,
> >Appliaction can get data regarding zoom_range and user_scalable by >ewk_view_viewport_get().
> 
> This is not correct. The function you said is about document/tag provided values, the one Lucas said is about user-set values (values one previously set before, or may be used to query the initial/default values). Will be of use particularly for debug. Make sure you follow the other functions and make the return pointers optional.
> 
> Patch is coming along nicely, most ready to be merged in my opinion (need some official reviewer to grant it).

Thank you your help, I will change this patch according to your guys soon.

-- 
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