[css-viewport] Add the segments property (#9237). - #10564
Merged
Conversation
bramus
approved these changes
Jul 12, 2024
Contributor
Author
|
I folded part of the reverted #10548 into this. |
chrishtr
reviewed
Jul 12, 2024
chrishtr
reviewed
Jul 12, 2024
chrishtr
reviewed
Jul 15, 2024
darktears
force-pushed
the
segments
branch
3 times, most recently
from
July 16, 2024 14:21
7ab8a60 to
7b4acf9
Compare
chrishtr
approved these changes
Aug 7, 2024
Contributor
Author
|
@emilio I'd love your review please. |
emilio
reviewed
Aug 7, 2024
Contributor
Author
|
@emilio added your suggestions. |
Contributor
Author
|
@emilio your review is appreciated. |
bramus
requested changes
Aug 19, 2024
Contributor
|
Left some comments looking at this from an author’s POV. Could be I missed some earlier discussion that explains why things are specced the way it currently is (I was OOO for 4 weeks). |
bramus
approved these changes
Aug 19, 2024
emilio
reviewed
Aug 19, 2024
Contributor
Author
|
@emilio resolved your comments |
emilio
approved these changes
Aug 19, 2024
| </h2> | ||
|
|
||
| The {{segments}} property is an array of {{DOMRect}} that represent the dimensions of each existing viewport segment. | ||
| Each {{DOMRect}} contains the geometry of the segment (x, y, width, height) in ''<length>/px''. |
Collaborator
There was a problem hiding this comment.
Might be worth pointing out that they are CSS pixels, not device pixels.
Contributor
Author
There was a problem hiding this comment.
What do you think of the last change?
Collaborator
There was a problem hiding this comment.
WFM, we can always clarify in follow-ups as needed.
This property exposes in JavaScript what is already exposed to CSS via env() variables. TAG review w3ctag/design-reviews#689. CSSWG Approval: w3c#9237#issuecomment-2160730855 Fixes w3c#9237.
chromium-wpt-export-bot
pushed a commit
to web-platform-tests/wpt
that referenced
this pull request
Aug 20, 2024
… property from window.visualViewport to the newly added window.viewport. See w3c/csswg-drafts#9237 (comment) for the full IRC log of the conversation. w3c/csswg-drafts#10564 is the PR adding the segments property part of the CSS Viewport Level 1 specification. There is no functional changes in how the segments property works, tests are updated to reflect the new position. Right now the viewport object is tied to the runtime flag of Viewport Segments because we expect the feature to ship before the viewport attribute receive more fields. Bug: 40113439 Change-Id: Ic0624314ee4300899e9e6e98f009e0b4f1fe9655
chromium-wpt-export-bot
pushed a commit
to web-platform-tests/wpt
that referenced
this pull request
Aug 20, 2024
… property from window.visualViewport to the newly added window.viewport. See w3c/csswg-drafts#9237 (comment) for the full IRC log of the conversation. w3c/csswg-drafts#10564 is the PR adding the segments property part of the CSS Viewport Level 1 specification. There is no functional changes in how the segments property works, tests are updated to reflect the new position. Right now the viewport object is tied to the runtime flag of Viewport Segments because we expect the feature to ship before the viewport attribute receive more fields. Bug: 40113439 Change-Id: Ic0624314ee4300899e9e6e98f009e0b4f1fe9655 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5783999 Commit-Queue: Alexis Menard <alexis.menard@intel.com> Reviewed-by: Reilly Grant <reillyg@chromium.org> Reviewed-by: Chris Harrelson <chrishtr@chromium.org> Cr-Commit-Position: refs/heads/main@{#1344484}
chromium-wpt-export-bot
pushed a commit
to web-platform-tests/wpt
that referenced
this pull request
Aug 21, 2024
… property from window.visualViewport to the newly added window.viewport. See w3c/csswg-drafts#9237 (comment) for the full IRC log of the conversation. w3c/csswg-drafts#10564 is the PR adding the segments property part of the CSS Viewport Level 1 specification. There is no functional changes in how the segments property works, tests are updated to reflect the new position. Right now the viewport object is tied to the runtime flag of Viewport Segments because we expect the feature to ship before the viewport attribute receive more fields. Bug: 40113439 Change-Id: Ic0624314ee4300899e9e6e98f009e0b4f1fe9655 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5783999 Commit-Queue: Alexis Menard <alexis.menard@intel.com> Reviewed-by: Reilly Grant <reillyg@chromium.org> Reviewed-by: Chris Harrelson <chrishtr@chromium.org> Cr-Commit-Position: refs/heads/main@{#1344484}
Westbrook
pushed a commit
to Westbrook/wpt
that referenced
this pull request
Aug 21, 2024
… property from window.visualViewport to the newly added window.viewport. See w3c/csswg-drafts#9237 (comment) for the full IRC log of the conversation. w3c/csswg-drafts#10564 is the PR adding the segments property part of the CSS Viewport Level 1 specification. There is no functional changes in how the segments property works, tests are updated to reflect the new position. Right now the viewport object is tied to the runtime flag of Viewport Segments because we expect the feature to ship before the viewport attribute receive more fields. Bug: 40113439 Change-Id: Ic0624314ee4300899e9e6e98f009e0b4f1fe9655 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5783999 Commit-Queue: Alexis Menard <alexis.menard@intel.com> Reviewed-by: Reilly Grant <reillyg@chromium.org> Reviewed-by: Chris Harrelson <chrishtr@chromium.org> Cr-Commit-Position: refs/heads/main@{#1344484}
moz-v2v-gh
pushed a commit
to mozilla/gecko-dev
that referenced
this pull request
Aug 22, 2024
…n move the JavaScript segment property from window.visualViewport to the newly added window.viewport., a=testonly Automatic update from web-platform-tests [Viewport Segments] Per CSS WG resolution move the JavaScript segment property from window.visualViewport to the newly added window.viewport. See w3c/csswg-drafts#9237 (comment) for the full IRC log of the conversation. w3c/csswg-drafts#10564 is the PR adding the segments property part of the CSS Viewport Level 1 specification. There is no functional changes in how the segments property works, tests are updated to reflect the new position. Right now the viewport object is tied to the runtime flag of Viewport Segments because we expect the feature to ship before the viewport attribute receive more fields. Bug: 40113439 Change-Id: Ic0624314ee4300899e9e6e98f009e0b4f1fe9655 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5783999 Commit-Queue: Alexis Menard <alexis.menard@intel.com> Reviewed-by: Reilly Grant <reillyg@chromium.org> Reviewed-by: Chris Harrelson <chrishtr@chromium.org> Cr-Commit-Position: refs/heads/main@{#1344484} -- wpt-commits: 9f659d69e19db662afbe89a0b9d056eb1c5fa0f4 wpt-pr: 47696
jwidar
pushed a commit
to jwidar/LatencyZeroGithub
that referenced
this pull request
Sep 16, 2025
…n move the JavaScript segment property from window.visualViewport to the newly added window.viewport., a=testonly Automatic update from web-platform-tests [Viewport Segments] Per CSS WG resolution move the JavaScript segment property from window.visualViewport to the newly added window.viewport. See w3c/csswg-drafts#9237 (comment) for the full IRC log of the conversation. w3c/csswg-drafts#10564 is the PR adding the segments property part of the CSS Viewport Level 1 specification. There is no functional changes in how the segments property works, tests are updated to reflect the new position. Right now the viewport object is tied to the runtime flag of Viewport Segments because we expect the feature to ship before the viewport attribute receive more fields. Bug: 40113439 Change-Id: Ic0624314ee4300899e9e6e98f009e0b4f1fe9655 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5783999 Commit-Queue: Alexis Menard <alexis.menard@intel.com> Reviewed-by: Reilly Grant <reillyg@chromium.org> Reviewed-by: Chris Harrelson <chrishtr@chromium.org> Cr-Commit-Position: refs/heads/main@{#1344484} -- wpt-commits: 9f659d69e19db662afbe89a0b9d056eb1c5fa0f4 wpt-pr: 47696
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This property exposes in JavaScript what is already exposed to CSS via env() variables.
TAG review w3ctag/design-reviews#689.
CSSWG Approval: here
Fixes #9237.