Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Issue 2673583005: Fix: absolutely positioned block too wide in LegacyLayout (Closed)

Created:
3 years, 10 months ago by atotic
Modified:
3 years, 10 months ago
Reviewers:
cbiesinger
CC:
blink-reviews, blink-reviews-layout_chromium.org, chromium-reviews, eae+blinkwatch, jchaffraix+rendering, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, szager+layoutwatch_chromium.org, zoltan1
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix: absolutely positioned block too wide in LegacyLayout example: <style type="text/css"> div#green-overlapping-test { border-left: green solid 25px; border-right: green solid 75px; height: 100px; left: auto; position: absolute; right: auto; width: auto; writing-mode: horizontal-tb; } div#red-overlapped-reference { background-color: red; height: 100px; width: 100px; } </style> <div id="green-overlapping-test"></div> <div id="red-overlapped-reference"></div> cause: Inside ng_block_layout_algorithm, we set initial inline length to width of containing space. inline_length comes from ResolveInlineLength. As containing_space does not have ShrinkToFit flag, ResolveInlineLength defaults to width of containing box. I believe containing_space should have ShrinkToFit flag set. This flag is set here: NGConstraintSpace::CreateFromLayoutObject .SetIsShrinkToFit( box.sizesLogicalWidthToFitContent(box.styleRef().logicalWidth())) My guess is that sizesLogicalWidthToFitContent should return true for out_of_flow blocks, but with old layout, one can never be sure. I've ran the full LayoutTests suite, and it works with the patch. BUG=635619 Review-Url: https://codereview.chromium.org/2673583005 Cr-Commit-Position: refs/heads/master@{#448123} Committed: https://chromium.googlesource.com/chromium/src/+/e37073cf5dc5e7e0a770e967af8571d455cacfe4

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -1 line) Patch
M third_party/WebKit/Source/core/layout/LayoutBox.cpp View 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 8 (4 generated)
atotic
ptal Minor bug I've encountered when attempting to run csswg test suite.
3 years, 10 months ago (2017-02-03 21:52:06 UTC) #2
cbiesinger
ok, lgtm. this should not have an adverse effect of legacy layout because that goes ...
3 years, 10 months ago (2017-02-03 22:22:05 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2673583005/1
3 years, 10 months ago (2017-02-03 22:25:28 UTC) #5
commit-bot: I haz the power
3 years, 10 months ago (2017-02-04 00:42:39 UTC) #8
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://chromium.googlesource.com/chromium/src/+/e37073cf5dc5e7e0a770e967af85...

Powered by Google App Engine
This is Rietveld 408576698