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

Side by Side Diff: LayoutTests/fast/repaint/position-change-keeping-geometry.html

Issue 536183002: Don't always full invalidation on 'position' style change (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@FlexAlignRepaint
Patch Set: Fix test (force z-index to avoid it from changing) Created 6 years, 3 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
« no previous file with comments | « no previous file | LayoutTests/fast/repaint/position-change-keeping-geometry-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="resources/text-based-repaint.js"></script>
3 <script>
4 function changePositionKeepingGeometry(id, newPosition) {
5 var target = document.getElementById(id);
6 var originalTop = target.offsetTop;
7 var originalLeft = target.offsetLeft;
8 target.style.position = newPosition;
9 target.style.top = originalTop + 'px';
10 target.style.left = originalLeft + 'px';
11 }
12
13 function repaintTest()
14 {
15 changePositionKeepingGeometry('target1', 'absolute');
16 changePositionKeepingGeometry('target2', 'absolute');
17 changePositionKeepingGeometry('target3', 'fixed');
18 }
19 onload = runRepaintTest;
20 </script>
21 <style>
22 body {
23 margin: 0;
24 }
25 div {
26 width: 100px;
27 height: 100px;
28 top: 20px;
29 background-color: blue;
30 }
31 #target1 {
32 left: 20px;
33 position: relative;
34 }
35 #target2 {
36 left: 220px;
37 position: fixed;
38 z-index: 0;
39 }
40 #target3 {
41 left: 420px;
42 position: absolute;
43 z-index: 0;
44 }
45 </style>
46 There should be no invalildations on change of position without actual change of position and size.
47 <div id="target1"></div>
48 <div id="target2"></div>
49 <div id="target3"></div>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/repaint/position-change-keeping-geometry-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698