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

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: Update an expected value of web-animations-api/animations-responsive-to-style-change.html 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..cee5e5ebb40d271b1f7661943b6caee6c7fc229b
--- /dev/null
+++ b/LayoutTests/fast/css/getComputedStyle/computed-style-percentage-top-with-position-inline.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<span id='outer' style="display:inline; position:relative; font:20px Ahem; border:10px solid red; margin:20px; padding:30px;">
+ outer
+ <div id='inner' style="position:absolute; top:50%; background:blue">inner</div>
+</span>
+<script src="../../../resources/js-test.js"></script>
+<script>
+ var inner = document.querySelector("#inner");
+ var computedStyle = window.getComputedStyle(inner, null);
+ shouldBeEqualToString("computedStyle.getPropertyValue('top')", "40px");
+</script>

Powered by Google App Engine
This is Rietveld 408576698