Re: [csswg-drafts] [css-view-transitions-1] Questions about capturing (#8958)

Sorry, I missed this issue.
Answering some of the questions:

> Some reactions to reading the last sections of the spec... (Happy to file follow-up issues as necessary for ones that seem to need discussion, but this seemed easier to handle than a slew of new issues, one for each question.)
> 
> 1. Is the reason you're capturing the writing mode for the cascade, or some other reason?
> 2. I think what you want to capture is the [“writing mode”](https://www.w3.org/TR/css-writing-modes-4/#writing-mode), not just `writing-mode` and `direction`, right? So you need to also capture `text-orientation`

@khushalsagar I think the same, do you have context about (1) or (2)?
.
> 3. You define “old image” as an ImageData, but actually I think we just want it to be a static 2D image. How it's stored or represented doesn't matter, what it _is_ does.

Yea I was wondering what type to use. I'll used a ref-less 2D image instead of an ImageData.

> 4. I'm trying to understand the rendering model...
>    4.1 What causes ::view-transition-new() to render the corresponding DOM element?

It doesn't render the DOM element, it renders an image that was captured from the DOM element.

>    4.2 What causes :root and its descendants to not render?

They do render, but the pseudo elements render on top of them. By default (@khushalsagar please correct me if I got something wrong), the root element is captured and is participating in the transition as well. 

> 5. Wrt origins,
>    > The origin of element’s ink overflow rectangle is anchored to canvas origin.
>    
>    
>    I think this sentence should be deleted?
> 6. Wrt filters etc.
>    > Effects on the element, such as opacity and filter are applied to the capture.


>    
>    
>    By “on the element”, do you mean “applied to the element”, or possibly those applied by ancestors?
> 7. Wrt capturing the root,
>    > Render the region of the element and the document's top layer that intersects the snapshot containing block, on a transparent canvas the size of the snapshot containing block
>    
>    
>    I think you want to render the entire document, right? Including the canvas background and the (non-excluded) descendants. This paragraph doesn't seem to be saying that...
> 8. Also wrt capturing the root, if an item in the top layer (or its ancestor) has `view-transition-name` then it probably shouldn't be captured by the root, right?
> 9. The last line of capturing seems to capture (:P) our earlier resolution that the pseudo-element's replaced content has a natural size and origin corresponding to the border box while capturing ink overflow. But where do we say that we _paint_ the ink overflow for `::view-transition-old()`?

At the end of https://drafts.csswg.org/css-view-transitions-1/#capture-the-image. We capture the ink overflow rect, but the observed geometry and natural size are the border box.


-- 
GitHub Notification of comment by noamr
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8958#issuecomment-1620278608 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 4 July 2023 13:44:27 UTC