Issue metadata
Sign in to add a comment
|
getClientRects() incorrectly clipped by multicol ancestor
Reported by
punit.gu...@comprotechnologies.com,
Jan 27 2017
|
||||||||||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36 Steps to reproduce the problem: Please refer: https://jsfiddle.net/r2k1ng1t/5/ 1. Make a div and use column-count property. 2. Make its child element. 3. Give position: relative to the child and then give left: -ve value. What is the expected behavior? Child element should not crop and the offset left value should decrement with left: -ve value What went wrong? In the case of multiple columns, parent element is cropping the child. Due to this left offset value is also coming wrong. It was fine in chrome version 54 Did this work before? Yes 54 Does this work in other browsers? Yes Chrome version: 55.0.2883.87 Channel: n/a OS Version: 10.0 Flash Version: Shockwave Flash 24.0 r0 Please refer: https://jsfiddle.net/r2k1ng1t/5/ OR https://output.jsbin.com/jewivo
,
Jan 30 2017
,
Feb 2 2017
,
Mar 14 2017
Needs a framework-less test case (i.e. get rid of jQuery).
,
Mar 14 2017
(the initially reported cropping was fixed by the fix for bug 571978 , but there appears to be more things failing in that fiddle)
,
Mar 15 2017
jQuery gone. Relative positioning isn't necessary, after all. Any overflow/underflow situation will do. Looks like getClientRects() on a child will intersect with the content-box of the multicol container, or column, or something like that, which leads to over-clipped results. offsetLeft and offsetTop work just fine, FWIW.
,
Mar 20 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/350e4e8fb42a8010e96506fc8bbcab6ca75b5639 commit 350e4e8fb42a8010e96506fc8bbcab6ca75b5639 Author: mstensho <mstensho@opera.com> Date: Mon Mar 20 17:26:38 2017 getClientRects() shouldn't clip against any ancestors. Inside multicol we used to clip against the column box of each fragment. Since fragments don't really exist in our implementation (we rather have this tall flow thread which we slice into columns, when appropriate), we still need to clip in the block direction, to properly fake the fragments. Removed fragmentainerInFlowThread(), since it's no longer used. Added a parameter to the clip rectangle calculation code, to be able to only limit the clip rectangles in the block direction. BUG= 685927 Review-Url: https://codereview.chromium.org/2750153002 Cr-Commit-Position: refs/heads/master@{#458109} [add] https://crrev.com/350e4e8fb42a8010e96506fc8bbcab6ca75b5639/third_party/WebKit/LayoutTests/fast/multicol/client-rect-overflowing-multicol-2-columns.html [add] https://crrev.com/350e4e8fb42a8010e96506fc8bbcab6ca75b5639/third_party/WebKit/LayoutTests/fast/multicol/client-rect-overflowing-multicol.html [modify] https://crrev.com/350e4e8fb42a8010e96506fc8bbcab6ca75b5639/third_party/WebKit/Source/core/layout/FragmentainerIterator.cpp [modify] https://crrev.com/350e4e8fb42a8010e96506fc8bbcab6ca75b5639/third_party/WebKit/Source/core/layout/FragmentainerIterator.h [modify] https://crrev.com/350e4e8fb42a8010e96506fc8bbcab6ca75b5639/third_party/WebKit/Source/core/layout/LayoutFlowThread.cpp [modify] https://crrev.com/350e4e8fb42a8010e96506fc8bbcab6ca75b5639/third_party/WebKit/Source/core/layout/MultiColumnFragmentainerGroup.cpp [modify] https://crrev.com/350e4e8fb42a8010e96506fc8bbcab6ca75b5639/third_party/WebKit/Source/core/layout/MultiColumnFragmentainerGroup.h
,
Mar 20 2017
|
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by phistuck@chromium.org
, Jan 27 2017Status: Untriaged (was: Unconfirmed)