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

Unified Diff: LayoutTests/fast/css/getComputedStyle/computed-style-percentage-top-with-position-inline.html

Issue 1007623003: Fix incorrect percentage top for positioned elements. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Addressed comments 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/css/getComputedStyle/computed-style-percentage-top-with-position-inline.html
diff --git a/LayoutTests/fast/css/getComputedStyle/computed-style-percentage-top-with-position-inline.html b/LayoutTests/fast/css/getComputedStyle/computed-style-percentage-top-with-position-inline.html
new file mode 100644
index 0000000000000000000000000000000000000000..67990cc1e09b0853e2d0bd55cd07f55f40a4fb4c
--- /dev/null
+++ b/LayoutTests/fast/css/getComputedStyle/computed-style-percentage-top-with-position-inline.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+</style>
mstensho (USE GERRIT) 2015/04/13 21:40:04 Stray terminator.
changseok 2015/04/14 06:27:21 Removed.
+<span id='outer' style="display:inline; position:relative; border:10px solid red; margin:20px; padding:30px;">
mstensho (USE GERRIT) 2015/04/13 21:40:04 Could you please add a line-height declaration her
changseok 2015/04/14 06:27:21 Done.
+ outer
+ <div id='inner' style="position:absolute; top:50%; background:blue">inner</div>
+</span>
+<script src="../../../resources/js-test.js"></script>
+<script>
+ var outer = document.querySelector("#outer");
+ var inner = document.querySelector("#inner");
+ var computedStyle = window.getComputedStyle(inner, null);
+ shouldBeEqualToString("computedStyle.getPropertyValue('top')", "39px");
+</script>

Powered by Google App Engine
This is Rietveld 408576698