Skip to content

Commit

Permalink
Bug 1914051 [wpt PR 47696] - [Viewport Segments] Per CSS WG resolutio…
Browse files Browse the repository at this point in the history
…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 <[email protected]>
Reviewed-by: Reilly Grant <[email protected]>
Reviewed-by: Chris Harrelson <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1344484}

--

wpt-commits: 9f659d69e19db662afbe89a0b9d056eb1c5fa0f4
wpt-pr: 47696
  • Loading branch information
darktears authored and moz-wptsync-bot committed Aug 22, 2024
1 parent c5eb877 commit ce6bb1f
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 15 deletions.
4 changes: 4 additions & 0 deletions testing/web-platform/tests/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 testing/web-platform/tests/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 testing/web-platform/tests/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>

This file was deleted.

0 comments on commit ce6bb1f

Please sign in to comment.