Closed Bug 1822219 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 38971 - Reland "Make input element UA shadow tree creation lazy"

Categories

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

task

Tracking

()

RESOLVED FIXED
113 Branch
Tracking Status
firefox113 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Bin Liao <bin.liao@intel.com> wrote:

Reland "Make input element UA shadow tree creation lazy"

This is a reland of commit 259286fb5706438088c858361ff942239598ea3b

Diff:
third_party/blink/renderer/core/html/forms/text_field_input_type.cc::UpdatePlaceholderText
If the placeholder is not null, we should ensure the shadow subtree has been construted and update the placeholder text instead of just return here if the shadow subtree is not built.

Original change's description:

Make input element UA shadow tree creation lazy

This CL comes from WebCore https://trac.webkit.org/changeset/290639/webkit,
it claims 0.5% progression on Speedometer2, the chromium pinpoint result
shows a 0.6% progression on Speedometer2.

This CL lazy create shadow subtree until one of the following happens:

  1. the element is inserted into the document
  2. the type="" or value="" attributes are changed before the element is inserted into the document
  3. any DOM methods that need access to the InnerEditorElement() are called on the element before the element is inserted into the document

Change-Id: I5fd6743182d65be7e00fcb59480a5b28af289b76
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4111088
Commit-Queue: Xiaocheng Hu \<xiaochengh@chromium.org>
Reviewed-by: Xiaocheng Hu \<xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1110526}

Change-Id: Ie6657cce1e1edc381b494709af25f2a2243b9714

Reviewed-on: https://chromium-review.googlesource.com/4330348
WPT-Export-Revision: 8e6d4d98176202f64f76ea4d3832b26ff208131e

Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core
Test result changes from PR not available.
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9952ac293044 [wpt PR 38971] - Reland "Make input element UA shadow tree creation lazy", a=testonly
Test result changes from PR not available.
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 113 Branch
You need to log in before you can comment on or make changes to this bug.