Closed Bug 1444491 Opened 7 years ago Closed 2 years ago

Consider updating to autofocus spec changes

Categories

(Core :: DOM: Core & HTML, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
112 Branch
Tracking Status
firefox112 --- fixed

People

(Reporter: bzbarsky, Assigned: sefeng)

References

(Depends on 1 open bug, Regressed 1 open bug)

Details

(Keywords: perf-alert, Whiteboard: [sp3])

Attachments

(5 files, 2 obsolete files)

See https://github.com/whatwg/html/pull/3488 -- the updates spec queues a task on insertion and does all the other checks when the task runs.

That said, we might want to wait on https://github.com/whatwg/html/issues/3551 getting resolved one way or another.
Component: DOM → DOM: Core & HTML
Severity: normal → S3

I am looking into this right now.

Assignee: nobody → sefeng
Attachment #9299995 - Attachment description: WIP: Bug 1444491 - Update the autofocus steps to align with the spec → Bug 1444491 - Update the autofocus steps to align with the spec r=emilio,smaug
Attachment #9299995 - Attachment description: Bug 1444491 - Update the autofocus steps to align with the spec r=emilio,smaug → WIP: Bug 1444491 - Update the autofocus steps to align with the spec r=emilio,smaug
Attachment #9299995 - Attachment description: WIP: Bug 1444491 - Update the autofocus steps to align with the spec r=emilio,smaug → Bug 1444491 - Update the autofocus steps to align with the spec r=emilio,smaug

These test behavior changes after the autofocus algorithm updates.

Depends on: 1801761
Depends on: 1802570

Since we are initializing nsImageMap lazily, it's possible for area elements
stays non-focusable when autofocus code tries to focus it. So to fix
this, we need to ensure nsImageMap is initialized early enough.

FlushAndCheckIfFocusable does a few things in the same function, however
I'd like to reuse the area and shadow dom checks from it for the
autofocus algorithm work. Generally they are useful for checking if a
non-focusable element can be focused.

Depends on: 1815913

Comment on attachment 9314648 [details]
Bug 1444491 - Init nsImageMap more eagerly r=emilio

Revision D168166 was moved to bug 1815913. Setting attachment 9314648 [details] to obsolete.

Attachment #9314648 - Attachment is obsolete: true
Depends on: 1816002

Comment on attachment 9315124 [details]
Bug 1444491 - Factor out the get-the-focusable-area step from FlushAndCheckIfFocusable r=emilio,smaug

Revision D168399 was moved to bug 1816002. Setting attachment 9315124 [details] to obsolete.

Attachment #9315124 - Attachment is obsolete: true
Pushed by sefeng@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7d8da1f44177
Update the autofocus steps to align with the spec r=emilio,smaug
https://hg.mozilla.org/integration/autoland/rev/80010eabc0c1
Update the ini files for autofocus related WPTs r=emilio
https://hg.mozilla.org/integration/autoland/rev/94aa0ce630f2
Update existing internal tests based on the autofocus algorithm updates r=emilio
https://hg.mozilla.org/integration/autoland/rev/64c8bb293e5c
Update existing autofocus related WPTs to make them more robust r=emilio
https://hg.mozilla.org/integration/autoland/rev/30f786b79191
Check the number of script blocking style sheets in autofocus algorithm r=hsivonen
https://hg.mozilla.org/integration/autoland/rev/1cee414009cb
1801761: apply code formatting via Lando
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/38517 for changes under testing/web-platform/tests

Backed out along with Bug 1801761 for causing failures on autofocus-attribute.svg

[task 2023-02-15T16:22:52.544Z] 16:22:52     INFO - TEST-PASS | /svg/coordinate-systems/outer-svg-intrinsic-size-002.html | modifiying specified viewBox, in presence of specified height 
[task 2023-02-15T16:22:52.544Z] 16:22:52     INFO - TEST-FAIL | /svg/coordinate-systems/svgtransformlist-replaceitem.html | Dynamic update of transform; replaceItem() - assert_equals: expected 185.08372497558594 but got 185
[task 2023-02-15T16:22:52.544Z] 16:22:52     INFO - @http://web-platform.test:8000/svg/coordinate-systems/svgtransformlist-replaceitem.html:26:16
[task 2023-02-15T16:22:52.544Z] 16:22:52     INFO - Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:2591:25
[task 2023-02-15T16:22:52.544Z] 16:22:52     INFO - test@http://web-platform.test:8000/resources/testharness.js:628:30
[task 2023-02-15T16:22:52.544Z] 16:22:52     INFO - @http://web-platform.test:8000/svg/coordinate-systems/svgtransformlist-replaceitem.html:15:5
[task 2023-02-15T16:22:52.544Z] 16:22:52     INFO - TEST-UNEXPECTED-PASS | /svg/struct/scripted/autofocus-attribute.svg | <a> should support autofocus - expected FAIL
[task 2023-02-15T16:22:52.544Z] 16:22:52     INFO - TEST-INFO | expected FAIL
[task 2023-02-15T16:22:52.545Z] 16:22:52     INFO - 
[task 2023-02-15T16:22:52.545Z] 16:22:52     INFO - TEST-UNEXPECTED-PASS | /svg/struct/scripted/autofocus-attribute.svg | Renderable element with tabindex should support autofocus - expected FAIL
[task 2023-02-15T16:22:52.545Z] 16:22:52     INFO - TEST-INFO | expected FAIL
[task 2023-02-15T16:22:52.615Z] 16:22:52     INFO - TEST-OK | /svg/struct/scripted/autofocus-attribute.svg | took 1387ms
Flags: needinfo?(sefeng)
Upstream PR was closed without merging
Flags: needinfo?(sefeng)
Pushed by sefeng@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/16afbf1210b3
Update the autofocus steps to align with the spec r=emilio,smaug
https://hg.mozilla.org/integration/autoland/rev/9deb296222f0
Update the ini files for autofocus related WPTs r=emilio
https://hg.mozilla.org/integration/autoland/rev/6fc833b7bf5c
Update existing internal tests based on the autofocus algorithm updates r=emilio
https://hg.mozilla.org/integration/autoland/rev/e7cfa964b690
Update existing autofocus related WPTs to make them more robust r=emilio
https://hg.mozilla.org/integration/autoland/rev/d4ebe6d8a638
Check the number of script blocking style sheets in autofocus algorithm r=hsivonen
https://hg.mozilla.org/integration/autoland/rev/aad1e7be0182
1801761: apply code formatting via Lando
Regressions: 1817124
Regressions: 1816955
Upstream PR merged by moz-wptsync-bot

(In reply to Pulsebot from comment #16)

Pushed by sefeng@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/16afbf1210b3
Update the autofocus steps to align with the spec r=emilio,smaug
https://hg.mozilla.org/integration/autoland/rev/9deb296222f0
Update the ini files for autofocus related WPTs r=emilio
https://hg.mozilla.org/integration/autoland/rev/6fc833b7bf5c
Update existing internal tests based on the autofocus algorithm updates
r=emilio
https://hg.mozilla.org/integration/autoland/rev/e7cfa964b690
Update existing autofocus related WPTs to make them more robust r=emilio
https://hg.mozilla.org/integration/autoland/rev/d4ebe6d8a638
Check the number of script blocking style sheets in autofocus algorithm
r=hsivonen
https://hg.mozilla.org/integration/autoland/rev/aad1e7be0182
1801761: apply code formatting via Lando

== Change summary for alert #37249 (as of Tue, 21 Feb 2023 05:52:44 GMT) ==

Improvements:

Ratio Test Platform Options Absolute values (old vs new) Performance Profiles
3% speedometer3 windows10-64-shippable-qr fission webrender 130.10 -> 133.63 Before/After
3% speedometer3 windows10-64-shippable-qr fission webrender 130.30 -> 133.70 Before/After

For up to date results, see: https://treeherder.mozilla.org/perfherder/alerts?id=37249

(In reply to Natalia Csoregi [:nataliaCs] from comment #14)

Backed out along with Bug 1801761 for causing failures on autofocus-attribute.svg

[task 2023-02-15T16:22:52.544Z] 16:22:52     INFO - TEST-PASS | /svg/coordinate-systems/outer-svg-intrinsic-size-002.html | modifiying specified viewBox, in presence of specified height 
[task 2023-02-15T16:22:52.544Z] 16:22:52     INFO - TEST-FAIL | /svg/coordinate-systems/svgtransformlist-replaceitem.html | Dynamic update of transform; replaceItem() - assert_equals: expected 185.08372497558594 but got 185
[task 2023-02-15T16:22:52.544Z] 16:22:52     INFO - @http://web-platform.test:8000/svg/coordinate-systems/svgtransformlist-replaceitem.html:26:16
[task 2023-02-15T16:22:52.544Z] 16:22:52     INFO - Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:2591:25
[task 2023-02-15T16:22:52.544Z] 16:22:52     INFO - test@http://web-platform.test:8000/resources/testharness.js:628:30
[task 2023-02-15T16:22:52.544Z] 16:22:52     INFO - @http://web-platform.test:8000/svg/coordinate-systems/svgtransformlist-replaceitem.html:15:5
[task 2023-02-15T16:22:52.544Z] 16:22:52     INFO - TEST-UNEXPECTED-PASS | /svg/struct/scripted/autofocus-attribute.svg | <a> should support autofocus - expected FAIL
[task 2023-02-15T16:22:52.544Z] 16:22:52     INFO - TEST-INFO | expected FAIL
[task 2023-02-15T16:22:52.545Z] 16:22:52     INFO - 
[task 2023-02-15T16:22:52.545Z] 16:22:52     INFO - TEST-UNEXPECTED-PASS | /svg/struct/scripted/autofocus-attribute.svg | Renderable element with tabindex should support autofocus - expected FAIL
[task 2023-02-15T16:22:52.545Z] 16:22:52     INFO - TEST-INFO | expected FAIL
[task 2023-02-15T16:22:52.615Z] 16:22:52     INFO - TEST-OK | /svg/struct/scripted/autofocus-attribute.svg | took 1387ms

== Change summary for alert #37268 (as of Wed, 22 Feb 2023 05:49:52 GMT) ==

Regressions:

Ratio Test Platform Options Absolute values (old vs new)
3% speedometer windows10-64-shippable-qr fission webrender 130.10 -> 126.22

Improvements:

Ratio Test Platform Options Absolute values (old vs new)
3% speedometer windows10-64-shippable-qr fission webrender 126.49 -> 129.66

For up to date results, see: https://treeherder.mozilla.org/perfherder/alerts?id=37268

Whiteboard: [sp3]
Regressions: 1840191
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: