WebKit Bugzilla
Attachment 373076 Details for
Bug 199303
: REGRESSION(r244633): e-mail with "height: 100%" causes unstable layout.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-199303-20190627192337.patch (text/plain), 4.35 KB, created by
zalan
on 2019-06-27 19:23:38 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
zalan
Created:
2019-06-27 19:23:38 PDT
Size:
4.35 KB
patch
obsolete
>Subversion Revision: 246791 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 704f598299e11482f5d1b3128e2bceebc42ab192..7da6bad8c4ae2dd49ff9eedee7a2e460607f9b89 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,17 @@ >+2019-06-27 Zalan Bujtas <zalan@apple.com> >+ >+ REGRESSION(r244633): e-mail with "height: 100%" causes unstable layout. >+ https://bugs.webkit.org/show_bug.cgi?id=199303 >+ <rdar://problem/51340927> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ This patch restores the previous behavior (pre r244633) where we intentionally reported stale content size value to >+ avoid unstable layout for content like height: 100px. >+ >+ * page/FrameView.cpp: >+ (WebCore::FrameView::autoSizeIfEnabled): >+ > 2019-06-25 Michael Catanzaro <mcatanzaro@igalia.com> > > Add user agent quirk for bankofamerica.com >diff --git a/Source/WebCore/page/FrameView.cpp b/Source/WebCore/page/FrameView.cpp >index c02645ba5b8608404cf9076e7d2e9c3eec8619ec..8b0de6bc6cc4733be9ed7e0c86f1da2c53771c48 100644 >--- a/Source/WebCore/page/FrameView.cpp >+++ b/Source/WebCore/page/FrameView.cpp >@@ -3468,13 +3468,15 @@ void FrameView::autoSizeIfEnabled() > Ref<FrameView> protectedThis(*this); > document->updateStyleIfNeeded(); > document->updateLayoutIgnorePendingStylesheets(); >+ // While the final content size could slightly be different after the next resize/layout (see below), we intentionally save and report >+ // the current value to avoid unstable layout (e.g. content "height: 100%"). >+ // See also webkit.org/b/173561 >+ m_autoSizeContentSize = contentsSize(); > >- auto currentContentsSize = this->contentsSize(); >- auto finalWidth = std::max(m_autoSizeConstraint.width(), currentContentsSize.width()); >- auto finalHeight = m_autoSizeFixedMinimumHeight ? std::max(m_autoSizeFixedMinimumHeight, currentContentsSize.height()) : currentContentsSize.height(); >+ auto finalWidth = std::max(m_autoSizeConstraint.width(), m_autoSizeContentSize.width()); >+ auto finalHeight = m_autoSizeFixedMinimumHeight ? std::max(m_autoSizeFixedMinimumHeight, m_autoSizeContentSize.height()) : m_autoSizeContentSize.height(); > resize(finalWidth, finalHeight); > document->updateLayoutIgnorePendingStylesheets(); >- m_autoSizeContentSize = contentsSize(); > if (auto* page = frame().page()) > page->chrome().client().intrinsicContentsSizeChanged(m_autoSizeContentSize); > m_didRunAutosize = true; >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 0d8e02f60f441321cc3397dc1dc001f1f20b7251..e6739ea1182032f8d27aa8c0ea918a3c35405fab 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,14 @@ >+2019-06-27 Zalan Bujtas <zalan@apple.com> >+ >+ REGRESSION(r244633): e-mail with "height: 100%" causes unstable layout. >+ https://bugs.webkit.org/show_bug.cgi?id=199303 >+ <rdar://problem/51340927> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * TestWebKitAPI/Tests/WebKitCocoa/AutoLayoutIntegration.mm: >+ (TEST): >+ > 2019-06-25 Michael Catanzaro <mcatanzaro@igalia.com> > > Add user agent quirk for bankofamerica.com >diff --git a/Tools/TestWebKitAPI/Tests/WebKitCocoa/AutoLayoutIntegration.mm b/Tools/TestWebKitAPI/Tests/WebKitCocoa/AutoLayoutIntegration.mm >index a8221080a0d29bfffa2cc92550e2f23070e8e4bb..eef3ba489d194a9c0d3a5ab3326e6e6f08a9119f 100644 >--- a/Tools/TestWebKitAPI/Tests/WebKitCocoa/AutoLayoutIntegration.mm >+++ b/Tools/TestWebKitAPI/Tests/WebKitCocoa/AutoLayoutIntegration.mm >@@ -163,7 +163,9 @@ TEST(WebKit, AutoLayoutIntegration) > // of the intrinsic height of the content. We have to load differently-sized content so that we can wait for > // the intrinsic size change callback. > [webView _setShouldExpandContentToViewHeightForAutoLayout:YES]; >- [webView load:@"<div class='large'></div>" withWidth:50 expectingContentSize:NSMakeSize(100, 1000) resettingWidth:NO]; >+ // 100px _is_the_expected_ height because we intentionally report stale value to avoid unstable layout. >+ // See FrameView::autoSizeIfEnabled(). >+ [webView load:@"<div class='large'></div>" withWidth:50 expectingContentSize:NSMakeSize(100, 100) resettingWidth:NO]; > [webView evaluateJavaScript:@"window.innerHeight" completionHandler:^(id value, NSError *error) { > EXPECT_TRUE([value isKindOfClass:[NSNumber class]]); > EXPECT_EQ(1000, [value integerValue]);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 199303
: 373076