[Webkit-unassigned] [Bug 40278] [EFL] EFLWebKit doesn't support viewport meta tag
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Jun 17 00:16:11 PDT 2010
Gyuyoung Kim <gyuyoung.kim at samsung.com> changed:
What |Removed |Added
Attachment #58867|0 |1
is obsolete| |
Attachment #58867|commit-queue?, review? |
Attachment #58966| |review?, commit-queue?
--- Comment #29 from Gyuyoung Kim <gyuyoung.kim at samsung.com> 2010-06-17 00:16:10 PST ---
Created an attachment (id=58966)
Thank you for your detail review. I modified this patch according to your points again.
>>I understood your point about using this function. However if you set the viewport on this function it will trigger a re-layout. I think the double signal you got on the other function is related to something else, since QT guys are using it with no problem (afaik).
I tried to understand the viewport patch for QT port. As far as I understand, the QT's patch sends signal regarding viewport in both cases there is viewport and no viewport before any visual layout of the page. And, QT's patch prohibits to set layout before finishing first layout. Because, to prevent re-layout.
void QWebPage::setPreferredContentsSize(const QSize& size) const
if (frame->d->initialLayoutComplete) // the initialLayoutComplete can be set on FrameLoaderClientQt::dispatchDidFirstLayout()
It means that application only can received data of viewport tag on callback function for viewport. Application can't set layout with viewport data as soon as viewport signal is received. Because, viewport tag should be located at <head>...</head>. The first layout is not finished on <head>...</head>. Thus, user needs to find good position in order to adjust viewport tag. It seems this can prevent re-layout because application only can decide if viewport is adjust or not. In other words, application is responsible for layout.
I modified this patch similar to QT port's patch and add an example code to adjust viewport tag as below,
* This is en example function to adjust viewport via viewport tag's arguments.
* Application can invoke this function in order to adjust viewport tag when it is required.
app = (ELauncher*) eina_list_data_get(windows);
ewk_view_fixed_layout_size_set(app->browser, app->viewport.w, app->viewport.h);
ewk_view_zoom_set(app->browser, app->viewport.initScale, 0, 0);
if (!ewk_view_zoom_range_set(app->browser, app->viewport.minScale, app->viewport.maxScale))
info(" Fail to set zoom range. minScale = %f, maxScale = %f\n", app->viewport.minScale, app->viewport.maxScale);
It seems to me that callback function regarding dispatchDidFirstVisuallyNonEmptyLayout() is best. Of course, user can decide to put the viewport_set().
I also prohibit to set layout before finishing first layout.
void ewk_view_fixed_layout_size_set(Evas_Object* o, Evas_Coord w, Evas_Coord h)
WebCore::FrameLoaderClientEfl* client = static_cast<WebCore::FrameLoaderClientEfl*>(priv->main_frame->loader()->client());
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