WebKit Bugzilla
Attachment 340127 Details for
Bug 185517
: [Extra zoom mode] fast/visual-viewport/extrazoom/layout-viewport-after-scrolling-and-resizing.html sometimes fails
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-185517-20180510140907.patch (text/plain), 6.50 KB, created by
Wenson Hsieh
on 2018-05-10 14:09:07 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Wenson Hsieh
Created:
2018-05-10 14:09:07 PDT
Size:
6.50 KB
patch
obsolete
>Subversion Revision: 231620 >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index b456dc205adca3582dcf1b371a169c8477e40d5b..bc5b60c6bbfe75f5a27aa6bdb627b8573742f858 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,33 @@ >+2018-05-10 Wenson Hsieh <wenson_hsieh@apple.com> >+ >+ [Extra zoom mode] fast/visual-viewport/extrazoom/layout-viewport-after-scrolling-and-resizing.html sometimes fails >+ https://bugs.webkit.org/show_bug.cgi?id=185517 >+ <rdar://problem/40112983> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Adjusts some existing layout tests â see below for more detail. >+ >+ * fast/css/extrazoom/viewport-units-shrink-to-fit.html: >+ >+ Remove calls to wait for the next presentation update which are no longer necessary after r231606. >+ >+ * fast/viewport/extrazoom/viewport-change-min-device-width.html: >+ >+ Wait for the next visible content rect update, when the unobscured content rect is guaranteed to be up to date. >+ >+ * fast/visual-viewport/extrazoom/layout-viewport-after-scrolling-and-resizing.html: >+ >+ Wait for the next visible content rect update rather than the next presentation update (i.e. remote layer tree >+ commit). This is because the layout viewport's custom fixed position rect is propagated in the visible content >+ rect update flow, and ensuring a presentation update is insufficient to guarantee that the layout viewport is up >+ to date. >+ >+ * resources/ui-helper.js: >+ (window.UIHelper.ensureVisibleContentRectUpdate): >+ >+ Add a new test helper to wait for the next presentation update. >+ > 2018-05-09 Joanmarie Diggs <jdiggs@igalia.com> > > AX: Hidden nodes which are not directly referenced should not participate name/description from content >diff --git a/LayoutTests/fast/css/extrazoom/viewport-units-shrink-to-fit.html b/LayoutTests/fast/css/extrazoom/viewport-units-shrink-to-fit.html >index ce3c5f052b8cf0054ed6dd83d8698614d89c3c0a..3f308a518f33dbc7a7adf8ea4b5a93491df9c84a 100644 >--- a/LayoutTests/fast/css/extrazoom/viewport-units-shrink-to-fit.html >+++ b/LayoutTests/fast/css/extrazoom/viewport-units-shrink-to-fit.html >@@ -21,15 +21,12 @@ > jsTestIsAsync = true; > > async function runTest() { >- await UIHelper.ensurePresentationUpdate(); >- > largeElementRectBeforeRemoval = large.getBoundingClientRect(); > mediumElementRectBeforeRemoval = medium.getBoundingClientRect(); > innerWidthBeforeRemoval = innerWidth; > innerHeightBeforeRemoval = innerHeight; > > large.remove(); >- await UIHelper.ensurePresentationUpdate(); > > mediumElementRectAfterRemoval = medium.getBoundingClientRect(); > innerWidthAfterRemoval = innerWidth; >diff --git a/LayoutTests/fast/viewport/extrazoom/viewport-change-min-device-width.html b/LayoutTests/fast/viewport/extrazoom/viewport-change-min-device-width.html >index ca7b1dbd89e780d409399396956f83db2f198055..50cd4e924198afd0b0be212ef94fe47f4e2ac0da 100644 >--- a/LayoutTests/fast/viewport/extrazoom/viewport-change-min-device-width.html >+++ b/LayoutTests/fast/viewport/extrazoom/viewport-change-min-device-width.html >@@ -17,7 +17,7 @@ > function logWindowDimensionsAfterSettingViewportContent(content) { > return new Promise(async resolve => { > meta.setAttribute("content", content); >- await UIHelper.ensurePresentationUpdate(); >+ await UIHelper.ensureVisibleContentRectUpdate(); > debug(`[${meta.getAttribute("content")}] (${innerWidth}, ${innerHeight})`); > resolve(); > }); >diff --git a/LayoutTests/fast/visual-viewport/extrazoom/layout-viewport-after-scrolling-and-resizing.html b/LayoutTests/fast/visual-viewport/extrazoom/layout-viewport-after-scrolling-and-resizing.html >index 30da9816ac4b8c4f5469b8bc818b00cf7b87b6b7..6b57555e916cb75750f259f244ac689884d01eb7 100644 >--- a/LayoutTests/fast/visual-viewport/extrazoom/layout-viewport-after-scrolling-and-resizing.html >+++ b/LayoutTests/fast/visual-viewport/extrazoom/layout-viewport-after-scrolling-and-resizing.html >@@ -36,9 +36,7 @@ > async function runTest() { > jsTestIsAsync = true; > >- // FIXME: This works around innerWidth and innerHeight being incorrect (i.e. unadjusted for shrink-to-fit >- // behavior) in the load event listener of the body. See: https://bugs.webkit.org/show_bug.cgi?id=184788. >- await UIHelper.ensurePresentationUpdate(); >+ await UIHelper.ensureVisibleContentRectUpdate(); > > topRectBeforeScrolling = document.getElementById("top").getBoundingClientRect(); > bottomRectBeforeScrolling = document.getElementById("bottom").getBoundingClientRect(); >@@ -52,7 +50,7 @@ > layoutViewportAfterScrolling = internals.layoutViewportRect(); > > document.body.style.height = "100px"; >- await UIHelper.ensurePresentationUpdate(); >+ await UIHelper.ensureVisibleContentRectUpdate(); > > topRectAfterShorteningBody = document.getElementById("top").getBoundingClientRect(); > bottomRectAfterShorteningBody = document.getElementById("bottom").getBoundingClientRect(); >@@ -60,7 +58,7 @@ > > finalDocumentHeight = Math.round(innerHeight * 1.5); > document.body.style.height = `${finalDocumentHeight}px`; >- await UIHelper.ensurePresentationUpdate(); >+ await UIHelper.ensureVisibleContentRectUpdate(); > > topRectAfterExtendingBody = document.getElementById("top").getBoundingClientRect(); > bottomRectAfterExtendingBody = document.getElementById("bottom").getBoundingClientRect(); >diff --git a/LayoutTests/resources/ui-helper.js b/LayoutTests/resources/ui-helper.js >index 41579b1ca96bd17f6209bba9b0fde1ec3e861301..ddc7d14cedb9b970faa1fe75becc527d937779e5 100644 >--- a/LayoutTests/resources/ui-helper.js >+++ b/LayoutTests/resources/ui-helper.js >@@ -84,6 +84,17 @@ window.UIHelper = class UIHelper { > }); > } > >+ static ensureVisibleContentRectUpdate() >+ { >+ if (!this.isWebKit2()) >+ return Promise.resolve(); >+ >+ return new Promise(resolve => { >+ const visibleContentRectUpdateScript = "uiController.doAfterVisibleContentRectUpdate(() => uiController.uiScriptComplete())"; >+ testRunner.runUIScript(visibleContentRectUpdateScript, resolve); >+ }); >+ } >+ > static activateAndWaitForInputSessionAt(x, y) > { > if (!this.isWebKit2() || !this.isIOS())
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 185517
: 340127