Closed Bug 1584655 Opened 5 years ago Closed 5 years ago

[wpt-sync] Sync PR 19382 - [LayoutNG] Fix inline-block overflow

Categories

(Core :: CSS Parsing and Computation, task, P4)

task

Tracking

()

RESOLVED FIXED
mozilla71
Tracking Status
firefox71 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 19382 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/19382
Details from upstream follow.

Aleks Totic <atotic@chromium.org> wrote:

[LayoutNG] Fix inline-block overflow

Scrolling overflow for line boxes was being computed
incorrectly. The block_end padding was being added
to linebox's scroll overflow. It should have been
added to linebox border box instead.

While investigating the standards that define
this behavior, I noticed that csswg has resolved
that both inline_padding and block_padding should
be used for overflow.

The existing code only used inline_padding. This did
not cause an error because block_padding was being added
somewhere else. I investigated, and it seems that
block_padding got added to layout_result.IntrinsicBlockSize(),
which then got passed to box_->ComputeLayoutOverflow()
I am not sure of why this is being done, and why it works.
I think that adding LayoutUnder() when we are explicitly
computing overflow is the right thing to do. It'll make
this code work when we switch to pure NG overflow
computation.

Bug: 1003373
Change-Id: I39b8399de463e9e9f1a2c4d906362b14f9a783ca
Reviewed-on: https://chromium-review.googlesource.com/1829490
WPT-Export-Revision: 16410178749782ae60213bba0828ee379febdd6a

Component: web-platform-tests → CSS Parsing and Computation
Product: Testing → Core
Ran 1 tests and 1 subtests
OK     : 1
FAIL   : 1

New tests that have failures or other problems:
/css/css-overflow/overflow-padding.html
    Container padding is applied approriately to block/inline children.: FAIL
Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/2e111506432f
[wpt PR 19382] - [LayoutNG] Fix inline-block overflow, a=testonly
https://hg.mozilla.org/integration/mozilla-inbound/rev/80721d621f5b
[wpt PR 19382] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71
You need to log in before you can comment on or make changes to this bug.