Skip to content

Commit f15a4a8

Browse files
committed
[cssom-view] Do nothing for width=0/height=0 in window.open()
See web-platform-tests/wpt#5390 (comment)
1 parent 74e17af commit f15a4a8

File tree

1 file changed

+22
-18
lines changed

1 file changed

+22
-18
lines changed

cssom-view/Overview.bs

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -669,6 +669,8 @@ To <dfn export>set up browsing context features</dfn> for a browsing context <va
669669

670670
1. Let <var>x</var> be null.
671671
1. Let <var>y</var> be null.
672+
1. Let <var>width</var> be null.
673+
1. Let <var>height</var> be null.
672674
1. If <var>tokenizedFeatures</var>["<a for="supported open() feature name">left</a>"]
673675
<a for=map>exists</a>:
674676
1. Set <var>x</var> to the result of invoking the <a>rules for parsing integers</a> on
@@ -691,28 +693,30 @@ To <dfn export>set up browsing context features</dfn> for a browsing context <va
691693
area</a>, measured in CSS pixels of <var>target</var>. The positive axis is downward.
692694
1. If <var>tokenizedFeatures</var>["<a for="supported open() feature name">width</a>"]
693695
<a for=map>exists</a>:
694-
1. Set <var>x</var> to the result of invoking the <a>rules for parsing integers</a> on
696+
1. Set <var>width</var> to the result of invoking the <a>rules for parsing integers</a> on
695697
<var>tokenizedFeatures</var>["<a for="supported open() feature name">width</a>"].
696-
1. If <var>x</var> is an error, set <var>x</var> to 0.
697-
1. Optionally, clamp <var>x</var> in a user-agent-defined manner so that the window does not get
698-
too small or bigger than the <a>Web-exposed available screen area</a>.
699-
1. Optionally, size <var>target</var>'s window by moving its right edge such that the distance
700-
between the left and right edges of the viewport are <var>x</var> CSS pixels of
701-
<var>target</var>.
702-
1. Optionally, move <var>target</var>'s window in a user-agent-defined manner so that it does
703-
not grow outside the <a>Web-exposed available screen area</a>.
698+
1. If <var>width</var> is an error, set <var>width</var> to 0.
699+
1. If <var>width</var> is not 0:
700+
1. Optionally, clamp <var>width</var> in a user-agent-defined manner so that the window does
701+
not get too small or bigger than the <a>Web-exposed available screen area</a>.
702+
1. Optionally, size <var>target</var>'s window by moving its right edge such that the
703+
distance between the left and right edges of the viewport are <var>width</var> CSS
704+
pixels of <var>target</var>.
705+
1. Optionally, move <var>target</var>'s window in a user-agent-defined manner so that it
706+
does not grow outside the <a>Web-exposed available screen area</a>.
704707
1. If <var>tokenizedFeatures</var>["<a for="supported open() feature name">height</a>"]
705708
<a for=map>exists</a>:
706-
1. Set <var>y</var> to the result of invoking the <a>rules for parsing integers</a> on
709+
1. Set <var>height</var> to the result of invoking the <a>rules for parsing integers</a> on
707710
<var>tokenizedFeatures</var>["<a for="supported open() feature name">height</a>"].
708-
1. If <var>y</var> is an error, set <var>y</var> to 0.
709-
1. Optionally, clamp <var>y</var> in a user-agent-defined manner so that the window does not get
710-
too small or bigger than the <a>Web-exposed available screen area</a>.
711-
1. Optionally, size <var>target</var>'s window by moving its bottom edge such that the distance
712-
between the top and bottom edges of the viewport are <var>y</var> CSS pixels of
713-
<var>target</var>.
714-
1. Optionally, move <var>target</var>'s window in a user-agent-defined manner so that it does
715-
not grow outside the <a>Web-exposed available screen area</a>.
711+
1. If <var>height</var> is an error, set <var>height</var> to 0.
712+
1. If <var>height</var> is not 0:
713+
1. Optionally, clamp <var>height</var> in a user-agent-defined manner so that the window
714+
does not get too small or bigger than the <a>Web-exposed available screen area</a>.
715+
1. Optionally, size <var>target</var>'s window by moving its bottom edge such that the
716+
distance between the top and bottom edges of the viewport are <var>height</var> CSS
717+
pixels of <var>target</var>.
718+
1. Optionally, move <var>target</var>'s window in a user-agent-defined manner so that it
719+
does not grow outside the <a>Web-exposed available screen area</a>.
716720

717721
A <dfn export>supported <code>open()</code> feature name</dfn> is one of the following:
718722

0 commit comments

Comments
 (0)