Skip to content
  • commit-queue@webkit.org's avatar
    [CSS Shapes] New positioning model: Borders · 105a51fa
    commit-queue@webkit.org authored
    https://bugs.webkit.org/show_bug.cgi?id=118822
    
    Patch by Bem Jones-Bey <bjonesbe@adobe.com> on 2013-07-23
    Reviewed by Dean Jackson.
    
    Source/WebCore:
    
    Converting to the shape coordinate system was not properly accounting
    for borders and padding. This has been fixed and a new convienence
    method added because of the added complexity of the conversion.
    
    Test: csswg/submitted/shapes/shape-outside/shape-outside-floats-square-border-000.html
    
    * rendering/RenderBlock.cpp:
    (WebCore::RenderBlock::logicalLeftFloatOffsetForLine): Update to use
        computeSegmentsForContainingBlockLine to do the coordinate
        conversion.
    (WebCore::RenderBlock::logicalRightFloatOffsetForLine): Ditto.
    * rendering/RenderBlockLineLayout.cpp:
    (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded): Ditto.
    * rendering/shapes/ShapeOutsideInfo.cpp:
    (WebCore::ShapeOutsideInfo::computeSegmentsForContainingBlockLine):
        Add new method to do the coordinate conversion from the containing
        block coordinate system to the coordinate system of the shape so
        that the segments can be correctly calculated.
    
    LayoutTests:
    
    Test that the shape is properly respected when the float has a border.
    
    * csswg/submitted/shapes/shape-outside/shape-outside-floats-square-border-000-expected.html: Added.
    * csswg/submitted/shapes/shape-outside/shape-outside-floats-square-border-000.html: Added.
    * csswg/submitted/shapes/shape-outside/w3c-import.log: Updated with new
        import information.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153058 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    105a51fa