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

Side by Side Diff: LayoutTests/fast/css/getComputedStyle/computed-style-top-of-absolute-positioned-element.html

Issue 1007623003: Fix incorrect percentage top for positioned elements. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 9 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
(Empty)
1 <!DOCTYPE html>
2 <style>
3 .outer {
4 position: absolute;
5 }
6 .outerMarginBorderPadding {
7 position: absolute;
8 border: 10px solid red;
9 margin: 20px;
10 padding: 30px;
11 }
12
13 .inner {
14 width: 20px;
15 height: 20px;
16 top: 50%;
17 background: blue;
18 position: absolute;
19 }
20
21 </style>
22 <div class='outer'>
23 <div class='inner'></div>
24 </div>
25 <script src="../../../resources/js-test.js"></script>
26 <script>
27 var inner = document.querySelector(".inner");
28 var outer = document.querySelector(".outer");
29 var computedStyle = window.getComputedStyle(inner, null);
30 shouldBeEqualToString("computedStyle.getPropertyValue('top')", "0px");
31
32 outer.className = "outerMarginBorderPadding";
33 shouldBeEqualToString("computedStyle.getPropertyValue('top')", "30px");
34 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698