Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(105)

Unified Diff: third_party/WebKit/LayoutTests/paint/invalidation/selection/selection-repaint.html

Issue 2709693003: Repaint selection when element with ::selection style is recalculated. (Closed)
Patch Set: Fixed review issues Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/paint/invalidation/selection/selection-repaint-expected.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/paint/invalidation/selection/selection-repaint.html
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/selection/selection-repaint.html b/third_party/WebKit/LayoutTests/paint/invalidation/selection/selection-repaint.html
new file mode 100644
index 0000000000000000000000000000000000000000..d0185bc6f5e5bd43cf252d7380f42eeebf3075e1
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/paint/invalidation/selection/selection-repaint.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<style>
+ ::selection {
+ background-color: transparent;
+ color: red
+ }
+ .green::selection {
+ color: green
+ }
+</style>
+<span id="t1">This text should be green.</span>
+<script>
+ if (window.testRunner)
+ testRunner.waitUntilDone();
+
+ function setSelection(textNode) {
+ window.getSelection().removeAllRanges();
+ var range = document.createRange();
+ range.setStart(textNode, 0);
+ range.setEnd(textNode, textNode.data.length);
+ window.getSelection().addRange(range);
+ }
+
+ setSelection(t1.firstChild);
+ requestAnimationFrame(() =>
+ requestAnimationFrame(() => {
+ t1.className = "green";
+ if (window.testRunner)
+ testRunner.notifyDone();
+ }));
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/paint/invalidation/selection/selection-repaint-expected.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698