• Aleks Totic's avatar
    [LayoutNG] Initial implementation of scrollable overflow. · a8038d12
    Aleks Totic authored
    This patch was inspired by trying to fix scrollbar
    appearance of
    external/wpt/pointerevents/pointerevent_touch-action-span-test_touch-manual.html
    
    Vertical scrollbar was missing, and horizontal scrollbar was too short.
    
    Scrollable overflow is the space fragment will contribute to its
    container's scrollable area. For box, and text fragments, this area
    is equivalent to its border-box. Lineboxes are different, linebox
    size is independent of its scrollable area because linebox height
    is line height, and not "border-box" height.
    
    https://drafts.csswg.org/css2/visudet.html#inline-non-replaced
    "The vertical padding, border and margin of an inline,
    non-replaced box start at the top and bottom of the
    content area, and has nothing to do with the 'line-height'.
    But only the 'line-height' is used when calculating the
    height of the line box."
    
    This patch adds ScrollableOverflow method to all fragments.
    ScrollableOverflow of all fragment types except Linebox
    return border-box.
    Linebox returns sum of its children scroll overflows.
    
    This fixed "missing vertical scrollbar" portion of my test case.
    
    Tests:
    I've added 2 tests for overflow with inline children.
    
    overflow-inline-001.html tests padding and layout overflow.
    This tests currently fails, will have to wait for the part 2
    of this patch, "Inline_end padding for inline children".
    
    overflow-inline-002.html tests linebox ScrollableOverflow.
    
    1 test was rebased because results are closer to Legacy with NG
    (1px diff)
    
    
    Bug: 728378
    Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_layout_ng;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
    Change-Id: Id1bc204f0863eac23926c3cd1dbef0c544eb9b29
    Reviewed-on: https://chromium-review.googlesource.com/1067243
    Commit-Queue: Aleks Totic <atotic@chromium.org>
    Reviewed-by: default avatarKoji Ishii <kojii@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#560367}
    a8038d12
overflow-inline-002.html 1.02 KB