Skip to content

Commit

Permalink
Change the timing of "flush autofocus candidates"
Browse files Browse the repository at this point in the history
Now it runs before "run the resize steps".

The previous timing could cause an issue that the auto-focused element
didn't have up-to-date appearance even though "update the rendering" was
done. Fixes #4992.

Tests: web-platform-tests/wpt#19747
  • Loading branch information
tkent-google authored and domenic committed Oct 18, 2019
1 parent ead4aa8 commit 74b6124
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -91504,6 +91504,11 @@ dictionary <dfn>PromiseRejectionEventInit</dfn> : <span>EventInit</span> {
</div>
</li>

<li><p>For each <span>fully active</span> <code>Document</code> in <var>docs</var>, <span>flush
autofocus candidates</span> for that <code>Document</code> if its
<span data-x="concept-document-bc">browsing context</span> is a
<span>top-level browsing context</span>.</p></li>

<li><p>For each <span>fully active</span> <code>Document</code> in <var>docs</var>, <span>run
the resize steps</span> for that <code>Document</code>, passing in <var>now</var> as the
timestamp. <ref spec="CSSOMVIEW"></p></li>
Expand Down Expand Up @@ -91538,14 +91543,6 @@ dictionary <dfn>PromiseRejectionEventInit</dfn> : <span>EventInit</span> {
<li><p>For each <span>fully active</span> <code>Document</code> in <var>docs</var>, update the
rendering or user interface of that <code>Document</code> and its <span
data-x="concept-document-bc">browsing context</span> to reflect the current state.</p></li>

<li><p>For each <span>fully active</span> <code>Document</code> in <var>docs</var>, <span>flush
autofocus candidates</span> for that <code>Document</code> if its
<span data-x="concept-document-bc">browsing context</span> is a
<span>top-level browsing context</span>.</p></li>
<!-- The above step is placed just after 'update the rendering' step in order to avoid
additional style computation. 'Focusable area' check requires the up-to-date style computation
result. -->
</ol>
</li>

Expand Down

0 comments on commit 74b6124

Please sign in to comment.