[Apple] Squelch stderr log regarding negative stroke thickness
authormmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Jan 2015 00:30:41 +0000 (00:30 +0000)
committermmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Jan 2015 00:30:41 +0000 (00:30 +0000)
https://bugs.webkit.org/show_bug.cgi?id=140372
<rdar://problem/19426485>

Reviewed by Eric Carlson.

No new tests because there is no visible behavior change.

* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::setPlatformStrokeThickness):

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

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp

index 4e1f03e8777eca455bddfca7940b29b255ba3d1f..0bc8135beb4c017780398e0fbc39e673a31097e1 100644 (file)
@@ -1,3 +1,16 @@
+2015-01-12  Myles C. Maxfield  <mmaxfield@apple.com>
+
+        [Apple] Squelch stderr log regarding negative stroke thickness
+        https://bugs.webkit.org/show_bug.cgi?id=140372
+        <rdar://problem/19426485>
+
+        Reviewed by Eric Carlson.
+
+        No new tests because there is no visible behavior change.
+
+        * platform/graphics/cg/GraphicsContextCG.cpp:
+        (WebCore::GraphicsContext::setPlatformStrokeThickness):
+
 2015-01-12  Timothy Horton  <timothy_horton@apple.com>
 
         Get rid of unnecessary reimplementations of CGFloor/Ceiling
index db673a680732ddc295a1e51fff54f0b9a045cc52..219876cf5e44e6f3b2e08ca710b660024d610bf2 100644 (file)
@@ -1457,7 +1457,7 @@ void GraphicsContext::setPlatformStrokeThickness(float thickness)
 {
     if (paintingDisabled())
         return;
-    CGContextSetLineWidth(platformContext(), thickness);
+    CGContextSetLineWidth(platformContext(), std::max(thickness, 0.f));
 }
 
 void GraphicsContext::setPlatformFillColor(const Color& color, ColorSpace colorSpace)