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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/css/getComputedStyle/getComputedStyle-absolute-child-with-percent-left-inside-relative-parent.html

Issue 1876123002: Absolute positioned child with percent should include containing block padding (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Modify commit message 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <style>
3 .container {
4 width: 400px;
5 height: 100px;
6 background: #DDD;
7 position: relative;
8 }
9
10 .item {
11 width: 100px;
12 height: 100px;
13 background: #09F;
14 left: 10%;
15 position: absolute;
16 }
17 </style>
18 <script src="../../../resources/js-test.js"></script>
19 <div class="container">
20 <div class="item">
21 </div>
22 </div>
23 <script>
24 description("Blue item box is 10% left in container. Box should display 40px a s getComputedStyle( item ).left should return 40px (400px * 10%)");
25 var item = document.querySelector('.item');
26 var computedStyle = window.getComputedStyle(item);
27 shouldBe("computedStyle.getPropertyValue('left')", "'40px'");
28 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698