Closed Bug 1948220 Opened 10 days ago Closed 6 days ago

[wpt-sync] Sync PR 50706 - [Editing] Remove newline while copy pasting text around a button containing empty text.

Categories

(Core :: DOM: Editor, task, P4)

task

Tracking

()

RESOLVED FIXED
137 Branch
Tracking Status
firefox137 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [wptsync downstream])

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

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

Pranav Modi <pranavmodi@microsoft.com> wrote:

[Editing] Remove newline while copy pasting text around a button containing empty text.

When there is a button inside an inline element and it has empty
text, there was a newline that was getting added due to |ExitNode()|
getting called for last child under the parent node even though the
parent is displayed as an inline element on the layout. This bug
has been fixed by allowing |ExitNode()| to be called only if the
block element's parent is not explicitly set as inline.

The wpt has been changed to allow copy and paste events to happen
via test driver instead of execCommand to allow WPT to pass in
headless shell.

Bug: 391842344
Change-Id: I631c20f0d1971583ce7b6d6793f52295c5be40fe
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6236246
Reviewed-by: Mason Freed \<masonf@chromium.org>
Reviewed-by: Siye Liu \<siliu@microsoft.com>
Commit-Queue: Pranav Modi \<pranavmodi@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1420289}

Component: web-platform-tests → DOM: Editor
Product: Testing → Core

CI Results

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

Total 1 tests and 9 subtests

Status Summary

Firefox

OK : 1
FAIL: 9

Chrome

OK : 1
PASS: 7
FAIL: 2

Safari

OK : 1
PASS: 9

Links

GitHub PR Head
GitHub PR Base

Details

Firefox-only Failures

  • /editing/other/plain-text-copy-paste-of-paragraph-ending-with-non-layed-out-content.html [wpt.fyi]
    • The extra line break is missing after the paragraph that ends with a comment.: FAIL
    • The extra line break is missing after the paragraph that ends with a display:none span.: FAIL
    • The extra line break is missing after the paragraph that ends with a hidden span.: FAIL
    • The extra line break is missing after the paragraph that ends with a meta tag.: FAIL
    • The extra line break is missing after the paragraph that ends with a style tag.: FAIL
    • The extra line break is missing after the paragraph that ends with a base tag.: FAIL
    • Line break should not be present before semicolon after block elements styled as inline-block.: FAIL

New Tests That Don't Pass

  • /editing/other/plain-text-copy-paste-of-paragraph-ending-with-non-layed-out-content.html [wpt.fyi]
    • The extra line break is missing after the paragraph that ends with a comment.: FAIL (Chrome: PASS, Safari: PASS)
    • The extra line break is missing after the paragraph that ends with a display:none span.: FAIL (Chrome: PASS, Safari: PASS)
    • The extra line break is missing after the paragraph that ends with a hidden span.: FAIL (Chrome: PASS, Safari: PASS)
    • The extra line break is missing after the paragraph that ends with a meta tag.: FAIL (Chrome: PASS, Safari: PASS)
    • The extra line break is missing after the paragraph that ends with a style tag.: FAIL (Chrome: PASS, Safari: PASS)
    • The extra line break is missing after the paragraph that ends with a base tag.: FAIL (Chrome: PASS, Safari: PASS)
    • Line break should not be present before semicolon after block elements styled as inline-flex.: FAIL (Chrome: FAIL, Safari: PASS)
    • Line break should not be present before semicolon after block elements styled as inline-block.: FAIL (Chrome: PASS, Safari: PASS)
    • Line break should not be present before semicolon after block elements styled as inline-grid.: FAIL (Chrome: FAIL, Safari: PASS)
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ae6e751ba1e6 [wpt PR 50706] - [Editing] Remove newline while copy pasting text around a button containing empty text., a=testonly https://hg.mozilla.org/integration/autoland/rev/cb2d3899a8e3 [wpt PR 50706] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 6 days ago
Resolution: --- → FIXED
Target Milestone: --- → 137 Branch
You need to log in before you can comment on or make changes to this bug.