[Qt] GraphicsContext::clip(path) should clip using winding fill
authorreni@webkit.org <reni@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 2 Dec 2010 12:38:13 +0000 (12:38 +0000)
committerreni@webkit.org <reni@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 2 Dec 2010 12:38:13 +0000 (12:38 +0000)
https://bugs.webkit.org/show_bug.cgi?id=49912

Patch by Renata Hodovan <reni@webkit.org> on 2010-12-02
Reviewed by Andreas Kling.

GraphicsContext::clip(path) now uses winding fill and this function is called by
GraphicsContext::canvasClip(path).

No new test is needed.

* platform/graphics/qt/GraphicsContextQt.cpp:
(WebCore::GraphicsContext::clip):
(WebCore::GraphicsContext::canvasClip):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@73123 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/platform/graphics/qt/GraphicsContextQt.cpp

index eee4304..6b336cf 100644 (file)
@@ -1,3 +1,19 @@
+2010-12-02  Renata Hodovan  <reni@webkit.org>
+
+        Reviewed by Andreas Kling.
+
+        [Qt] GraphicsContext::clip(path) should clip using winding fill 
+        https://bugs.webkit.org/show_bug.cgi?id=49912
+
+        GraphicsContext::clip(path) now uses winding fill and this function is called by
+        GraphicsContext::canvasClip(path).
+
+        No new test is needed.
+
+        * platform/graphics/qt/GraphicsContextQt.cpp:
+        (WebCore::GraphicsContext::clip):
+        (WebCore::GraphicsContext::canvasClip):
+
 2010-12-01  Alexander Pavlov  <apavlov@chromium.org>
 
         Reviewed by Yury Semikhatsky.
index a840525..0d6c640 100644 (file)
@@ -1130,17 +1130,14 @@ void GraphicsContext::clip(const Path& path)
     if (paintingDisabled())
         return;
 
-    m_data->p()->setClipPath(path.platformPath(), Qt::IntersectClip);
+    QPainterPath clipPath = path.platformPath();
+    clipPath.setFillRule(Qt::WindingFill);
+    m_data->p()->setClipPath(clipPath, Qt::IntersectClip);
 }
 
 void GraphicsContext::canvasClip(const Path& path)
 {
-    if (paintingDisabled())
-        return;
-
-    QPainterPath clipPath = path.platformPath();
-    clipPath.setFillRule(Qt::WindingFill);
-    m_data->p()->setClipPath(clipPath, Qt::IntersectClip);
+    clip(path);
 }
 
 void GraphicsContext::clipOut(const Path& path)