Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify the cropTarget minting processing model #47

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

yoavweiss
Copy link

@yoavweiss yoavweiss commented May 19, 2022

Fixes #48 [edit jib]. This is to help move along the discussion at #17 and to make the processing model better reflect the intended Chromium implementation.


Preview | Diff

Copy link
Member

@eladalon1983 eladalon1983 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

index.html Outdated Show resolved Hide resolved
index.html Outdated
Let |success| be a [=boolean=], initially set to false.
</li>
<li>
If [=this=] track is [=uncropped=] and |valid| is true, set |success| to true.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we allow the UA the possibility to fail due to resource limitations?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe as a followup?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me.

index.html Outdated
</p>
</li>
<li>Let <var>p</var> be a new {{Promise}}.</li>
<li>
<p>Run the following steps in parallel:</p>
<ol>
<li>
If <var>cropTarget</var> is neither {{undefined}} nor a [=valid CropTarget=],
reject <var>p</var> with a {{NotAllowedError}} and abort these steps.
If <var>cropTarget</var> is neither {{undefined}} or if calling [=determine if
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this now redundant with the steps around |success|?
(And nit: neither-nor, not neither-or, I think.)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dropped this indeed. Does this mean that NotAllowedError was never something that could be triggered?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It can never trigger because cropTarget cannot be undefined. It can be null because it is nullable. NotAllowedError implies permission failure and is the wrong error here. Maybe InvalidStateError.

There are lots of problems with this spec, the biggest being it's shape lacks consensus, and we've been attacking them from big to small. FPWD is meant to be the beginning of standardization, not the end.

Copy link
Member

@eladalon1983 eladalon1983 Jun 9, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand the current PR as making an iterative improvement that does not introduce any new non-consensus issues. If any non-consensus issues are mistakenly introduced by this PR, @jan-ivar, please flag them and we can remove them.

index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
Copy link
Member

@jan-ivar jan-ivar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR mixes helpful cleanup (thanks!) with controversial changes. I suggest this be split up into separate PRs.

<ol>
<li><p>In an [=implementation-defined=] way, propagate state associated with |cropTarget|.</p></li>
<li>
<p>If state propagation was successful, [=resolve=] |promise|. Otherwise, [=reject=] |promise|.</p>
Copy link
Member

@jan-ivar jan-ivar May 19, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is under heavy discussion in #17 and there's no concensus to merge this. Web developers aren't going to expect this to fail, and failures are going to be surpassing and browser dependent, which is bad for web compat.

This also cements an inferior approach to this problem, which I've argued is actually slower than the alternative, a claim no one has challenged yet.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is under heavy discussion in #17

Please note the PR's description.

Web developers aren't going to expect this to fail

Why?

This also cements an inferior approach to this problem

https://www.w3.org/Consortium/cepc/#expected-behavior

which I've argued is actually slower than the alternative, a claim no one has challenged yet.

#17 (comment)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#48 is where this discussion is happening. Please comment there.

@eladalon1983
Copy link
Member

This PR improves the quality of the document without diverging from the status quo. If I'm wrong about it - if there was a delta vis-à-vis the status quo - please point it out and it can be corrected. Otherwise, let's please merge this PR.
@jan-ivar, @youennf

@eladalon1983
Copy link
Member

I'd like to help push this PR towards being approved and merged in today's editors' meeting. Is anything else requested here, @jan-ivar / @youennf?

@jan-ivar
Copy link
Member

jan-ivar commented Jun 15, 2022

Since this PR hasn't been split up as requested, it still contains items under discussion in #48, so I've marked it as "Fixes #48" in the OP, to help make that clear.

It is not ready to be merged in an Editor's Meeting. #48 is set to be discussed at our next interim as part of #17.

@eladalon1983
Copy link
Member

Is the problem with this PR solely that it introduces the affordance that CropTarget-minting may fail? Or do you have other issues with it? Assuming that's the only issue - if we remove that part, and leave a note explaining that there's a debate over this issue, would that work for you, and allow consensus to emerge for this PR?

<ol>
<li><p>In an [=implementation-defined=] way, propagate state associated with |cropTarget|.</p></li>
<li>
<p>If state propagation was successful, [=resolve=] |promise|. Otherwise, [=reject=] |promise|.</p>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<p>If state propagation was successful, [=resolve=] |promise|. Otherwise, [=reject=] |promise|.</p>
<p>[=resolve=] |promise|.</p>

<li>
<p>If state propagation was successful, [=resolve=] |promise|. Otherwise, [=reject=] |promise|.</p>
<p class="note">
The user agent needs to [=resolve=] or [=reject=] |promise| only after it has finished all
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The user agent needs to [=resolve=] or [=reject=] |promise| only after it has finished all
The user agent needs to [=resolve=] |promise| only after it has finished all

@jan-ivar
Copy link
Member

I'm opposed to a note. Issues are covered on github and we're discussing #48 next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Should generation of CropTarget from elements be able to fail?
4 participants