Changeset 110076 in webkit


Ignore:
Timestamp:
Mar 7, 2012 11:23:44 AM (12 years ago)
Author:
commit-queue@webkit.org
Message:

[BlackBerry] WebKit rendering problem when show/hide VKB
https://bugs.webkit.org/show_bug.cgi?id=80448
RIM PR: 141727

Patch by Jacky Jiang <zhajiang@rim.com> on 2012-03-07
Reviewed by Antonio Gomes.

When setting viewport size, layout happens inside
WebPagePrivate::setDefaultLayoutSize(), in this way, the layout is
outside of the code path of "needsLayout" so that the contents are
not rendered into the backing store. This is a regression of r108718,
switch back to do the layout inside the public API
WebPage::setDefaultLayoutSize().

We haven't upstreamed the manual tests directory yet, therefore,
the new manual test case will be upstreamed later.

  • Api/WebPage.cpp:

(BlackBerry::WebKit::WebPagePrivate::setDefaultLayoutSize):
(BlackBerry::WebKit::WebPage::setDefaultLayoutSize):

Location:
trunk/Source/WebKit/blackberry
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/blackberry/Api/WebPage.cpp

    r109926 r110076  
    33793379void WebPagePrivate::setDefaultLayoutSize(const IntSize& size)
    33803380{
    3381     if (size == m_defaultLayoutSize)
    3382         return;
    3383 
    33843381    IntSize screenSize = Platform::Graphics::Screen::primaryScreen()->size();
    33853382    ASSERT(size.width() <= screenSize.width() && size.height() <= screenSize.height());
    33863383    m_defaultLayoutSize = size.expandedTo(minimumLayoutSize).shrunkTo(screenSize);
    3387 
    3388     bool needsLayout = setViewMode(viewMode());
     3384}
     3385
     3386void WebPage::setDefaultLayoutSize(int width, int height)
     3387{
     3388    IntSize size(width, height);
     3389    if (size == d->m_defaultLayoutSize)
     3390        return;
     3391
     3392    d->setDefaultLayoutSize(size);
     3393    bool needsLayout = d->setViewMode(d->viewMode());
    33893394    if (needsLayout) {
    3390         setNeedsLayout();
    3391         if (!isLoading())
    3392             requestLayoutIfNeeded();
    3393     }
    3394 }
    3395 
    3396 void WebPage::setDefaultLayoutSize(int width, int height)
    3397 {
    3398     IntSize size(width, height);
    3399     d->setDefaultLayoutSize(size);
     3395        d->setNeedsLayout();
     3396        if (!d->isLoading())
     3397            d->requestLayoutIfNeeded();
     3398    }
    34003399}
    34013400
  • trunk/Source/WebKit/blackberry/ChangeLog

    r110023 r110076  
     12012-03-07  Jacky Jiang  <zhajiang@rim.com>
     2
     3        [BlackBerry] WebKit rendering problem when show/hide VKB
     4        https://bugs.webkit.org/show_bug.cgi?id=80448
     5        RIM PR: 141727
     6
     7        Reviewed by Antonio Gomes.
     8
     9        When setting viewport size, layout happens inside
     10        WebPagePrivate::setDefaultLayoutSize(), in this way, the layout is
     11        outside of the code path of "needsLayout" so that the contents are
     12        not rendered into the backing store. This is a regression of r108718,
     13        switch back to do the layout inside the public API
     14        WebPage::setDefaultLayoutSize().
     15
     16        We haven't upstreamed the manual tests directory yet, therefore,
     17        the new manual test case will be upstreamed later.
     18
     19        * Api/WebPage.cpp:
     20        (BlackBerry::WebKit::WebPagePrivate::setDefaultLayoutSize):
     21        (BlackBerry::WebKit::WebPage::setDefaultLayoutSize):
     22
    1232012-03-06  Lianghui Chen  <liachen@rim.com>
    224
Note: See TracChangeset for help on using the changeset viewer.