RESOLVED WONTFIX Bug 104215
[WK2][EFL] Modify a zoom level setting on MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=104215
Summary [WK2][EFL] Modify a zoom level setting on MiniBrowser
KyungTae Kim
Reported 2012-12-05 22:13:39 PST
The scale setting of MiniBrowser from bug 99285 doesn't work properly now: 1) It need just increase/decrease current scale with a fixed value. (and need to check boundaries) - I fixed it. I suggest 2 alternatives - "increase/decrease by 10%" and "increase/decrease to nearest zoom level" 2) It works properly only on "legacy behavior mode". - On default behavior mode, when zoomed in, it fits back to viewport on PageViewportController by decreased m_effectiveScale - I try to use ewk_view_device_pixel_ratio_set instead of ewk_view_scale_set on that, but it's not work properly, too. 3) It doesn't work properly for scrolled contents. - I think ewk_view_scale_set need to calculate the scrolled position (like Tizen), but make APIs to get the scrolled position is another big job. (I think we can get it from PageViewportController) 4) It try to zoom like "pinch zoom", not "page zoom" like PC browser. - If page zoom API like suggested on bug 90548 can be introduced, I think I can use it. - If not, I think changing short key could solve the confusing. (like ctrl + wheel)
Attachments
Patch (7.03 KB, patch)
2012-12-05 22:59 PST, KyungTae Kim
kenneth: review-
KyungTae Kim
Comment 1 2012-12-05 22:59:36 PST
Kenneth Rohde Christiansen
Comment 2 2012-12-06 01:06:56 PST
Comment on attachment 177945 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=177945&action=review > Tools/MiniBrowser/efl/main.c:67 > +#if USE_ZOOM_LEVEL > #define DEFAULT_ZOOM_LEVEL 5 // Set default zoom level to 1.0 (index 5 on zoomLevels). > // The zoom values are chosen to be like in Mozilla Firefox 3. > const static float zoomLevels[] = {0.3, 0.5, 0.67, 0.8, 0.9, 1.0, 1.1, 1.2, 1.33, 1.5, 1.7, 2.0, 2.4, 3.0}; > > +static float > +get_scale_factor_from_zoom_levels(float currentScaleFactor, Zoom_Set_Mode mode) > +{ > + int i = 0; Why not just use percentage increase/decrease. What is the point of using those firefox values? I don't get it > Tools/MiniBrowser/efl/main.c:98 > + else > + currentScaleFactor = ewk_view_device_pixel_ratio_get(webview); This is wrong. You need the current scale. If the ewk_view_scale_set is setting effective scale and not css scale, it should include the pixel ratio. > Tools/MiniBrowser/efl/main.c:102 > +#if USE_ZOOM_LEVEL // Use pre-defined zoom level list > + scaleFactor = get_scale_factor_from_zoom_levels(currentScaleFactor, mode); > +#else // Just calculate from current scale factor Why have this at all? > Tools/MiniBrowser/efl/main.c:114 > + // Adjust scaleFactor to boundary. > + if (scaleFactor < 0.25) > + scaleFactor = 0.25; > + else if (scaleFactor > 4.0) > + scaleFactor = 4.0; What if the viewport meta tag says that you cannot scale at all? This code needs to cooperate with the PageViewportController. Maybe the set_scale method should take care of this internally and return bool if it succeeded or not > Tools/MiniBrowser/efl/main.c:120 > + if (legacy_behavior_enabled) { > + Evas_Coord ox, oy, mx, my, cx, cy; > + evas_pointer_canvas_xy_get(evas_object_evas_get(webview), &mx, &my); // Get current mouse position on window. > + evas_object_geometry_get(webview, &ox, &oy, NULL, NULL); // Get webview's position on window. Such code is ugly and that is why we can separate it out in functions > Tools/MiniBrowser/efl/main.c:122 > + cy = my - oy; // current y position = mouse y position - webview y position7 7 ?
Michael Catanzaro
Comment 3 2017-03-11 10:36:07 PST
Closing this bug because the EFL port has been removed from trunk. If you feel this bug applies to a different upstream WebKit port and was closed in error, please either update the title and reopen the bug, or leave a comment to request this.
Note You need to log in before you can comment on or make changes to this bug.