Changeset 246920 in webkit
- Timestamp:
- Jun 27, 2019 8:22:29 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r246919 r246920 1 2019-06-27 Zalan Bujtas <zalan@apple.com> 2 3 REGRESSION(r244633): e-mail with "height: 100%" causes unstable layout. 4 https://bugs.webkit.org/show_bug.cgi?id=199303 5 <rdar://problem/51340927> 6 7 Reviewed by Tim Horton. 8 9 This patch restores the previous behavior (pre r244633) where we intentionally reported stale content size value to 10 avoid unstable layout for content like height: 100px. 11 12 * page/FrameView.cpp: 13 (WebCore::FrameView::autoSizeIfEnabled): 14 1 15 2019-06-27 Fujii Hironori <Hironori.Fujii@sony.com> 2 16 -
trunk/Source/WebCore/page/FrameView.cpp
r246285 r246920 3469 3469 document->updateStyleIfNeeded(); 3470 3470 document->updateLayoutIgnorePendingStylesheets(); 3471 3472 auto currentContentsSize = this->contentsSize(); 3473 auto finalWidth = std::max(m_autoSizeConstraint.width(), currentContentsSize.width()); 3474 auto finalHeight = m_autoSizeFixedMinimumHeight ? std::max(m_autoSizeFixedMinimumHeight, currentContentsSize.height()) : currentContentsSize.height(); 3471 // While the final content size could slightly be different after the next resize/layout (see below), we intentionally save and report 3472 // the current value to avoid unstable layout (e.g. content "height: 100%"). 3473 // See also webkit.org/b/173561 3474 m_autoSizeContentSize = contentsSize(); 3475 3476 auto finalWidth = std::max(m_autoSizeConstraint.width(), m_autoSizeContentSize.width()); 3477 auto finalHeight = m_autoSizeFixedMinimumHeight ? std::max(m_autoSizeFixedMinimumHeight, m_autoSizeContentSize.height()) : m_autoSizeContentSize.height(); 3475 3478 resize(finalWidth, finalHeight); 3476 3479 document->updateLayoutIgnorePendingStylesheets(); 3477 m_autoSizeContentSize = contentsSize();3478 3480 if (auto* page = frame().page()) 3479 3481 page->chrome().client().intrinsicContentsSizeChanged(m_autoSizeContentSize); -
trunk/Tools/ChangeLog
r246892 r246920 1 2019-06-27 Zalan Bujtas <zalan@apple.com> 2 3 REGRESSION(r244633): e-mail with "height: 100%" causes unstable layout. 4 https://bugs.webkit.org/show_bug.cgi?id=199303 5 <rdar://problem/51340927> 6 7 Reviewed by Tim Horton. 8 9 * TestWebKitAPI/Tests/WebKitCocoa/AutoLayoutIntegration.mm: 10 (TEST): 11 1 12 2019-06-27 Beth Dakin <bdakin@apple.com> 2 13 -
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/AutoLayoutIntegration.mm
r244633 r246920 164 164 // the intrinsic size change callback. 165 165 [webView _setShouldExpandContentToViewHeightForAutoLayout:YES]; 166 [webView load:@"<div class='large'></div>" withWidth:50 expectingContentSize:NSMakeSize(100, 1000) resettingWidth:NO]; 166 // 100px _is_the_expected_ height because we intentionally report stale value to avoid unstable layout. 167 // See FrameView::autoSizeIfEnabled(). 168 [webView load:@"<div class='large'></div>" withWidth:50 expectingContentSize:NSMakeSize(100, 100) resettingWidth:NO]; 167 169 [webView evaluateJavaScript:@"window.innerHeight" completionHandler:^(id value, NSError *error) { 168 170 EXPECT_TRUE([value isKindOfClass:[NSNumber class]]);
Note: See TracChangeset
for help on using the changeset viewer.