Title: [231606] trunk/Source/WebKit
- Revision
- 231606
- Author
- [email protected]
- Date
- 2018-05-09 16:15:49 -0700 (Wed, 09 May 2018)
Log Message
[Extra zoom mode] fast/viewport/extrazoom/viewport-change-min-device-width.html sometimes fails
https://bugs.webkit.org/show_bug.cgi?id=185490
<rdar://problem/40097629>
Reviewed by Tim Horton.
This test is currently flaky due to incorrect logic when computing the unobscured content rect, in the slice of
time after a frame load has been committed, and before the first visible content rect update from the UI process
after the frame load has been committed.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::viewportConfigurationChanged):
In the case where !m_hasReceivedVisibleContentRectsAfterDidCommitLoad, we try to set the unobscured content size
to be the view size divided by the initial scale. However, in extra zoom mode, `ViewportConfiguration`'s
`minimumLayoutSize()` is the layout size, which is larger than the size of the view by default, so dividing this
by the initial scale yields a bogus value. Instead, use `viewLayoutSize()` instead.
(WebKit::WebPage::updateViewportSizeForCSSViewportUnits):
We also try to divide the view size by the initial scale when computing the effective viewport size for `vw` and
`vh`. Additionally, fix the misleading name of a variable (largestUnobscuredRect) that stores a size.
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (231605 => 231606)
--- trunk/Source/WebKit/ChangeLog 2018-05-09 23:13:59 UTC (rev 231605)
+++ trunk/Source/WebKit/ChangeLog 2018-05-09 23:15:49 UTC (rev 231606)
@@ -1,3 +1,28 @@
+2018-05-09 Wenson Hsieh <[email protected]>
+
+ [Extra zoom mode] fast/viewport/extrazoom/viewport-change-min-device-width.html sometimes fails
+ https://bugs.webkit.org/show_bug.cgi?id=185490
+ <rdar://problem/40097629>
+
+ Reviewed by Tim Horton.
+
+ This test is currently flaky due to incorrect logic when computing the unobscured content rect, in the slice of
+ time after a frame load has been committed, and before the first visible content rect update from the UI process
+ after the frame load has been committed.
+
+ * WebProcess/WebPage/ios/WebPageIOS.mm:
+ (WebKit::WebPage::viewportConfigurationChanged):
+
+ In the case where !m_hasReceivedVisibleContentRectsAfterDidCommitLoad, we try to set the unobscured content size
+ to be the view size divided by the initial scale. However, in extra zoom mode, `ViewportConfiguration`'s
+ `minimumLayoutSize()` is the layout size, which is larger than the size of the view by default, so dividing this
+ by the initial scale yields a bogus value. Instead, use `viewLayoutSize()` instead.
+
+ (WebKit::WebPage::updateViewportSizeForCSSViewportUnits):
+
+ We also try to divide the view size by the initial scale when computing the effective viewport size for `vw` and
+ `vh`. Additionally, fix the misleading name of a variable (largestUnobscuredRect) that stores a size.
+
2018-05-09 Brent Fulgham <[email protected]>
Restrict unarchiving of bundle parameters to a set of known classes
Modified: trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm (231605 => 231606)
--- trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm 2018-05-09 23:13:59 UTC (rev 231605)
+++ trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm 2018-05-09 23:15:49 UTC (rev 231606)
@@ -2727,7 +2727,7 @@
FrameView& frameView = *mainFrameView();
IntPoint scrollPosition = frameView.scrollPosition();
if (!m_hasReceivedVisibleContentRectsAfterDidCommitLoad) {
- FloatSize minimumLayoutSizeInScrollViewCoordinates = m_viewportConfiguration.minimumLayoutSize();
+ FloatSize minimumLayoutSizeInScrollViewCoordinates = m_viewportConfiguration.viewLayoutSize();
minimumLayoutSizeInScrollViewCoordinates.scale(1 / scale);
IntSize minimumLayoutSizeInDocumentCoordinates = roundedIntSize(minimumLayoutSizeInScrollViewCoordinates);
frameView.setUnobscuredContentSize(minimumLayoutSizeInDocumentCoordinates);
@@ -2749,13 +2749,13 @@
void WebPage::updateViewportSizeForCSSViewportUnits()
{
- FloatSize largestUnobscuredRect = m_maximumUnobscuredSize;
- if (largestUnobscuredRect.isEmpty())
- largestUnobscuredRect = m_viewportConfiguration.minimumLayoutSize();
+ FloatSize largestUnobscuredSize = m_maximumUnobscuredSize;
+ if (largestUnobscuredSize.isEmpty())
+ largestUnobscuredSize = m_viewportConfiguration.viewLayoutSize();
FrameView& frameView = *mainFrameView();
- largestUnobscuredRect.scale(1 / m_viewportConfiguration.initialScaleIgnoringContentSize());
- frameView.setViewportSizeForCSSViewportUnits(roundedIntSize(largestUnobscuredRect));
+ largestUnobscuredSize.scale(1 / m_viewportConfiguration.initialScaleIgnoringContentSize());
+ frameView.setViewportSizeForCSSViewportUnits(roundedIntSize(largestUnobscuredSize));
}
void WebPage::applicationWillResignActive()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes