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

Unified Diff: third_party/WebKit/LayoutTests/fast/css/getComputedStyle/getComputedStyle-left.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: Apply mstensho's comment 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
Index: third_party/WebKit/LayoutTests/fast/css/getComputedStyle/getComputedStyle-left.html
diff --git a/third_party/WebKit/LayoutTests/fast/css/getComputedStyle/getComputedStyle-left.html b/third_party/WebKit/LayoutTests/fast/css/getComputedStyle/getComputedStyle-left.html
new file mode 100644
index 0000000000000000000000000000000000000000..94ad9f7fe27ea45def852df05af4c2578e969296
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/css/getComputedStyle/getComputedStyle-left.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<style>
+ .container {
+ width: 400px;
+ height: 100px;
+ background: #DDD;
+ position: relative;
+ padding: 0px 0px;
mstensho (USE GERRIT) 2016/05/12 09:34:03 That's the initial value for padding. You can just
Deokjin Kim 2016/05/12 11:24:20 Done.
+ }
+
+ .item {
+ width: 100px;
+ height: 100px;
+ background: #09F;
+ left: 10%;
+ position: absolute;
+ }
+</style>
+<script src="../../../resources/js-test.js"></script>
+<div class="container">
+ <div class="item">
+ </div>
+</div>
+<script>
+ description("Blue item box is 10% left in container. Box should display 40px as getComputedStyle( item ).left should return 40px (400px * 10%)");
+ var item = document.querySelector('.item');
+ var computedStyle = window.getComputedStyle(item);
+ shouldBe("computedStyle.getPropertyValue('left')", "'40px'");
+</script>

Powered by Google App Engine
This is Rietveld 408576698