Closed Bug 1615689 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 21808 - [css-pseudo] Fix text selection and drag-and-drop for pseudo-elements

Categories

(Core :: Layout: Generated Content, Lists, and Counters, task, P4)

task

Tracking

()

RESOLVED FIXED
mozilla75
Tracking Status
firefox75 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Oriol Brufau <obrufau@igalia.com> wrote:

[css-pseudo] Fix text selection and drag-and-drop for pseudo-elements

Before this patch, if you had a tree like

\<div>\<div::before>abc\</div::before>def\</div>

and you tried to select "bc", Chromium would end up selecting "ef" in
some cases. Similarly, trying to drag a text and drop it between "bc",
would end up inserting the text between "ef".

This patch fixes the problem, now trying to select "bc" won't select
anything. And dropping some text between "bc" will insert it between
the "cd".

BUG=1051685

TEST=external/wpt/css/css-pseudo/text-selection.html
TEST=fast/css-generated-content/drag-and-drop.html

The 2nd test is internal because I didn't manage to properly simulate
drag and drop using testdriver.js

Change-Id: Iedd594b46022ed434bdb1462232c717ec08f5304
Reviewed-on: https://chromium-review.googlesource.com/2047287
WPT-Export-Revision: c358b6a9d023664447543f3a54776f30769e0973

Component: web-platform-tests → Layout: Generated Content, Lists, and Counters
Product: Testing → Core

CI Results

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

Total 45 tests

Status Summary

Firefox

OK : 1
PASS: 6[GitHub] 50[Gecko-android-em-7.0-x86_64-debug-geckoview, Gecko-android-em-7.0-x86_64-opt-geckoview, Gecko-linux1804-64-asan-opt, Gecko-linux1804-64-debug, Gecko-linux1804-64-opt, Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-windows10-64-debug, Gecko-windows10-64-opt, Gecko-windows10-64-qr-debug, Gecko-windows10-64-qr-opt, Gecko-windows7-32-debug, Gecko-windows7-32-opt]

Chrome

OK : 1
FAIL: 6

Safari

OK : 1
PASS: 4
FAIL: 2

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f760e424a9c2
[wpt PR 21808] - [css-pseudo] Fix text selection and drag-and-drop for pseudo-elements, a=testonly
https://hg.mozilla.org/integration/autoland/rev/7f40ffaa3a12
[wpt PR 21808] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla75
You need to log in before you can comment on or make changes to this bug.