Region can acquire an empty span by subtracting an empty Region
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Mar 2012 15:37:33 +0000 (15:37 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Mar 2012 15:37:33 +0000 (15:37 +0000)
commit6fe750a1246df4b5e15746156a2bf7ac9f6aab7b
tree9e3baa94320c0db162d88c6d4d8c1134808448d3
parent259a688347dcbf59223da7c308307f7a934e54e9
Region can acquire an empty span by subtracting an empty Region
https://bugs.webkit.org/show_bug.cgi?id=81074

Patch by Dana Jansens <danakj@chromium.org> on 2012-03-14
Reviewed by Anders Carlsson.

Source/WebCore:

Subtracting an empty Region B from a Region A can cause A to end
up with an empty span. This violates the rule that two Regions
that cover the exact same area should have equal spans and segments.

Unit test: RegionTest.emptySpan

* platform/graphics/Region.cpp:
(WebCore::Region::subtract):

Source/WebKit/chromium:

* tests/RegionTest.cpp:
(WebCore::TEST):
(WebCore):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@110704 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/Region.cpp
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/tests/RegionTest.cpp