[chromium] Fix layer sorting perspective w if w becomes negative
https://bugs.webkit.org/show_bug.cgi?id=82997
Reviewed by Adrienne Walker.
Source/WebCore:
Unit test added to CCLayerSorterTest.cpp.
This is a follow-up patch after r113364. That other patch
implemented proper clipping so that perspective transforms do not
accidentally make geometry disappear. This patch fixes a similar
problem in the layer sorter code so that layers do not
accidentally get sorted incorrectly.
* platform/graphics/chromium/cc/CCLayerSorter.cpp:
(WebCore::CCLayerSorter::LayerShape::LayerShape):
* platform/graphics/chromium/cc/CCMathUtil.cpp:
(WebCore::computeEnclosingRect):
(WebCore::addVertexToClippedQuad):
(WebCore::CCMathUtil::mapClippedQuad):
(WebCore):
(WebCore::CCMathUtil::computeEnclosingRectOfVertices):
* platform/graphics/chromium/cc/CCMathUtil.h:
(WebCore):
(CCMathUtil):
Source/WebKit/chromium:
* tests/CCLayerSorterTest.cpp:
(WebCore::TEST):
(WebCore):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@113606
268f45cc-cd09-0410-ab3c-
d52691b4dbfc