Skip to content
  • ojan@chromium.org's avatar
    Deprecated flexboxes subtract scrollbar width/height twice · 7e7af586
    ojan@chromium.org authored
    https://bugs.webkit.org/show_bug.cgi?id=98552
    
    Reviewed by Tony Chang.
    
    Source/WebCore:
    
    This is a regression from http://trac.webkit.org/changeset/119507.
    The problem is that contentHeight subtracts the scrollbar and
    RenderDeprecatedFlexbox subtracts the scrollbar.
    
    -Make it so that we only access override sizes if one has been set.
    I think this makes the calling code more clear.
    -If we don't have one set, grab the height/width - borderAndPadding.
    -Add a FIXME to change this all back to being borderbox sizes.
    There's something trick with making table padding/border work right for that
    though (noted in the original patch).
    
    Test: fast/flexbox/flexing-overflow-scroll-item.html
    
    * rendering/RenderBox.cpp:
    (WebCore::RenderBox::overrideLogicalContentWidth):
    (WebCore::RenderBox::overrideLogicalContentHeight):
    (WebCore::RenderBox::availableLogicalHeightUsing):
    * rendering/RenderBox.h:
    (RenderBox):
    * rendering/RenderDeprecatedFlexibleBox.cpp:
    (WebCore::contentWidthForChild):
    (WebCore):
    (WebCore::contentHeightForChild):
    (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
    (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
    (WebCore::RenderDeprecatedFlexibleBox::allowedChildFlex):
    
    LayoutTests:
    
    * fast/flexbox/flexing-overflow-scroll-item-expected.txt: Added.
    * fast/flexbox/flexing-overflow-scroll-item.html: Added.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130549 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    7e7af586