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

Unified Diff: third_party/WebKit/LayoutTests/fast/images/drag-image-descendant-painting-sibling.html

Issue 1982943002: Drag images should paint descendants that are painting siblings of the dragged element (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update comments & rebase Created 4 years, 7 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/fast/images/drag-image-descendant-painting-sibling-expected.png » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/images/drag-image-descendant-painting-sibling.html
diff --git a/third_party/WebKit/LayoutTests/fast/images/drag-image-2.html b/third_party/WebKit/LayoutTests/fast/images/drag-image-descendant-painting-sibling.html
similarity index 53%
copy from third_party/WebKit/LayoutTests/fast/images/drag-image-2.html
copy to third_party/WebKit/LayoutTests/fast/images/drag-image-descendant-painting-sibling.html
index 312095d0c8164440df690afc51cf9e4ee91e6027..e5528a26bed1d4b4de38f6a74d687492737d695d 100644
--- a/third_party/WebKit/LayoutTests/fast/images/drag-image-2.html
+++ b/third_party/WebKit/LayoutTests/fast/images/drag-image-descendant-painting-sibling.html
@@ -1,27 +1,32 @@
<!DOCTYPE html>
<style>
- body {
- background-color: red;
+ #draggable {
+ position: relative;
+ width: 100px;
+ height: 100px;
+ background: red;
+ -webkit-user-drag: element;
}
- #image {
- width: 50px;
- height: 50px;
- background-image: url('resources/grid-transparent.png');
- -webkit-user-drag: element;
+ #descendant-painting-sibling {
+ position: relative;
+ width: 100px;
+ height: 100px;
+ background: green;
+ -webkit-user-drag: none;
}
</style>
-<body>
- <!-- Simulate dragging an element and dump the generated drag image.
- The expected result should be the same as the input image,
- without seeing a red background. -->
- <div id="image"></div>
-</body>
+<div id="draggable">
+ <div id="descendant-painting-sibling"></div>
+</div>
+This test passes if the generated drag image is a 100x100 green box.
+The purpose of this test is to verify elements that are descendants of the dragged element
+but paint into an ancestor stacking context are correctly included in the drag image.
<script>
function drag() {
testRunner.dumpDragImage();
- var image = document.getElementById('image');
+ var image = document.getElementById('draggable');
var startX = image.offsetLeft + image.offsetWidth / 2;
var startY = image.offsetTop + image.offsetHeight / 2;
var positionX = startX + image.offsetWidth;
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/images/drag-image-descendant-painting-sibling-expected.png » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698