Skip to content

Commit

Permalink
[Viewport Segments] Per CSS WG resolution move the JavaScript segment…
Browse files Browse the repository at this point in the history
… 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 <[email protected]>
Reviewed-by: Reilly Grant <[email protected]>
Reviewed-by: Chris Harrelson <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1344484}
  • Loading branch information
darktears authored and chromium-wpt-export-bot committed Aug 21, 2024
1 parent a918d49 commit 9f659d6
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 15 deletions.
4 changes: 4 additions & 0 deletions viewport/META.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
spec: https://drafts.csswg.org/css-viewport-1/
suggested_reviewers:
- bokand
- chrishtr
3 changes: 3 additions & 0 deletions viewport/WEB_FEATURES.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
features:
- name: viewport
files: "**"
14 changes: 14 additions & 0 deletions viewport/viewport-segments.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>Viewport Segments: viewport.segments</title>
<link rel="help" href="https://drafts.csswg.org/css-viewport-1/"/>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
"use strict";

test(() => {
assert_true('segments' in viewport, "`segments` must be a property of viewport.");
assert_equals(viewport.segments, null, "For a viewport not segmented, no segments must be exposed.");
});
</script>
15 changes: 0 additions & 15 deletions visual-viewport/viewport-segments.tentative.html

This file was deleted.

0 comments on commit 9f659d6

Please sign in to comment.