Bug 108281 - [BlackBerry] Webpage was cut off after rotating to landscape and then rotating back to portrait on specific website
Summary: [BlackBerry] Webpage was cut off after rotating to landscape and then rotatin...
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit BlackBerry (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other Other
: P2 Major
Assignee: Nobody
Depends on:
Reported: 2013-01-29 18:38 PST by Xiaobo Wang
Modified: 2013-01-30 09:14 PST (History)
6 users (show)

See Also:

patch (2.31 KB, patch)
2013-01-29 18:56 PST, Xiaobo Wang
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Xiaobo Wang 2013-01-29 18:38:16 PST
PR 284985

Steps to Reproduce:
1)Launch browser
2)go to http://luotuo.tmall.com/ 
3)Wait until the full page is loaded, then rotate device to landscape mode
4) Rotate it back to portrait mode

Expected Results:

There is no rendering issue

Actual Results:

After step 4, the right side of the webpage was cut off.
Comment 1 Xiaobo Wang 2013-01-29 18:39:55 PST
When rotating back to portrait, WebPagePrivate::overflowExceedsContentsSize()
was called. It will call setViewMode(), in which we will get fixedLayoutSize()
and compare with the fixedLayoutSize in the FrameView. But
WebPagePrivate::fixedLaoutSize() returned wrong size because the width was
reset to 0 and then fallback to defaultLayoutSize.width(). 
        if (m_pendingOrientation != -1 && !m_nestedLayoutFinishedCount)
            width = 0;
Can be fixed by adding a check of m_overflowExceedsContentsSize, only reset
width if m_overflowExceedsContentsSize is not true.
Comment 2 Xiaobo Wang 2013-01-29 18:56:31 PST
Created attachment 185378 [details]
Comment 3 Rob Buis 2013-01-30 04:32:01 PST
Comment on attachment 185378 [details]

Comment 4 WebKit Review Bot 2013-01-30 09:14:01 PST
Comment on attachment 185378 [details]

Clearing flags on attachment: 185378

Committed r141276: <http://trac.webkit.org/changeset/141276>
Comment 5 WebKit Review Bot 2013-01-30 09:14:06 PST
All reviewed patches have been landed.  Closing bug.