Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support small/large/dynamic/logical viewport units #32635

Merged
merged 1 commit into from Feb 5, 2022

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Feb 1, 2022

This CL adds support for new units:

  • svw, svh (etc): Resolves against the viewport as it would be with
    browser controls fully expanded.
  • lvw, lvh (etc): Resolves against the viewport as it would be with
    browser controls fully minimized.
  • dvw, dvh (etc): Resolves against the viewport as it presently
    appears given the current state of browser controls.
  • vi, vb: Resolves against vw/vh depending on the writing-mode
    of the target element.

Note that dv* units are deliberately not responsive to browser control
animations, and will always resolve to either sv* or lv* (not some
value in between). This is to avoid excessive scroll-driven relayouts
on mobile devices.

This CL uses the existing system/bits for invalidation of viewport
units. Targeted invalidation of dynamic units will come in a
subsequent CL.

Bug: 1093055
Change-Id: I3ba55a86de53514f2020a2d5bdda579f06dd9d0a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3344791
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Reviewed-by: David Bokan <bokan@chromium.org>
Commit-Queue: Anders Hartvoll Ruud <andruud@chromium.org>
Cr-Commit-Position: refs/heads/main@{#967475}

Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review process for this patch is being conducted in the Chromium project.

@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-3344791 branch 3 times, most recently from 9675584 to be5b1f0 Compare February 4, 2022 21:05
This CL adds support for new units:

 * svw, svh (etc): Resolves against the viewport as it would be with
                   browser controls fully expanded.
 * lvw, lvh (etc): Resolves against the viewport as it would be with
                   browser controls fully minimized.
 * dvw, dvh (etc): Resolves against the viewport as it presently
                   appears given the current state of browser controls.
 * vi, vb:         Resolves against vw/vh depending on the writing-mode
                   of the target element.

Note that dv* units are deliberately not responsive to browser control
animations, and will always resolve to either sv* or lv* (not some
value in between). This is to avoid excessive scroll-driven relayouts
on mobile devices.

This CL uses the existing system/bits for invalidation of viewport
units. Targeted invalidation of dynamic units will come in a
subsequent CL.

Bug: 1093055
Change-Id: I3ba55a86de53514f2020a2d5bdda579f06dd9d0a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3344791
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Reviewed-by: David Bokan <bokan@chromium.org>
Commit-Queue: Anders Hartvoll Ruud <andruud@chromium.org>
Cr-Commit-Position: refs/heads/main@{#967475}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants