position:fixed content is not offset by relative positioned ancestors |
|||||
Issue descriptionVersion: 53.0.2783.2/dev OS: OSX 10.11.7b What steps will reproduce the problem? (1) Open the attached testcase, or visit: http://jsbin.com/qehakit (2) Notice the dark green box is not inside the light green box. The spec seems pretty clear so I think this is a bug. Both Firefox and Safari position this correctly. Interestingly, we only get the y offset wrong and the x offset is correct. What is the expected output? A dark green box inside a light green box. What do you see instead? A dark green box outside a light green box.
,
Oct 18 2016
Hi, I am interested with this issue, but I got confused by the fixed position spec. From the spec, https://www.w3.org/TR/CSS21/visuren.html#fixed-positioning, "The only difference is that for a fixed positioned box, the containing block is established by the viewport. ". Now that the fixed is positioned in the viewport, and its left/top is default, the fixed element should positioned at the left top of the viewport, overlay with "The dark". But when run this in firefox, the fixed element seems positioned to the relative element. Am I missing something in spec?
,
Nov 20 2016
Elements which have position:absolute but do not specify top, bottom, left or right are positioned as if they have position:static: https://www.w3.org/TR/CSS2/visudet.html#abs-non-replaced-width http://www.w3.org/TR/CSS2/visudet.html#abs-non-replaced-height position:fixed elements appear to be spec'ed as if they are just like position:absolute, except for the adjustment for viewport: https://www.w3.org/TR/CSS2/visuren.html#fixed-positioning This appears to be a Layout bug.
,
Nov 21 2016
,
Dec 5 2016
Guys, if you don't mind I would like to have a look. It is an interesting issue to investigate.
,
Dec 5 2016
Fine with me, I'm busy elsewhere at the moment.
,
Dec 6 2016
,
Dec 15 2016
,
Dec 21 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/f91316113420b5f208dadb3a47f626a24a455fd7 commit f91316113420b5f208dadb3a47f626a24a455fd7 Author: a.obzhirov <a.obzhirov@samsung.com> Date: Wed Dec 21 16:37:04 2016 position:fixed content is not offset by relative positioned ancestors For positioned objects take into account the relative positioned ancestors' offset when computing logical top (similar to logical left computing). BUG= 624667 Review-Url: https://codereview.chromium.org/2577893004 Cr-Commit-Position: refs/heads/master@{#440125} [add] https://crrev.com/f91316113420b5f208dadb3a47f626a24a455fd7/third_party/WebKit/LayoutTests/fast/block/positioning/fixed-position-with-relative-parent-expected.html [add] https://crrev.com/f91316113420b5f208dadb3a47f626a24a455fd7/third_party/WebKit/LayoutTests/fast/block/positioning/fixed-position-with-relative-parent.html [modify] https://crrev.com/f91316113420b5f208dadb3a47f626a24a455fd7/third_party/WebKit/LayoutTests/fast/dom/HTMLDialogElement/fixpos-dialog-layout-expected.txt [modify] https://crrev.com/f91316113420b5f208dadb3a47f626a24a455fd7/third_party/WebKit/LayoutTests/paint/invalidation/fixed-margin-change-repaint-expected.txt [modify] https://crrev.com/f91316113420b5f208dadb3a47f626a24a455fd7/third_party/WebKit/LayoutTests/platform/android/paint/invalidation/fixed-margin-change-repaint-expected.txt [modify] https://crrev.com/f91316113420b5f208dadb3a47f626a24a455fd7/third_party/WebKit/Source/core/layout/LayoutBox.cpp
,
Dec 22 2016
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by l446240525@gmail.com
, Jun 30 2016