New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 675943 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
NOT IN USE
Closed: Dec 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug-Regression



Sign in to add a comment

getBoundingClientRect returns 0s for an empty block element inside a column-count container

Reported by a.ep...@gmail.com, Dec 20 2016

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36

Steps to reproduce the problem:
1. Go to https://jsfiddle.net/7ew1e1uj/2/ 
2. It prints the `top` value of `getBoundingClientRect()` of the block element inside the container with `column-count` CSS rule.

What is the expected behavior?
It should print 8 (due to padding on the body element).

IE - 8
Safari - 8
Firefox - 8
Chrome - 0

What went wrong?
getBoundingClientRect() returns 0s for any empty (!) block element inside the `column-count` container. If that element had a content or height, then it would work as expected.

Did this work before? Yes 54.0.2840.99

Does this work in other browsers? Yes

Chrome version: 55.0.2883.95  Channel: stable
OS Version: OS X 10.12.2
Flash Version: Shockwave Flash 24.0 r0
 

Comment 1 by rsesek@chromium.org, Dec 20 2016

Cc: e...@chromium.org
Components: Blink>Layout>MultiCol
Labels: M-55
Owner: msten...@opera.com
Status: Assigned (was: Unconfirmed)
You are probably looking for a change made after 421638 (known good), but no later than 421650 (first known bad).
CHANGELOG URL:
  https://chromium.googlesource.com/chromium/src/+log/45574dc9eac15a50d1578bef23610846e539a933..035eb12a2d163d3d3c9185f800acd3d800d56444

Suspecting https://chromium.googlesource.com/chromium/src/+/7ebce92e1afa74a3c995b206bcb6b2f8b42689f4.
Project Member

Comment 2 by bugdroid1@chromium.org, Dec 22 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f84a9dc354e51ae5353f9cb580574496f9184822

commit f84a9dc354e51ae5353f9cb580574496f9184822
Author: mstensho <mstensho@opera.com>
Date: Thu Dec 22 08:16:36 2016

Even empty block intervals should be associated with a fragmentainer.

We need to visit the fragmentainer that a block lives in even if said block has
zero height. If we find a column set, don't perform initial bounds checking.

BUG= 675943 

Review-Url: https://codereview.chromium.org/2597633002
Cr-Commit-Position: refs/heads/master@{#440361}

[add] https://crrev.com/f84a9dc354e51ae5353f9cb580574496f9184822/third_party/WebKit/LayoutTests/fast/multicol/client-rects-sole-empty-block.html
[modify] https://crrev.com/f84a9dc354e51ae5353f9cb580574496f9184822/third_party/WebKit/Source/core/layout/FragmentainerIterator.cpp

Comment 3 by msten...@opera.com, Dec 22 2016

Status: Fixed (was: Assigned)

Sign in to add a comment