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

Issue 648880 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug-Regression



Sign in to add a comment

height: 100% interpreted differently in certain situations than before

Project Member Reported by zaborski@google.com, Sep 21 2016

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2859.0 Safari/537.36

Example URL:
http://jsbin.com/losamurewa/edit?html,output

Steps to reproduce the problem:
Put div with height: 100% inside a div inside a table cell, i.e.

<table>
  <tbody>
  <tr>
    <td>
      <div>
        <div style="height: 100%; border: 1px solid red;">
          Test on *browser*
        </div>
      </div>
    </td>
  </tr>
  </tbody>
</table>

What is the expected behavior?
Innermost div has non-zero height.

What went wrong?
Innermost div has zero height. The screenshot attached demonstrates behavior in Chrome 53 (stable), Chrome 55 (dev) and Firefox 48. Chrome dev is the only one demonstrating this behavior.

Does it occur on multiple sites: Yes

Is it a problem with a plugin? No 

Did this work before? Yes Chrome 53

Does this work in other browsers? Yes 

Chrome version: 55.0.2859.0  Channel: dev
OS Version: 
Flash Version: Shockwave Flash 23.0 r0
 
Screenshot from 2016-09-20 17:03:10.png
62.7 KB View Download
Project Member

Comment 1 by sheriffbot@chromium.org, Sep 21 2016

Labels: Hotlist-Google
Components: -Blink Blink>Layout

Comment 3 by e...@chromium.org, Sep 22 2016

Cc: robhogan@chromium.org szager@chromium.org
Labels: Needs-Bisect

Comment 4 by e...@chromium.org, Sep 22 2016

Cc: dgro...@chromium.org
Cc: ranjitkan@chromium.org
Labels: -Type-Bug -Needs-Bisect M-55 OS-Mac OS-Windows Type-Bug-Regression
Owner: r...@igalia.com
Able to reproduce the issue and is a regression broken in M55 builds on Windows, MAC and Ubuntu OS. below are the bisect details for the same:

Bisect info:
============
55.0.2844.0 - Good Build
55.0.2845.0 - Bad build

Bisect URL: 
===========
https://chromium.googlesource.com/chromium/src/+log/72679618a08ccd653fcca4efab460a5b2ebf0eac..9a12b00b915eccd82d4444ecba101f27e2761769

Change Url:
===========
https://chromium.googlesource.com/chromium/src/+/9a12b00b915eccd82d4444ecba101f27e2761769

@rego: Assigning to you, request you to please take a look into it.

Thanks.!
Labels: hasbisect-per-revision

Comment 7 by r...@igalia.com, Sep 26 2016

On a first sight it seems to be a quirks mode issue.
Adding <!DOCTYPE html> makes it work as expected.

Comment 8 by r...@igalia.com, Sep 26 2016

Status: Started (was: Unconfirmed)
I've a patch fixing this issue at: https://codereview.chromium.org/2376483002/

Comment 9 by jrn@google.com, Sep 26 2016

Does this need to be restrict-view-google?
Labels: allpublic
Project Member

Comment 11 by bugdroid1@chromium.org, Sep 27 2016

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

commit 5b0f27ec040f501eb7af22ea017db9f4f0c902dd
Author: rego <rego@igalia.com>
Date: Tue Sep 27 08:07:49 2016

Initialize properly availableHeight in computePercentageLogicalHeight

In r648880 we introduced a regression because of the new implementation
of LayoutBox::computePercentageLogicalHeight() was wrongly initializing
as 0 the availableHeight variable.
We should just use -1 like the code was doing before that patch.

BUG= 648880 
TEST=fast/table/quirks-mode-percent-height.html

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

[add] https://crrev.com/5b0f27ec040f501eb7af22ea017db9f4f0c902dd/third_party/WebKit/LayoutTests/fast/table/quirks-mode-percent-height-expected.html
[add] https://crrev.com/5b0f27ec040f501eb7af22ea017db9f4f0c902dd/third_party/WebKit/LayoutTests/fast/table/quirks-mode-percent-height.html
[modify] https://crrev.com/5b0f27ec040f501eb7af22ea017db9f4f0c902dd/third_party/WebKit/Source/core/layout/LayoutBox.cpp

Comment 12 by r...@igalia.com, Sep 27 2016

Status: Fixed (was: Started)

Sign in to add a comment