Closed Bug 1729719 Opened 3 years ago Closed 3 years ago

[wpt-sync] Sync PR 30396 - Revert "[client-hints] Calculate correct values for viewport width and height on"

Categories

(Testing :: web-platform-tests, task, P4)

task

Tracking

(firefox94 fixed)

RESOLVED FIXED
94 Branch
Tracking Status
firefox94 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 30396 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/30396
Details from upstream follow.

b'Avi Drissman <avi@chromium.org>' wrote:

Revert "[client-hints] Calculate correct values for viewport width and height on"

This reverts commit f3f90d94fe2daf8ad10849bb522b1512f3ef1e8d.

Reason for revert: https://crbug.com/1247549, crashing in getting the viewport size.

Original change's description:

[client-hints] Calculate correct values for viewport width and height on
navigation requests.

Currently on navigation requests, the viewport-width and sec-ch-viewport-height client hints are calculated using the display's dimensions. This CL updates the two clients to use the visible viewport size, which provides more accurate information.

The CL also handles prefetch requests. In a prefetch request, the frame_tree_node is null, so we need a separate mechanism to track the viewport size. This is done by a new ClientHintsWebContentsObserver.

Reimplementation of the reverted CL: https://chromium-review.googlesource.com/c/chromium/src/+/2494876

Bug: 825892
Change-Id: Id3117cfa505c33d59eb7dbb8cc8b485dd567f792
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3108448
Reviewed-by: Avi Drissman \<avi@chromium.org>
Reviewed-by: Ryan Sturm \<ryansturm@chromium.org>
Commit-Queue: Max Curran \<curranmax@chromium.org>
Cr-Commit-Position: refs/heads/main@{#918864}

Bug: 825892, 1247549
Change-Id: I497deb56a45aaf78c19d07d17b31bac3e4d7d5bb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true

Reviewed-on: https://chromium-review.googlesource.com/3148038
WPT-Export-Revision: efe7736d3ba7ed7926b0bc766b5e7f8d8f3fb770

PR 30396 applied with additional changes from upstream: 2e0fce77dc50bbb95b3f7b2d88e8c30de6a9297e
Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/12d2c369241e
[wpt PR 30396] - Revert "[client-hints] Calculate correct values for viewport width and height on", a=testonly
Test result changes from PR not available.
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 94 Branch
You need to log in before you can comment on or make changes to this bug.