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

Side by Side Diff: third_party/WebKit/LayoutTests/paint/invalidation/spv2/position-change-keeping-geometry.html

Issue 1366763002: Text expectations of paint/invalidation/spv2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 unified diff | Download patch
OLDNEW
1 <!-- Based on fast/repaint/position-change-keeping-geometry.html --> 1 <!-- Based on fast/repaint/position-change-keeping-geometry.html -->
2 <!DOCTYPE html> 2 <!DOCTYPE html>
3 <script src="resources/paint-invalidation-test.js"></script> 3 <script src="resources/paint-invalidation-test.js"></script>
4 <script> 4 <script>
5 function changePositionKeepingGeometry(id, newPosition) { 5 function changePositionKeepingGeometry(id, newPosition) {
6 var target = document.getElementById(id); 6 var target = document.getElementById(id);
7 var originalTop = target.offsetTop; 7 var originalTop = target.offsetTop;
8 var originalLeft = target.offsetLeft; 8 var originalLeft = target.offsetLeft;
9 target.style.position = newPosition; 9 target.style.position = newPosition;
10 target.style.top = originalTop + 'px'; 10 target.style.top = originalTop + 'px';
11 target.style.left = originalLeft + 'px'; 11 target.style.left = originalLeft + 'px';
12 } 12 }
13 13
14 window.expectedPaintInvalidationObjects = [
15 "LayoutBlockFlow (positioned) DIV id='target2'",
16 "LayoutBlockFlow (positioned) DIV id='target3'",
17 ];
18 function paintInvalidationTest() 14 function paintInvalidationTest()
19 { 15 {
20 changePositionKeepingGeometry('target1', 'absolute'); 16 changePositionKeepingGeometry('target1', 'absolute');
21 changePositionKeepingGeometry('target2', 'absolute'); 17 changePositionKeepingGeometry('target2', 'absolute');
22 changePositionKeepingGeometry('target3', 'fixed'); 18 changePositionKeepingGeometry('target3', 'fixed');
23 } 19 }
24 onload = runPaintInvalidationTest; 20 onload = runPaintInvalidationTest;
25 </script> 21 </script>
26 <style> 22 <style>
27 body { 23 body {
(...skipping 23 matching lines...) Expand all
51 position: absolute; 47 position: absolute;
52 z-index: 0; 48 z-index: 0;
53 } 49 }
54 </style> 50 </style>
55 There should be no invalildations on change of position without actual change of position and size. 51 There should be no invalildations on change of position without actual change of position and size.
56 <!-- target0 ensures we don't strip anonymous wrappers (and trigger a layout) wh en the other elements change position. --> 52 <!-- target0 ensures we don't strip anonymous wrappers (and trigger a layout) wh en the other elements change position. -->
57 <div id="target0"></div> 53 <div id="target0"></div>
58 <div id="target1"></div> 54 <div id="target1"></div>
59 <div id="target2"></div> 55 <div id="target2"></div>
60 <div id="target3"></div> 56 <div id="target3"></div>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698