Closed Bug 1468893 Opened 3 years ago Closed 3 years ago

[wpt-sync] Sync PR 11422 - Evaluate child text content at the time of #prepare-a-script, not evaluation

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Hiroshige Hayashizaki <hiroshige@chromium.org> wrote:
>  Evaluate child text content at the time of #prepare-a-script, not evaluation
>  
>  Previously, classic inline script's source_text to be evaluated is taken
>  from the element's child text content at the time of evaluation.
>  However, according to the spec, this should be the element's
>  child text content at the time of #prepare-a-script.
>  
>  This CL fixes this by taking the element's child text content in
>  ClassicPendingScript's constructor, which is called inside PrepareScript().
>  
>  This affects the behavior if parser-inserted classic inline <script>'s
>  innerText is modified by JavaScript after <script> is inserted into DOM
>  before its evaluation, and I expect this is extremely rare and doesn't
>  have legitimate use cases.
>  
>  Bug: 686281
>  Change-Id: I0ef67dd8b71403a7862f24d02394f89c6e916bfd
>  Reviewed-on: https://chromium-review.googlesource.com/1091912
>  Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
>  Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org>
>  Cr-Commit-Position: refs/heads/master@{#567348}
>
Component: web-platform-tests → DOM
Product: Testing → Core
Ran 1 tests and 1 subtests
OK     : 1
FAIL   : 1

New tests that have failures or other problems:
/html/semantics/scripting-1/the-script-element/script-text-modifications.html
    Modify inline script element's text after prepare-a-script before evaluation: FAIL
Pushed by james@hoppipolla.co.uk:
https://hg.mozilla.org/integration/mozilla-inbound/rev/6f5e80a809e9
[wpt PR 11422] - Evaluate child text content at the time of #prepare-a-script, not evaluation, a=testonly
https://hg.mozilla.org/integration/mozilla-inbound/rev/3f30e3e9e435
[wpt PR 11422] - Update wpt metadata, a=testonly
https://hg.mozilla.org/mozilla-central/rev/6f5e80a809e9
https://hg.mozilla.org/mozilla-central/rev/3f30e3e9e435
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.