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

Unified Diff: LayoutTests/fast/masking/clip-path-selection.html

Issue 240423005: [CSS Shapes] Can't select content within the area of the floating box when clip-path is applied (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Try to make test more stable Created 6 years, 8 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 | LayoutTests/fast/masking/clip-path-selection-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/masking/clip-path-selection.html
diff --git a/LayoutTests/fast/masking/clip-path-selection.html b/LayoutTests/fast/masking/clip-path-selection.html
new file mode 100644
index 0000000000000000000000000000000000000000..10545d4fd77403d607d6a23a86cd436e19b8122e
--- /dev/null
+++ b/LayoutTests/fast/masking/clip-path-selection.html
@@ -0,0 +1,39 @@
+<style>
+body {
+ width: 600px;
+ font: 18px/1 Ahem;
+}
+
+#triangleLeft {
+ position: absolute;
+ top: 0px;
+ left: 0px;
+ width: 400px;
+ height: 400px;
+ background: green;
+ -webkit-clip-path: polygon(0 0, 100% 50%, 0 100%);
+}
+</style>
+
+<div id="triangleLeft">Although the Culture was originated by humanoid species, subsequent interactions with other civilizations have introduced many non-humanoid species into the Culture (including some former enemy civilizations), though the majority of the biological Culture is still pan-human. Little uniformity exists in the Culture, and its citizens are such by choice, free to change physical form and even species (though some stranger biological conversions are irreversible, and conversion from biological to artificial sentience is considered to be what is known as an Unusual Life Choice). All members are also free to join, leave, and rejoin, or indeed declare themselves to be, say, 80% Culture.</div>
+
+<script src="../../resources/js-test.js"></script>
+<script>
+ var sel = window.getSelection();
+ sel.removeAllRanges();
+ // select part of the polygon, not the text
+ eventSender.mouseMoveTo(180, 40);
+ eventSender.mouseDown();
+ eventSender.mouseMoveTo(200, 40);
+ eventSender.mouseUp();
+ shouldBe('sel.toString()', '""');
+
+ sel.removeAllRanges();
+ // select 'Little' using select drag
+ eventSender.mouseMoveTo(0, 260);
+ eventSender.mouseDown();
+ eventSender.mouseMoveTo(100, 260);
+ eventSender.mouseUp();
+ // verify that 'Little' was selected
+ shouldBe('sel.toString()', '"Little"');
+</script>
« no previous file with comments | « no previous file | LayoutTests/fast/masking/clip-path-selection-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698