Bug 44337 - [EFL] Added new callback when view's size is changed to fix issue with changing layout size
Summary: [EFL] Added new callback when view's size is changed to fix issue with changi...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit EFL (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-20 08:22 PDT by Mirek Szymanski
Modified: 2010-08-26 09:53 PDT (History)
6 users (show)

See Also:


Attachments
New callback for view size changed (1.11 KB, patch)
2010-08-20 08:42 PDT, Mirek Szymanski
no flags Details | Formatted Diff | Diff
New callback for view size changed (1.11 KB, patch)
2010-08-20 08:48 PDT, Mirek Szymanski
no flags Details | Formatted Diff | Diff
New callback for view size changed (1.62 KB, patch)
2010-08-26 06:37 PDT, Mirek Szymanski
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mirek Szymanski 2010-08-20 08:22:21 PDT
There is an issue while changing view's size and changing fixed layout size in event view:EVAS_CALLBACK_RESIZE.  The result was that scrollbar's max position was not calculated properly.

Basically ewk_view_fixed_layout_size_set() was triggering smart_calculate() in the backing store while FrameView did not have visible content size updated yet, so the scrollbar's max positions were computed incorrectly.  If we call ewk_view_fixed_layout_size_set() from the new callback, then the issue does not exist, because FrameView's visible content size is updated right before the callback function is called.

Thanks,
Miroslaw
Comment 1 Mirek Szymanski 2010-08-20 08:42:31 PDT
Created attachment 64959 [details]
New callback for view size changed
Comment 2 WebKit Review Bot 2010-08-20 08:44:18 PDT
Attachment 64959 [details] did not pass style-queue:

Failed to run "['WebKitTools/Scripts/check-webkit-style']" exit_code: 1
WebKit/efl/ewk/ewk_view.cpp:797:  Use 0 instead of NULL.  [readability/null] [5]
Total errors found: 1 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Mirek Szymanski 2010-08-20 08:48:37 PDT
Created attachment 64960 [details]
New callback for view size changed
Comment 4 Lucas De Marchi 2010-08-25 13:47:08 PDT
Comment on attachment 64960 [details]
New callback for view size changed

> diff --git a/WebKit/efl/ChangeLog b/WebKit/efl/ChangeLog
> index de65885..2887fd4 100644
> --- a/WebKit/efl/ChangeLog
> +++ b/WebKit/efl/ChangeLog
> @@ -1,3 +1,13 @@
> +2010-08-20  Miroslaw Szymanski  <miroslaw.s@samsung.com>
> +
> +        Reviewed by NOBODY (OOPS!).
> +
> +        [EFL] Added new callback when view's size is changed to fix issue with changing layout size
> +        https://bugs.webkit.org/show_bug.cgi?id=44337
> +
> +        * ewk/ewk_view.cpp:
> +        (_ewk_view_smart_calculate):
> +
>  2010-08-15  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
>  
>          Reviewed by Antonio Gomes.
> diff --git a/WebKit/efl/ewk/ewk_view.cpp b/WebKit/efl/ewk/ewk_view.cpp
> index 7a98bac..5e19386 100644
> --- a/WebKit/efl/ewk/ewk_view.cpp
> +++ b/WebKit/efl/ewk/ewk_view.cpp
> @@ -792,6 +792,9 @@ static void _ewk_view_smart_calculate(Evas_Object* o)
>          sd->changed.frame_rect = EINA_TRUE;
>          sd->view.w = w;
>          sd->view.h = h;
> +
> +        // This callback is a good place e.g. to change fixed layout size (ewk_view_fixed_layout_size_set)
> +        evas_object_smart_callback_call(o, "view,resized", 0);
>      }
>      sd->changed.size = EINA_FALSE;
>  

lgtm, except by the fact it's missing the documentation about the signal emitted. Please, fill the doc in ewk_view.h
Comment 5 Lucas De Marchi 2010-08-25 13:50:21 PDT
Comment on attachment 64960 [details]
New callback for view size changed

> diff --git a/WebKit/efl/ChangeLog b/WebKit/efl/ChangeLog
> index de65885..2887fd4 100644
> --- a/WebKit/efl/ChangeLog
> +++ b/WebKit/efl/ChangeLog
> @@ -1,3 +1,13 @@
> +2010-08-20  Miroslaw Szymanski  <miroslaw.s@samsung.com>
> +
> +        Reviewed by NOBODY (OOPS!).
> +
> +        [EFL] Added new callback when view's size is changed to fix issue with changing layout size
> +        https://bugs.webkit.org/show_bug.cgi?id=44337
> +
> +        * ewk/ewk_view.cpp:
> +        (_ewk_view_smart_calculate):
> +
>  2010-08-15  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
>  
>          Reviewed by Antonio Gomes.
> diff --git a/WebKit/efl/ewk/ewk_view.cpp b/WebKit/efl/ewk/ewk_view.cpp
> index 7a98bac..5e19386 100644
> --- a/WebKit/efl/ewk/ewk_view.cpp
> +++ b/WebKit/efl/ewk/ewk_view.cpp
> @@ -792,6 +792,9 @@ static void _ewk_view_smart_calculate(Evas_Object* o)
>          sd->changed.frame_rect = EINA_TRUE;
>          sd->view.w = w;
>          sd->view.h = h;
> +
> +        // This callback is a good place e.g. to change fixed layout size (ewk_view_fixed_layout_size_set)

And also this minor issue: comments must start with a capital letter and finish with a dot.
Comment 6 Antonio Gomes 2010-08-25 22:53:54 PDT
Mirek Szymanski are you going to upload a new patch with comments addressed?
Comment 7 Mirek Szymanski 2010-08-26 06:37:22 PDT
Created attachment 65552 [details]
New callback for view size changed

Thank you for comments. I've updated the patch.
Comment 8 Lucas De Marchi 2010-08-26 08:01:43 PDT
lgtm. You have my informal r+.
Comment 9 WebKit Commit Bot 2010-08-26 09:53:15 PDT
Comment on attachment 65552 [details]
New callback for view size changed

Clearing flags on attachment: 65552

Committed r66111: <http://trac.webkit.org/changeset/66111>
Comment 10 WebKit Commit Bot 2010-08-26 09:53:21 PDT
All reviewed patches have been landed.  Closing bug.