Issue metadata
Sign in to add a comment
|
[LayoutNG] Vertical scrolling is broken in DevTools source viewer |
||||||||||||||||||||||||
Issue descriptionChrome Version: ToT OS: Linux What steps will reproduce the problem? (1) Load any page with LayoutNG enabled (2) Open DevTools, and then open source of any file (3) Try to scroll the source vertically What is the expected result? Can scroll the source file. What happens instead? Can't scroll the source file. Neither mouse wheel nor dragging scrollbar work. This causes LayoutNG layout test failure of http/tests/devtools/persistence/persistence-merge-editor-tabs.js
,
Sep 21
,
Sep 24
Playing with devtools in devtools, and inspecting the DOM tree, I tried to reconstruct something that would trigger similar problems. And that got me to the same test case as in bug 885185 . Percentage-height children of fixed-height flex items in a column flex container. Should probably try to fix that bug before marking this one as duplicate, though.
,
Sep 24
The problem is in AdjustChildPercentageSizeForQuirksAndFlex(), which ignores the fixed size of the flex item. Making it honor it makes this bug (and the bug I'm now merging this one into) go away (but that's highly unlikely to be the right fix). |
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 by xiaoche...@chromium.org
, Aug 31Update: It's due to wrong clientHeight of the scroller element. Repro steps: 1. Open DevTools (DT1) to view any source file. Make sure the file is long enough so that there's a vertical scroll bar 2. Open another DevTools (DT2) to inspect DT1. 3. In DT2, find DT1 source viewer's scroller element. This can be found by: 3.1 In DT2's console, run: let scrollers = document.querySelectorAll('* /deep/ div.CodeMirror-scroll'); 3.2 One of |scrollers| is the source viewer's scroller -- the one whose rect covers the source viewer 4. Check the scroller's scrollHeight and clientHeight Without LayoutNG: scrollHeight > clientHeight With LayoutNG: scrollHeight == clientHeight This is the smallest repro I've found so far that doesn't require getting into details of DevTools front end code.