Changeset 125680 in webkit
- Timestamp:
- Aug 15, 2012 9:20:39 AM (12 years ago)
- Location:
- trunk/Source/WebKit/blackberry
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/blackberry/Api/WebPage.cpp
r125678 r125680 2522 2522 // it'll still be clamped by the maxWidth below... 2523 2523 int width = std::max(absoluteVisibleOverflowSize().width(), contentsSize().width()); 2524 if (m_pendingOrientation != -1 && !m_nestedLayoutFinishedCount) 2525 width = 0; 2524 2526 2525 2527 if (snapToIncrement) { … … 3852 3854 } 3853 3855 3854 if (needsLayout)3855 setNeedsLayout();3856 3857 3856 // Need to resume so that the backingstore will start recording the invalidated 3858 3857 // rects from below. … … 3861 3860 // We might need to layout here to get a correct contentsSize so that zoomToFit 3862 3861 // is calculated correctly. 3863 requestLayoutIfNeeded(); 3862 while (needsLayout) { 3863 setNeedsLayout(); 3864 requestLayoutIfNeeded(); 3865 needsLayout = false; 3866 3867 // Emulate the zoomToFitWidthOnLoad algorithm if we're rotating. 3868 ++m_nestedLayoutFinishedCount; 3869 if (needsLayoutToFindContentSize) { 3870 if (setViewMode(viewMode())) 3871 needsLayout = true; 3872 } 3873 } 3874 m_nestedLayoutFinishedCount = 0; 3864 3875 3865 3876 // As a special case if we were zoomed to the initial scale at the beginning -
trunk/Source/WebKit/blackberry/ChangeLog
r125679 r125680 1 2012-08-15 Leo Yang <leoyang@rim.com> 2 3 [BlackBerry] Use nested layout when rotating 4 https://bugs.webkit.org/show_bug.cgi?id=94117 5 6 Partially patched by Arvid Nilsson. 7 8 Reviewed by George Staikos. 9 Reviewed internally by Arvid Nilsson. 10 11 When rotating the content width used for fixedLayoutSize is not 12 correct because we are changing the rotation and the content with 13 should be determined after layout. So we set the with to 0 if we 14 are rotating and beginning the nested layout. And in setViewportSize 15 we need a nested layout loop to trigger zoom-to-fit. 16 17 * Api/WebPage.cpp: 18 (BlackBerry::WebKit::WebPagePrivate::fixedLayoutSize): 19 (BlackBerry::WebKit::WebPagePrivate::setViewportSize): 20 1 21 2012-08-14 Antonio Gomes <agomes@rim.com> 2 22
Note: See TracChangeset
for help on using the changeset viewer.