getComputedStyle on absolute position element with padding on parent returns incorrect measurement
Reported by
desandro...@gmail.com,
Apr 6 2016
|
||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.110 Safari/537.36 Steps to reproduce the problem: See http://codepen.io/desandro/pen/vGWMrV/ A container element is sized to 400px wide, with 10% horizontal padding. Its child item element is absolutely positioned in it, with 10% left. What is the expected behavior? getComputedStyle( item ).left should be 40px (400px * 10%) What went wrong? getComputedStyle( item ).left returns 20.5 px Did this work before? No Chrome version: 49.0.2623.110 Channel: stable OS Version: OS X 10.11.3 Flash Version: Shockwave Flash 21.0 r0 Firefox v45 correctly returns 40px
,
Apr 8 2016
,
Apr 11 2016
I'd like to work on this issue.
,
May 4 2016
Owned by deokjin81.kim@samsung.com but is not currently a project member and can't be assigned as owner in crbug. Currently in progress: https://codereview.chromium.org/1876123002
,
May 12 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/9908f45b70b65fc242e050d33c67294fe870a1cb commit 9908f45b70b65fc242e050d33c67294fe870a1cb Author: deokjin81.kim <deokjin81.kim@samsung.com> Date: Thu May 12 21:23:59 2016 Absolute positioned child with percent should include containing block padding The padding box of the containing block is to be used for absolutely positioned descendants. But this rule is not applied yet. This CL fixes 2 issue. 1. getComputedStyle on absolute positioned child with percent-based left has to use containing block which includes padding box. 2. Absolute positioned child with percent-based padding also has to use containing block which includes padding box. BUG= 601030 Review-Url: https://codereview.chromium.org/1876123002 Cr-Commit-Position: refs/heads/master@{#393358} [add] https://crrev.com/9908f45b70b65fc242e050d33c67294fe870a1cb/third_party/WebKit/LayoutTests/fast/css/absolute-child-with-percent-padding-inside-relative-parent-expected.html [add] https://crrev.com/9908f45b70b65fc242e050d33c67294fe870a1cb/third_party/WebKit/LayoutTests/fast/css/absolute-child-with-percent-padding-inside-relative-parent.html [add] https://crrev.com/9908f45b70b65fc242e050d33c67294fe870a1cb/third_party/WebKit/LayoutTests/fast/css/getComputedStyle/getComputedStyle-absolute-child-with-percent-left-inside-relative-parent-expected.txt [add] https://crrev.com/9908f45b70b65fc242e050d33c67294fe870a1cb/third_party/WebKit/LayoutTests/fast/css/getComputedStyle/getComputedStyle-absolute-child-with-percent-left-inside-relative-parent.html [modify] https://crrev.com/9908f45b70b65fc242e050d33c67294fe870a1cb/third_party/WebKit/Source/core/layout/LayoutBox.cpp [modify] https://crrev.com/9908f45b70b65fc242e050d33c67294fe870a1cb/third_party/WebKit/Source/core/layout/LayoutTable.cpp
,
May 13 2016
|
||||
►
Sign in to add a comment |
||||
Comment 1 by kojii@chromium.org
, Apr 7 2016