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

Make text/plugin/media/ua-inline no-quirks documents #6745

Merged
merged 8 commits into from
Jun 24, 2021
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 28 additions & 1 deletion source
Original file line number Diff line number Diff line change
Expand Up @@ -3020,8 +3020,11 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
<dfn data-x="event listener callback" data-x-href="https://dom.spec.whatwg.org/#event-listener-callback">callback</dfn></li>

<li>The <dfn data-x="document's character encoding" data-x-href="https://dom.spec.whatwg.org/#concept-document-encoding">encoding</dfn> (herein the <i>character encoding</i>),
<dfn data-x="concept-document-mode" data-x-href="https://dom.spec.whatwg.org/#concept-document-mode">mode</dfn>, and
<dfn data-x="concept-document-mode" data-x-href="https://dom.spec.whatwg.org/#concept-document-mode">mode</dfn>,
<dfn data-x="concept-document-mode-locked" data-x-href="https://dom.spec.whatwg.org/#concept-document-mode-locked">mode locked</dfn>, and
<dfn data-x="concept-document-content-type" data-x-href="https://dom.spec.whatwg.org/#concept-document-content-type">content type</dfn> of a <code>Document</code></li>
<li>The <dfn data-x="concept-document-set-the-mode" data-x-href="https://dom.spec.whatwg.org/#concept-document-set-the-mode">set the mode</dfn> algorithm for a <code>Document</code></li>

<li>The distinction between <dfn data-x-href="https://dom.spec.whatwg.org/#xml-document">XML documents</dfn> and
<dfn data-x-href="https://dom.spec.whatwg.org/#html-document">HTML documents</dfn></li>
<li>The terms <dfn data-x-href="https://dom.spec.whatwg.org/#concept-document-quirks">quirks mode</dfn>,
Expand Down Expand Up @@ -86855,6 +86858,12 @@ new PaymentRequest(&hellip;); // Allowed to use
object</span> given "<code data-x="">html</code>", <var>type</var>, and
domenic marked this conversation as resolved.
Show resolved Hide resolved
<var>navigationParams</var>.</p></li>

domenic marked this conversation as resolved.
Show resolved Hide resolved
<li><p>Invoke the <span data-x="concept-document-set-the-mode">set the mode</span> algorithm
mfreed7 marked this conversation as resolved.
Show resolved Hide resolved
on <var>document</var>, with <var>new mode</var> set to <code data-x="">no-quirks</code>.</p></li>

<li><p>Set <var>document</var>'s <span data-x="concept-document-mode-locked">mode locked</span>
flag to <code data-x="">true</code>.</p></li>

<li><p>Create an <span>HTML parser</span> and associate it with the <var>document</var>. Act as
if the tokenizer had emitted a start tag token with the tag name "pre" followed by a single
U+000A LINE FEED (LF) character<!-- to get eaten, so that a leading LF in the text/plain stream
Expand Down Expand Up @@ -86931,6 +86940,12 @@ new PaymentRequest(&hellip;); // Allowed to use
object</span> given "<code data-x="">html</code>", <var>type</var>, and
<var>navigationParams</var>.</p></li>

<li><p>Invoke the <span data-x="concept-document-set-the-mode">set the mode</span> algorithm
on <var>document</var>, with <var>new mode</var> set to <code data-x="">no-quirks</code>.</p></li>

<li><p>Set <var>document</var>'s <span data-x="concept-document-mode-locked">mode locked</span>
flag to <code data-x="">true</code>.</p></li>
Copy link
Member

Choose a reason for hiding this comment

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

This is not necessary for the non-text cases, I don't think...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm ok - we currently lock the mode for all of these documents, so I just implemented the spec the same way. Any harm in keeping it locked for all document types?

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, I think it's pretty confusing for readers to add something to the spec that in actuality has no impact.


<li><p>Append an <code>html</code> element to <var>document</var>.</p></li>

<li><p>Append a <code>head</code> element to the <code>html</code> element.</p></li>
Expand Down Expand Up @@ -86992,6 +87007,12 @@ new PaymentRequest(&hellip;); // Allowed to use
object</span> given "<code data-x="">html</code>", <var>type</var>, and
<var>navigationParmas</var>.</p></li>

<li><p>Invoke the <span data-x="concept-document-set-the-mode">set the mode</span> algorithm
on <var>document</var>, with <var>new mode</var> set to <code data-x="">no-quirks</code>.</p></li>

<li><p>Set <var>document</var>'s <span data-x="concept-document-mode-locked">mode locked</span>
flag to <code data-x="">true</code>.</p></li>

<li><p>Mark <var>document</var> as being a <dfn>plugin document</dfn></p></li>

<li><p>Append an <code>html</code> element to <var>document</var>.</p></li>
Expand Down Expand Up @@ -87061,6 +87082,12 @@ new PaymentRequest(&hellip;); // Allowed to use
object</span> given "<code data-x="">html</code>", "<code data-x="">text/html</code>", and
<var>navigationParams</var>.</p></li>

<li><p>Invoke the <span data-x="concept-document-set-the-mode">set the mode</span> algorithm
on <var>document</var>, with <var>new mode</var> set to <code data-x="">no-quirks</code>.</p></li>

<li><p>Set <var>document</var>'s <span data-x="concept-document-mode-locked">mode locked</span>
flag to <code data-x="">true</code>.</p></li>

<li><p>Either associate <var>document</var> with a custom rendering that is not rendered using
the normal <code>Document</code> rendering rules, or mutate <var>document</var> until it
represents the content the user agent wants to render.</p>
Expand Down