[CSS Exclusions] shape-inside layout fails to adjust first line correctly for writing...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Dec 2012 19:08:41 +0000 (19:08 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Dec 2012 19:08:41 +0000 (19:08 +0000)
commitee26b9e367fea4dad60d34d72e1c0e6ddab0f932
treeabafe19a4b12eaf7fb4ba1b48a5c94e7883bd3c6
parentb2682aa3480de7973f62e76bf80aac6c088cdce1
[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: https://svn.webkit.org/repository/webkit/trunk@138043 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/exclusions/shape-inside/shape-inside-rounded-rectangle-fit-003-expected.html [new file with mode: 0644]
LayoutTests/fast/exclusions/shape-inside/shape-inside-rounded-rectangle-fit-003.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/ExclusionPolygon.cpp
Source/WebCore/rendering/ExclusionPolygon.h
Source/WebCore/rendering/ExclusionRectangle.cpp
Source/WebCore/rendering/ExclusionRectangle.h
Source/WebCore/rendering/ExclusionShape.cpp
Source/WebCore/rendering/ExclusionShape.h