From bea298438ef997cb7fd4daf82fb7fc480368277f Mon Sep 17 00:00:00 2001 From: Noam Rosenthal Date: Thu, 11 May 2023 21:33:06 +0300 Subject: [PATCH] [css-view-transitions-1] Clarify that observable image size refers to the border-box, and observed natural size is not affected by hw constraints (#8819) * Clarify that observable image size refers to the border-box Ink-overflow is an implementation detail, and up to the UA to apply. object-view-box doesn't directly affect the ink-overflow rect. See [resolution](https://github.com/w3c/csswg-drafts/issues/8597#issuecomment-1488952275). Closes #8597 * Fix regarding texture size * Add changelog entries * Apply nits * clarify note --- css-view-transitions-1/Overview.bs | 34 ++++++++---------------------- 1 file changed, 9 insertions(+), 25 deletions(-) diff --git a/css-view-transitions-1/Overview.bs b/css-view-transitions-1/Overview.bs index 73235024cd3..146e7e9f780 100644 --- a/css-view-transitions-1/Overview.bs +++ b/css-view-transitions-1/Overview.bs @@ -1570,10 +1570,10 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface; over an infinite transparent canvas, following the [=capture rendering characteristics=]. - 1. Let |interestRectangle| be the result of [=computing the interest rectangle=] for |element|. + 1. Return the portion of the canvas that includes |element|'s [=ink overflow rectangle=] as an image. + The [=natural size=] of the image must be |element|'s [=border box=]'s [=size=], + and its origin corresponds to the |element|'s [=border box=]'s origin. - 1. Return the portion of the canvas within |interestRectangle| as an image. - The natural size of the image is equal to the |interestRectangle| bounds. ### [=Capture rendering characteristics=] ### {#capture-rendering-characteristics-algorithm} @@ -1590,6 +1590,10 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface; * Effects on the element, such as 'opacity' and 'filter' are applied to the capture. + * Implementations may clip the rendered contents if the [=ink overflow rectangle=] exceeds some [=implementation-defined=] maximum. + However, the captured image should include, at the very least, the contents of |element| that intersect with the [=snapshot root=]. + Implementations may adjust the rasterization quality to account for elements with a large [=ink overflow area=] that are transformed into view. + * [=list/For each=] |descendant| of [=shadow-including descendant=] {{Element}} and [=pseudo-element=] of |element|, if |descendant| has a [=computed value=] of 'view-transition-name' that is not ''view-transition-name/none'', then skip painting |descendant|. @@ -1601,28 +1605,6 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface; Issue: Specify what happens with 'mix-blend-mode'. -### [=Compute the interest rectangle=] ### {#compute-the-interest-rectangle-algorithm} - -
- To compute the interest rectangle of an {{Element}} |element|, perform the following steps. - They return a rectangle. - - Note: The interest rectangle is the subset of |element|'s [=ink overflow rectangle=] that should be captured. - This is required for cases where an element's ink overflow rectangle needs to be clipped because of hardware constraints. - For example, if it exceeds the maximum texture size. - - 1. Assert: |element| is not |element|'s [=node document=]'s [=document element=]. - - Note: The [=document element=] is captured differently, as specified in [=capture the image=]. - - 1. If |element|'s [=ink overflow area=] does not exceed an implementation-defined maximum size, - then return a rectangle that is equal to |element|'s [=ink overflow rectangle=]. - - 1. Otherwise: - - Issue: Define the algorithm used to clip the snapshot when it exceeds max size. -
- ## [=Handle transition frame=] ## {#handle-transition-frame-algorithm}
@@ -1810,6 +1792,8 @@ Changes from issue 8057. * Add concept of a tree of pseudo-elements under [=pseudo-element root=]. See issue 8113. * When skipping a transition, the {{UpdateCallback}} is called in own task rather than synchronosly. See issue 7904 +* When capturing images, at least the in-viewport part of the image should be captured, downscale if needed. See issue 8561. +* Applying the [=ink overflow=] to the captured image is implementation defined, and doesn't affect the image's [=natural size=]. See issue 8597.

Changes from 2022-10-25 Working Draft (FPWD)