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

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: Updated CL Created 5 years, 8 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..9cdd9dc8a36980fe36f6c5134eb985aa112d6ef0
--- /dev/null
+++ b/LayoutTests/fast/css/getComputedStyle/computed-style-percentage-top-with-position-inline.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<span id='outer' style="display:inline; position:relative; line-height:50px; border:10px solid red; margin:20px; padding:30px;">
mstensho (USE GERRIT) 2015/04/14 09:20:07 Sorry for misleading you, but line-height:50px did
changseok 2015/04/14 09:48:28 No problem. 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