commit | 6763eaa83051f7d02aed7f27d578339f532b8cd5 | [log] [tgz] |
---|---|---|
author | Delan Azabani <dazabani@igalia.com> | Thu Aug 26 11:44:24 2021 |
committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Thu Aug 26 11:44:24 2021 |
tree | 01460b13a0f058fdbabc131f89c53dad6ca2c364 | |
parent | 108cf1b27385c6d25f45f6526f89a9ae8ea88f23 [diff] |
CSS highlight painting: split originating and ::selection decorations This patch builds on /c/2902289 by splitting the paints for unselected and selection text, which means that for the first time, all of these properties should hold true regardless of whether text is selected: P1. underlines and overlines are never painted over text P2. lines-through are always painted over text P3. decorations on any unselected parts are in originating td-color P4. selected part decorations paint over ::selection background P5. ::selection background always paints over unselected text Here’s a comparison of how these properties have evolved: • pre-M90 ensured P1 + P4, but violated P2 + P3 + P5 • /c/2647046 ensured P1 + P5, but violated P2 + P3 + P4 • /c/2902289 ensured P2 + P4 + P5, but violated P1 + P3 • this patch ensures P1 + P2 + P3 + P4 + P5 To test the properties more effectively, I’ve replaced one of my highlight painting tests with two more effective tests, and added smaller tests for properties P1 through P4. <https://wpt.live/css/css-pseudo/highlight-painting-003.html> now tests solid decorations with ::selection underline and originating line-through, plus an originating background. • https://bucket.daz.cat/ee288ed9a20b1a2f.png = pre-M90 • https://bucket.daz.cat/e689c7ada0c05594.png = /c/2647046 • https://bucket.daz.cat/42d48433dfc51e15.png = /c/2902289 • https://bucket.daz.cat/1658767a17294d93.png = this patch <https://wpt.live/css/css-pseudo/highlight-painting-004.html> tests wavy decorations, but with originating underline and ::selection line-through, and no originating background: • https://bucket.daz.cat/5e28cd46a5972359.png = pre-M90 • https://bucket.daz.cat/b44c05422d47a0b3.png = /c/2647046 • https://bucket.daz.cat/5e28cd46a5972359.png = /c/2902289 • https://bucket.daz.cat/6647e4443a92cec5.png = this patch For reference, here are the refs: • https://bucket.daz.cat/439df4145d54fede.png = 003-ref • https://bucket.daz.cat/05b20f2ec3675e7e.png = 004-ref1 • https://bucket.daz.cat/c898a37e256b3e44.png = 004-ref2 • https://bucket.daz.cat/bd4b272d1bcdf932.png = 004-ref3 This brings us closer to passing those tests, but not quite there. Next up, we need to recolor the decorations lifted from originating style to the ::selection overlay to ::selection’s color, not its text-decoration-color as done in <https://crrev.com/c/2383212>. Bug: 1147859 Change-Id: I011323db9b481175fb750ab810b6741239522087 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2903387 Commit-Queue: Delan Azabani <dazabani@igalia.com> Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org> Cr-Commit-Position: refs/heads/main@{#915543}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone
! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.