Skip to content

Commit

Permalink
Allow a size of 0 in area's rectangle state
Browse files Browse the repository at this point in the history
This makes it so that an area's rectangle state can have
rectangles with a width or height of 0, by allowing the top left corner to be identical to the bottom right instead of having to
be strictly smaller.

This makes it consistent with the other two states, as circles
are allowed to have a radius of 0 and polygons can have all
their points along a line or even in a single spot, making
areas with a size of 0 possible.

Fixes whatwg#10306.
  • Loading branch information
Psychpsyo committed May 1, 2024
1 parent b3fa80d commit 4055d48
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -41878,11 +41878,12 @@ interface <dfn interface>HTMLAreaElement</dfn> : <span>HTMLElement</span> {

<p>In the <dfn attr-value for="area/shape" data-x="attr-area-shape-rect">rectangle state</dfn>,
<code>area</code> elements must have a <code data-x="attr-area-coords">coords</code> attribute
with exactly four integers, the first of which must be less than the third, and the second of
which must be less than the fourth. The four points must represent, respectively, the distance
from the left edge of the image to the left side of the rectangle, the distance from the top edge
to the top side, the distance from the left edge to the right side, and the distance from the top
edge to the bottom side, all in <span data-x="'px'">CSS pixels</span>.</p>
with exactly four integers, the first of which must be less than or equal to the third, and the
second of which must be less than or equal to the fourth. The four points must represent,
respectively, the distance from the left edge of the image to the left side of the rectangle, the
distance from the top edge to the top side, the distance from the left edge to the right side,
and the distance from the top edge to the bottom side, all in
<span data-x="'px'">CSS pixels</span>.</p>

<div w-nodev>

Expand Down

0 comments on commit 4055d48

Please sign in to comment.