Skip to content

Commit b4f867f

Browse files
authored
[resize-observer-1] Include SVG elements that generate CSS layout boxes
1 parent 92d0e50 commit b4f867f

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

resize-observer-1/Overview.bs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -385,8 +385,8 @@ Watching content rect means that:
385385

386386
* observations will not be triggered by CSS transforms.
387387

388-
Web content can also contain SVG elements. SVG Elements define <a>bounding box</a> instead of a content box.
389-
Content rect for <a>SVGGraphicsElement</a>s is a rect whose:
388+
Web content can also contain SVG elements. SVG elements that do not have associated CSS layout boxes define <a>bounding box</a> instead of a content box.
389+
Content rect for the <a>SVGGraphicsElement</a>s without CSS layout boxes is a rect whose:
390390

391391
* width is <a>bounding box</a> width
392392
* height is <a>bounding box</a> height
@@ -454,13 +454,13 @@ run these steps:
454454

455455
6. Set |this|.{{ResizeObserverEntry/contentRect}} to logical |this|.{{ResizeObserverEntry/contentBoxSize}} given |target| and observedBox of "content-box".
456456

457-
7. If |target| is not an SVG element do these steps:
457+
7. If |target| is not an SVG element or |target| is an SVG element with an associated CSS layout box do these steps:
458458

459459
1. Set |this|.|contentRect|.top to |target|.<a>padding top</a>.
460460

461461
2. Set |this|.|contentRect|.left to |target|.<a>padding left</a>.
462462

463-
8. If |target| is an SVG element do these steps:
463+
8. If |target| is an SVG element without an associated CSS layout box do these steps:
464464

465465
1. Set |this|.|contentRect|.top and |this|.contentRect.left to 0.
466466

@@ -526,12 +526,12 @@ To <dfn>calculate depth for node</dfn>, given a |node|, run these steps:
526526

527527
This algorithm computes |target| {{Element}}'s observed box size. Type of box is
528528
described by {{ResizeObserverBoxOptions}}.
529-
SVG Elements are an exception. SVG size is always its bounding box size, because SVG
530-
elements do not use standard CSS box model.
529+
The SVG elements which don't have associated CSS layout boxes are an exception. The sizes of these elements are always their bounding box sizes, because
530+
these elements do not use standard CSS box model.
531531

532532
To <dfn>calculate box size</dfn>, given |target| and |observedBox|, run these steps:
533533

534-
1. If |target| is an {{SVGGraphicsElement}}
534+
1. If |target| is an {{SVGGraphicsElement}} that does not have an associated CSS layout box
535535

536536
1. If |observedBox| is "border-box" or "content-box"
537537

@@ -545,7 +545,7 @@ To <dfn>calculate box size</dfn>, given |target| and |observedBox|, run these st
545545

546546
2. Set |computedSize|.blockSize to |target|'s <a>bounding box</a> block length, in integral device pixels.
547547

548-
2. If |target| is not an {{SVGGraphicsElement}}
548+
2. If |target| is not an {{SVGGraphicsElement}} or |target| is an {{SVGGraphicsElement}} that has an associated CSS layout box
549549

550550
1. If |observedBox| is "border-box"
551551

0 commit comments

Comments
 (0)