Remove unnecessary (and unnecessarily iOS-specific) setStrokeAndFillColor
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 31 Aug 2014 22:06:29 +0000 (22:06 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 31 Aug 2014 22:06:29 +0000 (22:06 +0000)
https://bugs.webkit.org/show_bug.cgi?id=136416

Reviewed by Dan Bernstein.

* WebCore.exp.in:
* platform/graphics/GraphicsContext.h:
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::setStrokeAndFillColor): Deleted.
Remove.

* WebView/WebFrameView.mm:
(-[WebFrameView drawRect:]):
We only end up filling, so only set the fill color.

* WebView/WebPDFViewIOS.mm:
(-[WebPDFView drawPage:]):
(-[WebPDFView drawRect:]):
* WebView/WebPlainWhiteView.mm:
We only end up filling, so only set the fill color.

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

Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/platform/graphics/GraphicsContext.h
Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
Source/WebKit/ios/ChangeLog
Source/WebKit/ios/WebView/WebPDFViewIOS.mm
Source/WebKit/ios/WebView/WebPlainWhiteView.mm
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebView/WebFrameView.mm

index e7a51c527dafa6966ed4bc4a7bb798621159448a..3e86d15316818e388a4bfc12bb48a03c150de951 100644 (file)
@@ -1,3 +1,16 @@
+2014-08-31  Tim Horton  <timothy_horton@apple.com>
+
+        Remove unnecessary (and unnecessarily iOS-specific) setStrokeAndFillColor
+        https://bugs.webkit.org/show_bug.cgi?id=136416
+
+        Reviewed by Dan Bernstein.
+
+        * WebCore.exp.in:
+        * platform/graphics/GraphicsContext.h:
+        * platform/graphics/cg/GraphicsContextCG.cpp:
+        (WebCore::setStrokeAndFillColor): Deleted.
+        Remove.
+
 2014-08-31  Tim Horton  <timothy_horton@apple.com>
 
         Remove duplicate implementation of drawEllipse and some related PLATFORM(IOS) ifdefs
index 8695117c14822d40621a2f68f7651d3aff89e51b..2628ad7902a7d4be28d509294145a507a3c1155c 100644 (file)
@@ -2654,7 +2654,6 @@ __ZN7WebCore21MemoryPressureHandler31shouldWaitForMemoryClearMessageEv
 __ZN7WebCore21SQLiteDatabaseTracker9setClientEPNS_27SQLiteDatabaseTrackerClientE
 __ZN7WebCore21applicationIsFacebookEv
 __ZN7WebCore21nextParagraphPositionERKNS_15VisiblePositionEi
-__ZN7WebCore21setStrokeAndFillColorEP9CGContextP7CGColor
 __ZN7WebCore21wordRangeFromPositionERKNS_15VisiblePositionE
 __ZN7WebCore22startOfEditableContentERKNS_15VisiblePositionE
 __ZN7WebCore23applicationIsMobileMailEv
index e3292c279c8b8e4d73ff1e72b8dacd7b7db4253d..bdbfbb79e7065811dc25eaafb521f51f124b63ed 100644 (file)
@@ -189,10 +189,6 @@ namespace WebCore {
         bool drawLuminanceMask : 1;
     };
 
-#if PLATFORM(IOS)
-    WEBCORE_EXPORT void setStrokeAndFillColor(PlatformGraphicsContext*, CGColorRef);
-#endif
-
     struct ImagePaintingOptions {
         ImagePaintingOptions(CompositeOperator compositeOperator = CompositeSourceOver, BlendMode blendMode = BlendModeNormal, ImageOrientationDescription orientationDescription = ImageOrientationDescription(), bool useLowQualityScale = false)
             : m_compositeOperator(compositeOperator)
index 7a2fa24c851d342d34a3c180d6559602b72e9265..213e27ae83d3b916900df9cc10300c2b5d8e9eb7 100644 (file)
@@ -104,14 +104,6 @@ CGColorSpaceRef sRGBColorSpaceRef()
 #endif // PLATFORM(IOS)
 }
 
-#if PLATFORM(IOS)
-void setStrokeAndFillColor(CGContextRef context, CGColorRef color)
-{
-    CGContextSetStrokeColorWithColor(context, color);
-    CGContextSetFillColorWithColor(context, color);
-}
-#endif // PLATFORM(IOS)
-
 #if PLATFORM(WIN) || PLATFORM(IOS)
 CGColorSpaceRef linearRGBColorSpaceRef()
 {
index 440bb49cf730d84f375d4ea340232171f720a405..e464e66e2e9f662d3894c126c6200a323442ce25 100644 (file)
@@ -1,3 +1,16 @@
+2014-08-31  Tim Horton  <timothy_horton@apple.com>
+
+        Remove unnecessary (and unnecessarily iOS-specific) setStrokeAndFillColor
+        https://bugs.webkit.org/show_bug.cgi?id=136416
+
+        Reviewed by Dan Bernstein.
+
+        * WebView/WebPDFViewIOS.mm:
+        (-[WebPDFView drawPage:]):
+        (-[WebPDFView drawRect:]):
+        * WebView/WebPlainWhiteView.mm:
+        We only end up filling, so only set the fill color.
+
 2014-08-22  Simon Fraser  <simon.fraser@apple.com>
 
         Implement paint flashing in the WK1 InspectorOverlay page
index f649f7d58982abed36e29dac6ebb4f32eb8fbfa8..dab0941dde642456dcd3ce5a771b8b8be2c7c742 100644 (file)
@@ -113,7 +113,7 @@ static const float PAGE_HEIGHT_INSET    = 4.0 * 2.0;
     CGContextSaveGState(context);
     CGFloat height = WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITH_FLIPPED_SHADOWS) ? 2.0f : -2.0f;
     CGContextSetShadowWithColor(context, CGSizeMake(0.0f, height), 3.0f, [[self class] shadowColor]);
-    setStrokeAndFillColor(context, cachedCGColor(Color::white, ColorSpaceDeviceRGB));
+    CGContextSetFillColorWithColor(context, cachedCGColor(Color::white, ColorSpaceDeviceRGB));
     CGContextFillRect(context, pageRect);
     CGContextRestoreGState(context);    
     
@@ -173,7 +173,7 @@ static const float PAGE_HEIGHT_INSET    = 4.0 * 2.0;
 
     // Draw Background.
     CGContextSaveGState(context);
-    setStrokeAndFillColor(context, [[self class] backgroundColor]);
+    CGContextSetFillColorWithColor(context, [[self class] backgroundColor]);
     CGContextFillRect(context, aRect);
     CGContextRestoreGState(context);
 
index 8a2ad5b09ff3c7bfc18262afd905512b77263e12..1e0e07c4f97fee4aa42013b1516cb4c938d998d2 100644 (file)
@@ -42,7 +42,7 @@ using namespace WebCore;
 - (void)drawRect:(NSRect)rect
 {
     CGContextRef context = WKGetCurrentGraphicsContext();
-    setStrokeAndFillColor(context, cachedCGColor(Color::white, ColorSpaceDeviceRGB));
+    CGContextSetFillColorWithColor(context, cachedCGColor(Color::white, ColorSpaceDeviceRGB));
     WKRectFill(context, [self bounds]);
 }
 
index cf0781bda88993931b6009e03a2758b0d279358f..b5e8c6a1fb7830796f3bd7fd3a788dd5c63ad882 100644 (file)
@@ -1,3 +1,14 @@
+2014-08-31  Tim Horton  <timothy_horton@apple.com>
+
+        Remove unnecessary (and unnecessarily iOS-specific) setStrokeAndFillColor
+        https://bugs.webkit.org/show_bug.cgi?id=136416
+
+        Reviewed by Dan Bernstein.
+
+        * WebView/WebFrameView.mm:
+        (-[WebFrameView drawRect:]):
+        We only end up filling, so only set the fill color.
+
 2014-08-26  Maciej Stachowiak  <mjs@apple.com>
 
         Use RetainPtr::autorelease in some places where it seems appropriate
index 85faa63c2a4f6f908cf2a539dddbd28ad76d7792..653a77ebc785602fbb7635668ea8f33972105c96 100644 (file)
@@ -526,7 +526,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
             NSRectFill(rect);
 #else
             CGContextRef cgContext = WKGetCurrentGraphicsContext();
-            setStrokeAndFillColor(cgContext, cachedCGColor(Color::white, ColorSpaceDeviceRGB));
+            CGContextSetFillColorWithColor(cgContext, cachedCGColor(Color::white, ColorSpaceDeviceRGB));
             WKRectFill(cgContext, rect);
 #endif
         }
@@ -538,7 +538,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
             NSRectFill(rect);
 #else
             CGContextRef cgContext = WKGetCurrentGraphicsContext();
-            setStrokeAndFillColor(cgContext, cachedCGColor(Color::cyan, ColorSpaceDeviceRGB));
+            CGContextSetFillColorWithColor(cgContext, cachedCGColor(Color::cyan, ColorSpaceDeviceRGB));
             WKRectFill(cgContext, rect);
 #endif
         }