Remove redundant GraphicsContext::clip(const Path&, WindRule)
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 27 Oct 2015 04:03:38 +0000 (04:03 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 27 Oct 2015 04:03:38 +0000 (04:03 +0000)
commit22d9330f0f4bcf0c4531ca6452261f09cb14dd29
tree4ef7c48c8b871bab93efa2dbddf5971b50cbdc2a
parente8efb001b7d93197929589482893013cf1b7ec4c
Remove redundant GraphicsContext::clip(const Path&, WindRule)
https://bugs.webkit.org/show_bug.cgi?id=150584

Reviewed by Tim Horton.

GraphicsContext had both clipPath(const Path&, WindRule) and clip(const Path&, WindRule),
which were mostly the same other than GraphicsContext::clipPath() not clipping if the path
was empty (added, I think by mistake, in r72926), and not calling m_data->clip().

Make clipPath() be the winner, and have it behave like clip() with empty paths, and call m_data->clip().

* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::clipRoundedRect):
* platform/graphics/GraphicsContext.h:
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::clipPath):
(WebCore::GraphicsContext::clip): Deleted.
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::clipPath):
(WebCore::GraphicsContext::canvasClip):
(WebCore::GraphicsContext::clip): Deleted.
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintBoxShadow): Making a path, calling addRoundedRect() and then clipping
to the path is the same as context.clipRoundedRect().
* rendering/mathml/RenderMathMLRadicalOperator.cpp:
(WebCore::RenderMathMLRadicalOperator::paint):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@191617 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/GraphicsContext.cpp
Source/WebCore/platform/graphics/GraphicsContext.h
Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp
Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
Source/WebCore/rendering/RenderBoxModelObject.cpp
Source/WebCore/rendering/mathml/RenderMathMLRadicalOperator.cpp