[CSS Shapes] Add support for the computing the included intervals for a BoxShape
https://bugs.webkit.org/show_bug.cgi?id=124605
Reviewed by Andreas Kling.
Source/WebCore:
Setting shape-inside to content-box now works.
Changed FloatRoundedRect::xInterceptsAtY() to include the bottom edge of
the rectangle and to check for the special cases where any or all of the
corner radii are empty.
Test: fast/shapes/shape-inside/shape-inside-content-box.html
* platform/graphics/FloatRoundedRect.cpp:
(WebCore::FloatRoundedRect::xInterceptsAtY):
* rendering/shapes/BoxShape.cpp:
(WebCore::BoxShape::getIncludedIntervals): Replaced the stub implementation with logic that's similar to getExcludedIntervals().
* rendering/shapes/ShapeInfo.cpp:
(WebCore::::computedShape): Removed a meaningless assert.
* rendering/shapes/ShapeInsideInfo.cpp:
(WebCore::ShapeInsideInfo::isEnabledFor):
LayoutTests:
Check that shape-inside:content-box works with and without border radii.
* fast/shapes/shape-inside/shape-inside-content-box-expected.html: Added.
* fast/shapes/shape-inside/shape-inside-content-box.html: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160644 268f45cc-cd09-0410-ab3c-d52691b4dbfc
8 files changed