columnIndexAtOffset() with bottom offset problematic for zero-height objects
Reported by
msten...@opera.com,
Sep 28 2016
|
||||
Issue descriptionPassing LayoutBox::AssociateWithFormerPage with a bottom offset to columnIndexAtOffset() is problematic if the offset is the bottom of some zero height object right after a column break. We'll then return the index of the column preceding the break, while we'll (correctly) return the index of the column *after* the break when passing the top offset (which is the same value as the bottom offset, since the height is zero) with LayoutBox::AssociateWithLatterPage. This causes trouble e.g. when working out a column range for some block interval (which typically corresponds to a layout object). See what happened to columnIntervalForBlockRangeInFlowThread() in https://codereview.chromium.org/2360913004/diff/20001/third_party/WebKit/Source/core/layout/MultiColumnFragmentainerGroup.cpp#newcode444 Test that would cause an assertion failure without that hack: <!DOCTYPE html> <div style="columns:4; column-gap:10px; column-fill:auto; width:430px; height:100px;"> <div style="height:100px;"></div> <div id="empty" style="position:relative;"></div> <div style="height:100px;"></div> </div> <script> document.getElementById("empty").getClientRects(); </script>
,
Oct 30 2017
,
Nov 7 2017
,
Feb 13 2018
|
||||
►
Sign in to add a comment |
||||
Comment 1 by sheriffbot@chromium.org
, Oct 20 2017Owner: ----
Status: Untriaged (was: Assigned)