Changeset 68918 in webkit


Ignore:
Timestamp:
Oct 1, 2010 1:05:16 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2010-10-01 Rafael Antognolli <antognolli@profusion.mobi>

Reviewed by Kenneth Rohde Christiansen.

[EFL] Call contents_resize when the main frame gets resized.
https://bugs.webkit.org/show_bug.cgi?id=47004

The previous implementation was just calling contents_resize when the
viewport size had changed. That's not enough, and contents_resize
shouldn't be called if the contents size didn't change.

Now the contents_size_changed function is called directly from the
ChromeClientEfl.

  • WebCoreSupport/ChromeClientEfl.cpp: (WebCore::ChromeClientEfl::contentsSizeChanged):
  • ewk/ewk_private.h:
  • ewk/ewk_view.cpp: (_ewk_view_smart_calculate): (ewk_view_fixed_layout_size_set): (ewk_view_contents_size_changed):
Location:
trunk/WebKit/efl
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/efl/ChangeLog

    r68652 r68918  
     12010-10-01  Rafael Antognolli  <antognolli@profusion.mobi>
     2
     3        Reviewed by Kenneth Rohde Christiansen.
     4
     5        [EFL] Call contents_resize when the main frame gets resized.
     6        https://bugs.webkit.org/show_bug.cgi?id=47004
     7
     8        The previous implementation was just calling contents_resize when the
     9        viewport size had changed. That's not enough, and contents_resize
     10        shouldn't be called if the contents size didn't change.
     11
     12        Now the contents_size_changed function is called directly from the
     13        ChromeClientEfl.
     14
     15        * WebCoreSupport/ChromeClientEfl.cpp:
     16        (WebCore::ChromeClientEfl::contentsSizeChanged):
     17        * ewk/ewk_private.h:
     18        * ewk/ewk_view.cpp:
     19        (_ewk_view_smart_calculate):
     20        (ewk_view_fixed_layout_size_set):
     21        (ewk_view_contents_size_changed):
     22
    1232010-09-29  João Paulo Rechi Vita  <jprvita@profusion.mobi>
    224
  • trunk/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp

    r64513 r68918  
    320320{
    321321    ewk_frame_contents_size_changed(kit(frame), size.width(), size.height());
     322    if (ewk_view_frame_main_get(m_view) == kit(frame))
     323        ewk_view_contents_size_changed(m_view, size.width(), size.height());
    322324}
    323325
  • trunk/WebKit/efl/ewk/ewk_private.h

    r65163 r68918  
    151151Eina_Bool ewk_view_navigation_policy_decision(Evas_Object* o, Ewk_Frame_Resource_Request* request);
    152152
     153void ewk_view_contents_size_changed(Evas_Object *o, Evas_Coord w, Evas_Coord h);
     154
    153155#ifdef __cplusplus
    154156
  • trunk/WebKit/efl/ewk/ewk_view.cpp

    r68363 r68918  
    806806            view->forceLayout();
    807807            view->adjustViewSize();
    808             IntSize size = view->contentsSize();
    809             if (!sd->api->contents_resize(sd, size.width(), size.height()))
    810                 ERR("failed to resize contents to %dx%d",
    811                     size.width(), size.height());
    812808        }
    813809        evas_object_resize(sd->main_frame, w, h);
     
    42144210    return sd->api->navigation_policy_decision(sd, request);
    42154211}
     4212
     4213/**
     4214 * @internal
     4215 * Reports that the contents have resized. The ewk_view calls contents_resize,
     4216 * which can be reimplemented as needed.
     4217 *
     4218 * @param o view.
     4219 * @param w new content width.
     4220 * @param h new content height.
     4221 */
     4222void ewk_view_contents_size_changed(Evas_Object *o, int w, int h)
     4223{
     4224    EWK_VIEW_SD_GET_OR_RETURN(o, sd);
     4225    EINA_SAFETY_ON_NULL_RETURN(sd->api);
     4226    EINA_SAFETY_ON_NULL_RETURN(sd->api->contents_resize);
     4227
     4228    if (!sd->api->contents_resize(sd, w, h))
     4229        ERR("failed to resize contents to %dx%d", w, h);
     4230}
Note: See TracChangeset for help on using the changeset viewer.