Title: [218509] trunk
- Revision
- 218509
- Author
- za...@apple.com
- Date
- 2017-06-19 14:22:56 -0700 (Mon, 19 Jun 2017)
Log Message
Opening certain mails brings up a mail that grows indefinitely.
https://bugs.webkit.org/show_bug.cgi?id=173562
<rdar://problem/32766579>
Reviewed by Tim Horton.
Source/WebCore:
This reverts the logic where m_autoSizeContentSize always reflects the final layout's.
When the ICB's height is 100%, it causes infinite recursion.
See also webkit.org/b/173561.
* page/FrameView.cpp:
(WebCore::FrameView::autoSizeIfEnabled):
Tools:
* TestWebKitAPI/Tests/WebKit2Cocoa/AutoLayoutIntegration.mm:
(TEST):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (218508 => 218509)
--- trunk/Source/WebCore/ChangeLog 2017-06-19 21:12:28 UTC (rev 218508)
+++ trunk/Source/WebCore/ChangeLog 2017-06-19 21:22:56 UTC (rev 218509)
@@ -1,3 +1,18 @@
+2017-06-19 Zalan Bujtas <za...@apple.com>
+
+ Opening certain mails brings up a mail that grows indefinitely.
+ https://bugs.webkit.org/show_bug.cgi?id=173562
+ <rdar://problem/32766579>
+
+ Reviewed by Tim Horton.
+
+ This reverts the logic where m_autoSizeContentSize always reflects the final layout's.
+ When the ICB's height is 100%, it causes infinite recursion.
+ See also webkit.org/b/173561.
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::autoSizeIfEnabled):
+
2017-06-19 Wenson Hsieh <wenson_hs...@apple.com>
[iOS DnD] Support .zip archives for file uploads via drag and drop
Modified: trunk/Source/WebCore/page/FrameView.cpp (218508 => 218509)
--- trunk/Source/WebCore/page/FrameView.cpp 2017-06-19 21:12:28 UTC (rev 218508)
+++ trunk/Source/WebCore/page/FrameView.cpp 2017-06-19 21:22:56 UTC (rev 218509)
@@ -3740,16 +3740,16 @@
setHorizontalScrollbarLock(false);
setScrollbarModes(horizonalScrollbarMode, verticalScrollbarMode, true, true);
}
+ // All the resizing above may have invalidated style (for example if viewport units are being used).
+ document->updateStyleIfNeeded();
+ // FIXME: Use the final layout's result as the content size (webkit.org/b/173561).
+ m_autoSizeContentSize = contentsSize();
if (m_autoSizeFixedMinimumHeight) {
auto contentsSize = this->contentsSize();
resize(contentsSize.width(), std::max(m_autoSizeFixedMinimumHeight, contentsSize.height()));
+ document->updateLayoutIgnorePendingStylesheets();
}
- // All the resizing above may have invalidated style (for example if viewport units are being used).
- document->updateLayoutIgnorePendingStylesheets();
- m_autoSizeContentSize = contentsSize();
m_didRunAutosize = true;
- ASSERT(!needsLayout());
- // FIXME: Now that autoSizeIfEnabled() actually returns clean, we don't need to call it from layout() anymore (see webkit.org/b/172890).
}
void FrameView::setAutoSizeFixedMinimumHeight(int fixedMinimumHeight)
Modified: trunk/Tools/ChangeLog (218508 => 218509)
--- trunk/Tools/ChangeLog 2017-06-19 21:12:28 UTC (rev 218508)
+++ trunk/Tools/ChangeLog 2017-06-19 21:22:56 UTC (rev 218509)
@@ -1,3 +1,14 @@
+2017-06-19 Zalan Bujtas <za...@apple.com>
+
+ Opening certain mails brings up a mail that grows indefinitely.
+ https://bugs.webkit.org/show_bug.cgi?id=173562
+ <rdar://problem/32766579>
+
+ Reviewed by Tim Horton.
+
+ * TestWebKitAPI/Tests/WebKit2Cocoa/AutoLayoutIntegration.mm:
+ (TEST):
+
2017-06-19 Wenson Hsieh <wenson_hs...@apple.com>
[iOS DnD] Support .zip archives for file uploads via drag and drop
Modified: trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/AutoLayoutIntegration.mm (218508 => 218509)
--- trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/AutoLayoutIntegration.mm 2017-06-19 21:12:28 UTC (rev 218508)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/AutoLayoutIntegration.mm 2017-06-19 21:22:56 UTC (rev 218509)
@@ -162,7 +162,7 @@
// 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];
+ [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]);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes