[CSS Exclusions] Ignore ExclusionPolygon edges above minLogicalIntervalTop
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Feb 2013 23:20:27 +0000 (23:20 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Feb 2013 23:20:27 +0000 (23:20 +0000)
commit0cbc644bf5fd8a084ad8151712f6acf43d4b32ca
tree989ecf4f27486ba826c1aeabeeb2c1898ee08c75
parent185075faea2b6628d67dcf823542642d8ed8abcf
[CSS Exclusions] Ignore ExclusionPolygon edges above minLogicalIntervalTop
https://bugs.webkit.org/show_bug.cgi?id=107566

Patch by Hans Muller <hmuller@adobe.com> on 2013-02-07
Reviewed by David Hyatt.

Source/WebCore:

Improve ExclusionPolygon::firstIncludedIntervalLogicalTop() performance by only
creating offset edges for polygon edges that are below the horizontal minLogicalIntervalTop
line. In other words, don't bother creating offset edges that can't define the polygon's
first fit location.

Test: fast/exclusions/shape-inside/shape-inside-first-fit-004.html

* rendering/ExclusionPolygon.cpp:
(WebCore::ExclusionPolygon::firstIncludedIntervalLogicalTop): Don't create offset edges for polygon edges above minLogicalIntervalTop.

LayoutTests:

Added a simple polygonal shape-inside test where only a subset of the polygon edges
should contribute to each line's offset edges.

* fast/exclusions/shape-inside/shape-inside-first-fit-004-expected.html: Added.
* fast/exclusions/shape-inside/shape-inside-first-fit-004.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@142187 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/exclusions/shape-inside/shape-inside-first-fit-004-expected.html [new file with mode: 0644]
LayoutTests/fast/exclusions/shape-inside/shape-inside-first-fit-004.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/ExclusionPolygon.cpp