Skip to content
  • commit-queue@webkit.org's avatar
    [CSS Exclusions] shape-inside layout fails to adjust first line correctly for... · cdf0e482
    commit-queue@webkit.org authored
    [CSS Exclusions] shape-inside layout fails to adjust first line correctly for writing-mode: vertical-rl
    https://bugs.webkit.org/show_bug.cgi?id=104419
    
    Patch by Hans Muller <hmuller@adobe.com> on 2012-12-18
    Reviewed by Dirk Schulze.
    
    Source/WebCore:
    
    ExclusionShapes no longer maintain a private "internal" coordinate system,
    they're now defined in logical coordinates. The createExclusionShape() method
    now handles the one-time conversion from physical to logical coordinates.
    
    Test: fast/exclusions/shape-inside/shape-inside-rounded-rectangle-fit-003.html
    
    * rendering/ExclusionPolygon.cpp:
    (WebCore::ExclusionPolygon::getExcludedIntervals): Removed logical to internal coordinate conversions.
    (WebCore::ExclusionPolygon::getIncludedIntervals): Ditto.
    (WebCore::ExclusionPolygon::firstIncludedIntervalLogicalTop): Ditto.
    * rendering/ExclusionPolygon.h:
    * rendering/ExclusionRectangle.cpp:
    (WebCore::ExclusionRectangle::getExcludedIntervals): Removed logical to internal coordinate conversions.
    (WebCore::ExclusionRectangle::getIncludedIntervals): Ditto.
    (WebCore::ExclusionRectangle::firstIncludedIntervalLogicalTop): Ditto.
    * rendering/ExclusionRectangle.h:
    * rendering/ExclusionShape.cpp:
    (WebCore::physicalRectToLogical): Convert a FloatRect defined with coordinates to logical coordinates.
    (WebCore::physicalPointToLogical): Similar.
    (WebCore::physicalSizeToLogical): Simlar.
    (WebCore::ExclusionShape::createExclusionShape): Convert shapes from physical to logical coordinates.
    * rendering/ExclusionShape.h:
    (ExclusionShape): Removed internal to logical coordinate conversion utility methods.
    
    LayoutTests:
    
    For the vertical writing modes, verify that rounded rectangle shape-inside content is
    adjusted in the logical down direction when it will not fit betwen the rounded corners.
    
    * fast/exclusions/shape-inside/shape-inside-rounded-rectangle-fit-003-expected.html: Added.
    * fast/exclusions/shape-inside/shape-inside-rounded-rectangle-fit-003.html: Added.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138043 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    cdf0e482