Bug 108281

Summary: [BlackBerry] Webpage was cut off after rotating to landscape and then rotating back to portrait on specific website
Product: WebKit Reporter: Xiaobo Wang <xiaobwang>
Component: WebKit BlackBerryAssignee: Nobody <webkit-unassigned>
Severity: Major CC: jkjiang, mifenton, rwlbuis, tonikitoo, webkit.review.bot, yong.li.webkit
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: Other   
Description Flags
patch none

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.