Changeset 140869 in webkit
- Timestamp:
- Jan 25, 2013, 3:02:26 PM (12 years ago)
- Location:
- trunk/Source
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r140867 r140869 1 2013-01-25 Alexandre Elias <aelias@chromium.org> 2 3 Call FrameView::contentsResized() when setting fixed layout size 4 https://bugs.webkit.org/show_bug.cgi?id=107922 5 6 Reviewed by James Robinson. 7 8 In fixed layout mode, we should be calling contentsResized() when the 9 fixed layout size is changed; on the other hand, we don't need to layout 10 when the visible contents size changes. 11 12 This fixes test WebFrameTest::FixedLayoutInitializeAtMinimumPageScale. 13 14 * page/FrameView.cpp: 15 (WebCore::FrameView::visibleContentsResized): 16 * platform/ScrollView.cpp: 17 (WebCore::ScrollView::setFixedLayoutSize): 18 (WebCore::ScrollView::setUseFixedLayout): 19 1 20 2013-01-25 Tony Gentilcore <tonyg@chromium.org> 2 21 -
trunk/Source/WebCore/page/FrameView.cpp
r140571 r140869 2023 2023 return; 2024 2024 2025 if ( needsLayout())2025 if (!useFixedLayout() && needsLayout()) 2026 2026 layout(); 2027 2027 -
trunk/Source/WebCore/platform/ScrollView.cpp
r140571 r140869 278 278 m_fixedLayoutSize = newSize; 279 279 updateScrollbars(scrollOffset()); 280 if (m_useFixedLayout) 281 contentsResized(); 280 282 } 281 283 … … 291 293 m_useFixedLayout = enable; 292 294 updateScrollbars(scrollOffset()); 295 contentsResized(); 293 296 } 294 297 -
trunk/Source/WebKit/chromium/ChangeLog
r140850 r140869 1 2013-01-25 Alexandre Elias <aelias@chromium.org> 2 3 Call FrameView::contentsResized() when setting fixed layout size 4 https://bugs.webkit.org/show_bug.cgi?id=107922 5 6 Reviewed by James Robinson. 7 8 In fixed layout mode, we should be calling contentsResized() when the 9 fixed layout size is changed; on the other hand, we don't need to layout 10 when the visible contents size changes. 11 12 This fixes test WebFrameTest::FixedLayoutInitializeAtMinimumPageScale. 13 14 * src/WebViewImpl.cpp: 15 (WebKit::WebViewImpl::resize): 16 (WebKit::WebViewImpl::computePageScaleFactorLimits): 17 * tests/WebFrameTest.cpp: 18 1 19 2013-01-25 Alec Flett <alecflett@chromium.org> 2 20 -
trunk/Source/WebKit/chromium/src/WebViewImpl.cpp
r140808 r140869 1652 1652 #if ENABLE(VIEWPORT) 1653 1653 if (settings()->viewportEnabled()) { 1654 if (!settingsImpl()->applyPageScaleFactorInCompositor()) {1655 // Relayout immediately to obtain the new content width, which is needed1656 // to calculate the minimum scale limit.1657 view->layout();1658 }1659 1654 computePageScaleFactorLimits(); 1660 1655 … … 3089 3084 FrameView* view = page()->mainFrame()->view(); 3090 3085 3086 // Layout to refresh to the latest contents width. 3087 if (view->needsLayout()) 3088 view->layout(); 3089 3091 3090 m_minimumPageScaleFactor = min(max(m_pageDefinedMinimumPageScaleFactor, minPageScaleFactor), maxPageScaleFactor); 3092 3091 m_maximumPageScaleFactor = max(min(m_pageDefinedMaximumPageScaleFactor, maxPageScaleFactor), minPageScaleFactor); -
trunk/Source/WebKit/chromium/tests/WebFrameTest.cpp
r140076 r140869 239 239 WebView* webView = static_cast<WebView*>(FrameTestHelpers::createWebViewAndLoad(m_baseURL + "no_viewport_tag.html", true, 0, &client)); 240 240 241 webView->settings()->setApplyDeviceScaleFactorInCompositor(true); 242 webView->settings()->setApplyPageScaleFactorInCompositor(true); 241 243 webView->settings()->setViewportEnabled(true); 242 244 webView->enableFixedLayoutMode(true); … … 246 248 EXPECT_EQ(2, webView->deviceScaleFactor()); 247 249 248 // Device scale factor should be a component of page scale factor in fixed-layout, so a scale of 1 becomes 2.250 // Page scale factor should not be affected by device scale factor. 249 251 webView->setPageScaleFactorLimits(1, 2); 250 EXPECT_EQ( 2, webView->pageScaleFactor());252 EXPECT_EQ(1, webView->pageScaleFactor()); 251 253 252 254 // Force the layout to happen before leaving the test. … … 254 256 } 255 257 256 // Test is disabled because it started failing after r140025. 257 // See bug for details: webkit.org/b/107206. 258 TEST_F(WebFrameTest, DISABLED_FixedLayoutInitializeAtMinimumPageScale) 258 TEST_F(WebFrameTest, FixedLayoutInitializeAtMinimumPageScale) 259 259 { 260 260 registerMockedHttpURLLoad("fixed_layout.html"); … … 268 268 // only becomes available after the load begins. 269 269 WebViewImpl* webViewImpl = static_cast<WebViewImpl*>(FrameTestHelpers::createWebViewAndLoad(m_baseURL + "fixed_layout.html", true, 0, &client)); 270 webViewImpl->settings()->setApplyDeviceScaleFactorInCompositor(true); 271 webViewImpl->settings()->setApplyPageScaleFactorInCompositor(true); 270 272 webViewImpl->enableFixedLayoutMode(true); 271 273 webViewImpl->settings()->setViewportEnabled(true);
Note:
See TracChangeset
for help on using the changeset viewer.