Closed Bug 1827025 Opened 3 years ago Closed 3 years ago

[wpt-sync] Sync PR 39435 - Fix exponential time fieldset disable algorithm

Categories

(Core :: DOM: Core & HTML, task, P4)

task

Tracking

()

RESOLVED FIXED
114 Branch
Tracking Status
firefox114 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 39435 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/39435
Details from upstream follow.

Xiaocheng Hu <xiaochengh@chromium.org> wrote:

Fix exponential time fieldset disable algorithm

HTMLFieldSetElement::DisabledAttributeChanged() traverses its subtree,
and recurses on every form control descendant. This causes repeated
traversal on subtrees, and results in exponential overall running time.
The re-entrancy also causes a DCHECK hit when we blur the focused
element in a nested traversal.

This patch optimizes it to linear time by adding a non-reentrant
override of ListedElement::AncestorDisabledStateWasChanged() on
HTMLFieldSetelement.

Fixed: 1427047
Change-Id: Ia3ee4195e71e05724af2bfb9abda6f1e94683ed9

Reviewed-on: https://chromium-review.googlesource.com/4406688
WPT-Export-Revision: 6bb548ffacce29a3434b6c8ea6df1c0555cd2e43

Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core

CI Results

Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 1 tests and 2 subtests

Status Summary

Firefox

OK : 1
FAIL : 2

Chrome

TIMEOUT: 1

Safari

OK : 1
FAIL : 2

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f4789baaffe2 [wpt PR 39435] - Fix exponential time fieldset disable algorithm, a=testonly https://hg.mozilla.org/integration/autoland/rev/5e7b6ff2b88b [wpt PR 39435] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 114 Branch
You need to log in before you can comment on or make changes to this bug.