Title: [173150] trunk/Source
Revision
173150
Author
[email protected]
Date
2014-08-31 15:06:29 -0700 (Sun, 31 Aug 2014)

Log Message

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.

* 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.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (173149 => 173150)


--- trunk/Source/WebCore/ChangeLog	2014-08-31 22:03:50 UTC (rev 173149)
+++ trunk/Source/WebCore/ChangeLog	2014-08-31 22:06:29 UTC (rev 173150)
@@ -1,5 +1,18 @@
 2014-08-31  Tim Horton  <[email protected]>
 
+        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  <[email protected]>
+
         Remove duplicate implementation of drawEllipse and some related PLATFORM(IOS) ifdefs
         https://bugs.webkit.org/show_bug.cgi?id=136413
 

Modified: trunk/Source/WebCore/WebCore.exp.in (173149 => 173150)


--- trunk/Source/WebCore/WebCore.exp.in	2014-08-31 22:03:50 UTC (rev 173149)
+++ trunk/Source/WebCore/WebCore.exp.in	2014-08-31 22:06:29 UTC (rev 173150)
@@ -2654,7 +2654,6 @@
 __ZN7WebCore21SQLiteDatabaseTracker9setClientEPNS_27SQLiteDatabaseTrackerClientE
 __ZN7WebCore21applicationIsFacebookEv
 __ZN7WebCore21nextParagraphPositionERKNS_15VisiblePositionEi
-__ZN7WebCore21setStrokeAndFillColorEP9CGContextP7CGColor
 __ZN7WebCore21wordRangeFromPositionERKNS_15VisiblePositionE
 __ZN7WebCore22startOfEditableContentERKNS_15VisiblePositionE
 __ZN7WebCore23applicationIsMobileMailEv

Modified: trunk/Source/WebCore/platform/graphics/GraphicsContext.h (173149 => 173150)


--- trunk/Source/WebCore/platform/graphics/GraphicsContext.h	2014-08-31 22:03:50 UTC (rev 173149)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContext.h	2014-08-31 22:06:29 UTC (rev 173150)
@@ -189,10 +189,6 @@
         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)

Modified: trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp (173149 => 173150)


--- trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp	2014-08-31 22:03:50 UTC (rev 173149)
+++ trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp	2014-08-31 22:06:29 UTC (rev 173150)
@@ -104,14 +104,6 @@
 #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()
 {

Modified: trunk/Source/WebKit/ios/ChangeLog (173149 => 173150)


--- trunk/Source/WebKit/ios/ChangeLog	2014-08-31 22:03:50 UTC (rev 173149)
+++ trunk/Source/WebKit/ios/ChangeLog	2014-08-31 22:06:29 UTC (rev 173150)
@@ -1,3 +1,16 @@
+2014-08-31  Tim Horton  <[email protected]>
+
+        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  <[email protected]>
 
         Implement paint flashing in the WK1 InspectorOverlay page

Modified: trunk/Source/WebKit/ios/WebView/WebPDFViewIOS.mm (173149 => 173150)


--- trunk/Source/WebKit/ios/WebView/WebPDFViewIOS.mm	2014-08-31 22:03:50 UTC (rev 173149)
+++ trunk/Source/WebKit/ios/WebView/WebPDFViewIOS.mm	2014-08-31 22:06:29 UTC (rev 173150)
@@ -113,7 +113,7 @@
     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 @@
 
     // Draw Background.
     CGContextSaveGState(context);
-    setStrokeAndFillColor(context, [[self class] backgroundColor]);
+    CGContextSetFillColorWithColor(context, [[self class] backgroundColor]);
     CGContextFillRect(context, aRect);
     CGContextRestoreGState(context);
 

Modified: trunk/Source/WebKit/ios/WebView/WebPlainWhiteView.mm (173149 => 173150)


--- trunk/Source/WebKit/ios/WebView/WebPlainWhiteView.mm	2014-08-31 22:03:50 UTC (rev 173149)
+++ trunk/Source/WebKit/ios/WebView/WebPlainWhiteView.mm	2014-08-31 22:06:29 UTC (rev 173150)
@@ -42,7 +42,7 @@
 - (void)drawRect:(NSRect)rect
 {
     CGContextRef context = WKGetCurrentGraphicsContext();
-    setStrokeAndFillColor(context, cachedCGColor(Color::white, ColorSpaceDeviceRGB));
+    CGContextSetFillColorWithColor(context, cachedCGColor(Color::white, ColorSpaceDeviceRGB));
     WKRectFill(context, [self bounds]);
 }
 

Modified: trunk/Source/WebKit/mac/ChangeLog (173149 => 173150)


--- trunk/Source/WebKit/mac/ChangeLog	2014-08-31 22:03:50 UTC (rev 173149)
+++ trunk/Source/WebKit/mac/ChangeLog	2014-08-31 22:06:29 UTC (rev 173150)
@@ -1,3 +1,14 @@
+2014-08-31  Tim Horton  <[email protected]>
+
+        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  <[email protected]>
 
         Use RetainPtr::autorelease in some places where it seems appropriate

Modified: trunk/Source/WebKit/mac/WebView/WebFrameView.mm (173149 => 173150)


--- trunk/Source/WebKit/mac/WebView/WebFrameView.mm	2014-08-31 22:03:50 UTC (rev 173149)
+++ trunk/Source/WebKit/mac/WebView/WebFrameView.mm	2014-08-31 22:06:29 UTC (rev 173150)
@@ -526,7 +526,7 @@
             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 @@
             NSRectFill(rect);
 #else
             CGContextRef cgContext = WKGetCurrentGraphicsContext();
-            setStrokeAndFillColor(cgContext, cachedCGColor(Color::cyan, ColorSpaceDeviceRGB));
+            CGContextSetFillColorWithColor(cgContext, cachedCGColor(Color::cyan, ColorSpaceDeviceRGB));
             WKRectFill(cgContext, rect);
 #endif
         }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to