[LayoutNG] DevTools sidebars no longer full width |
||||||
Issue descriptionChrome Version: 72.0.3597.0 What steps will reproduce the problem? (1) Open any DevTools panel with a sidebar (Console sidebar, Sources navigator, Memory, Application, Security) (2) Select a sidebar item What is the expected result? Sidebar items should take up the full width. What happens instead? Items are cutoff based on their content size. Screenshot: https://imgur.com/a/kVxstLC
,
Oct 31
To clarify #c1, I'm on Linux running Chrome Version 70.0.3538.77 (64-bit) Nothing "unusual" about my setup, AFAIK.
,
Oct 31
@mstensho: Dup of crbug.com/885185 ?
,
Oct 31
,
Dec 3
We should fix this. Attaching the minimum reproducible case.
The problem is that
{ display: inline-block; width: auto, min-width: 100% }
is getting resolved to kFitContent width, instead of width of ConstraintSpace().
I tried fixing it, but there are too many unknowns in play.
My suspicion is that ng_line_breaker is incorrectly resolving inline-block's min-width:100% to kFitContent around ng_line_breaker:811
,
Dec 3
Thanks for reducing that! Further simplified TC with no flexbox attached. ComputeInlineSizeForFragment() seems to be a bit closer to the problem: #0 blink::ComputeInlineSizeForFragment (space=..., node=..., border_padding=..., override_minmax=0x0) at ../../third_party/blink/renderer/core/layout/ng/ng_length_utils.cc:523 #1 0x00007fffe2b14111 in blink::CalculateBorderBoxSize (constraint_space=..., node=..., block_content_size=-1px, border_padding=...) at ../../third_party/blink/renderer/core/layout/ng/ng_length_utils.cc:1039 #2 0x00007fffe2ae40ba in blink::NGBlockLayoutAlgorithm::Layout (this=0x7fffa34b1a18) at ../../third_party/blink/renderer/core/layout/ng/ng_block_layout_algorithm.cc:357 #3 0x00007fffe2af6b99 in blink::(anonymous namespace)::LayoutWithAlgorithm (node=..., space=..., break_token=0x0) at ../../third_party/blink/renderer/core/layout/ng/ng_block_node.cc:75 #4 0x00007fffe2af576d in blink::NGBlockNode::Layout (this=0x7fffa34b3a80, constraint_space=..., break_token=0x0) at ../../third_party/blink/renderer/core/layout/ng/ng_block_node.cc:269 #5 0x00007fffe2afaa74 in blink::NGBlockNode::LayoutAtomicInline (this=0x7fffa34b3a80, parent_constraint_space=..., parent_style=..., baseline_type=blink::kAlphabeticBaseline, use_first_line_style=false) at ../../third_party/blink/renderer/core/layout/ng/ng_block_node.cc:884 #6 0x00007fffe2d5b9ed in blink::NGLineBreaker::HandleAtomicInline (this=0x7fffa34b47a8, item=...) at ./../../third_party/blink/renderer/core/layout/ng/inline/ng_line_breaker.cc:799 #7 0x00007fffe2d58945 in blink::NGLineBreaker::BreakLine (this=0x7fffa34b47a8) at ./../../third_party/blink/renderer/core/layout/ng/inline/ng_line_breaker.cc:281 Under some circumstances we enter a block of code that just resolves the inline length for fit-content, but doesn't explicitly clamp to min-inline-size and max-inline-size. The code seems to rely on the min/max values stored in legacy being clamped to min-inline-size and max-inline-size, but this isn't the case if those values were percentage-based. Or something like that.
,
Dec 4
Reduction that doesn't depend on inline layout.
,
Dec 4
Thank you Morten!
,
Dec 5
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/09554587ea7aeaccea14eb54a95660f4e369c7ad commit 09554587ea7aeaccea14eb54a95660f4e369c7ad Author: Morten Stenshorne <mstensho@chromium.org> Date: Wed Dec 05 06:50:44 2018 [LayoutNG] Honor {min,max}-inline-size when using cached intrinsic size. We store cached min/max intrinsic inline sizes in legacy layout objects. These are normally constrained against {min,max}-inline-size, but not if those values are percentage based, since percentages are obviously not resolvable at the time of calculating intrinsic sizes. In such cases we cannot use the cached values directly. Calculate intrinsic size and apply constraints on our own in such cases. Bug: 900390 Change-Id: I90b8ab590fa97e8ec7929bc1af38cf3824f9ea6b Reviewed-on: https://chromium-review.googlesource.com/c/1360853 Reviewed-by: Koji Ishii <kojii@chromium.org> Reviewed-by: Aleks Totic <atotic@chromium.org> Reviewed-by: Christian Biesinger <cbiesinger@chromium.org> Commit-Queue: Morten Stenshorne <mstensho@chromium.org> Cr-Commit-Position: refs/heads/master@{#613889} [modify] https://crrev.com/09554587ea7aeaccea14eb54a95660f4e369c7ad/third_party/blink/renderer/core/layout/ng/ng_length_utils.cc [add] https://crrev.com/09554587ea7aeaccea14eb54a95660f4e369c7ad/third_party/blink/web_tests/external/wpt/css/css-sizing/percentage-min-width.html
,
Dec 5
|
||||||
►
Sign in to add a comment |
||||||
Comment 1 by atotic@chromium.org
, Oct 31Status: Assigned (was: Untriaged)