Title: [158309] trunk/Source
Revision
158309
Author
commit-qu...@webkit.org
Date
2013-10-30 13:32:27 -0700 (Wed, 30 Oct 2013)

Log Message

WebKit/win/WebKitGraphics.h:void WebDrawText(WebTextRenderInfo*); is never called
https://bugs.webkit.org/show_bug.cgi?id=123485

Patch by Myles C. Maxfield <mmaxfi...@apple.com> on 2013-10-30
Reviewed by Brent Fulgham.

Source/WebCore:

WebDrawText is the only caller of WebCoreDrawTextAtPoint, so we can
delete that as well.

Because there is no behavior difference, no new tests are necessary.

* platform/win/WebCoreTextRenderer.cpp:
* platform/win/WebCoreTextRenderer.h:

Source/WebKit:

Deleting the function

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:

Source/WebKit/win:

Removed unused WebDrawText implementation.

* WebKitGraphics.cpp:
* WebKitGraphics.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (158308 => 158309)


--- trunk/Source/WebCore/ChangeLog	2013-10-30 20:22:40 UTC (rev 158308)
+++ trunk/Source/WebCore/ChangeLog	2013-10-30 20:32:27 UTC (rev 158309)
@@ -1,3 +1,18 @@
+2013-10-30  Myles C. Maxfield  <mmaxfi...@apple.com>
+
+        WebKit/win/WebKitGraphics.h:void WebDrawText(WebTextRenderInfo*); is never called
+        https://bugs.webkit.org/show_bug.cgi?id=123485
+
+        Reviewed by Brent Fulgham.
+
+        WebDrawText is the only caller of WebCoreDrawTextAtPoint, so we can
+        delete that as well.
+
+        Because there is no behavior difference, no new tests are necessary.
+
+        * platform/win/WebCoreTextRenderer.cpp:
+        * platform/win/WebCoreTextRenderer.h:
+
 2013-10-30  Csaba Osztrogonác  <o...@webkit.org>
 
         URTBF after r158289.

Modified: trunk/Source/WebCore/platform/win/WebCoreTextRenderer.cpp (158308 => 158309)


--- trunk/Source/WebCore/platform/win/WebCoreTextRenderer.cpp	2013-10-30 20:22:40 UTC (rev 158308)
+++ trunk/Source/WebCore/platform/win/WebCoreTextRenderer.cpp	2013-10-30 20:32:27 UTC (rev 158309)
@@ -80,15 +80,6 @@
     }
 }
 
-void WebCoreDrawTextAtPoint(GraphicsContext& context, const String& text, const IntPoint& point, const Font& font, const Color& color, int underlinedIndex)
-{
-    context.save();
-
-    doDrawTextAtPoint(context, text, point, font, color, underlinedIndex);
-
-    context.restore();
-}
-
 void WebCoreDrawDoubledTextAtPoint(GraphicsContext& context, const String& text, const IntPoint& point, const Font& font, const Color& topColor, const Color& bottomColor, int underlinedIndex)
 {
     context.save();

Modified: trunk/Source/WebCore/platform/win/WebCoreTextRenderer.h (158308 => 158309)


--- trunk/Source/WebCore/platform/win/WebCoreTextRenderer.h	2013-10-30 20:22:40 UTC (rev 158308)
+++ trunk/Source/WebCore/platform/win/WebCoreTextRenderer.h	2013-10-30 20:32:27 UTC (rev 158309)
@@ -35,7 +35,6 @@
     class GraphicsContext;
     class IntPoint;
 
-    void WebCoreDrawTextAtPoint(GraphicsContext&, const String&, const IntPoint&, const Font&, const Color&, int underlinedIndex = -1);
     void WebCoreDrawDoubledTextAtPoint(GraphicsContext&, const String&, const IntPoint&, const Font&, const Color& topColor, const Color& bottomColor, int underlinedIndex = -1);
     float WebCoreTextFloatWidth(const String&, const Font&);
 

Modified: trunk/Source/WebKit/ChangeLog (158308 => 158309)


--- trunk/Source/WebKit/ChangeLog	2013-10-30 20:22:40 UTC (rev 158308)
+++ trunk/Source/WebKit/ChangeLog	2013-10-30 20:32:27 UTC (rev 158309)
@@ -1,3 +1,14 @@
+2013-10-30  Myles C. Maxfield  <mmaxfi...@apple.com>
+
+        WebKit/win/WebKitGraphics.h:void WebDrawText(WebTextRenderInfo*); is never called
+        https://bugs.webkit.org/show_bug.cgi?id=123485
+
+        Reviewed by Brent Fulgham.
+
+        Deleting the function
+
+        * WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:
+
 2013-10-30  Alex Christensen  <achristen...@webkit.org>
 
         [Windows] Unreviewed build fix.

Modified: trunk/Source/WebKit/WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in (158308 => 158309)


--- trunk/Source/WebKit/WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in	2013-10-30 20:22:40 UTC (rev 158308)
+++ trunk/Source/WebKit/WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in	2013-10-30 20:32:27 UTC (rev 158309)
@@ -11,7 +11,6 @@
         WebLocalizedStringUTF8
         WebLocalizedLPCTSTRUTF8
 #if USE(CG)
-        WebDrawText
         FontMetrics
         TextFloatWidth
         CenterTruncateStringToWidth

Modified: trunk/Source/WebKit/win/ChangeLog (158308 => 158309)


--- trunk/Source/WebKit/win/ChangeLog	2013-10-30 20:22:40 UTC (rev 158308)
+++ trunk/Source/WebKit/win/ChangeLog	2013-10-30 20:32:27 UTC (rev 158309)
@@ -1,3 +1,15 @@
+2013-10-30  Myles C. Maxfield  <mmaxfi...@apple.com>
+
+        WebKit/win/WebKitGraphics.h:void WebDrawText(WebTextRenderInfo*); is never called
+        https://bugs.webkit.org/show_bug.cgi?id=123485
+
+        Reviewed by Brent Fulgham.
+
+        Removed unused WebDrawText implementation.
+
+        * WebKitGraphics.cpp:
+        * WebKitGraphics.h:
+
 2013-10-30  Patrick Gansterer  <par...@webkit.org>
 
         [WIN] Add missing USE(CFNETWORK) to WebError.h

Modified: trunk/Source/WebKit/win/WebKitGraphics.cpp (158308 => 158309)


--- trunk/Source/WebKit/win/WebKitGraphics.cpp	2013-10-30 20:22:40 UTC (rev 158308)
+++ trunk/Source/WebKit/win/WebKitGraphics.cpp	2013-10-30 20:32:27 UTC (rev 158309)
@@ -87,38 +87,6 @@
     int overrideSmoothingLevel; // pass in -1 if caller does not want to override smoothing level
 };
 
-void WebDrawText(WebTextRenderInfo* info)
-{
-    if (!info || info->structSize < sizeof(WebTextRenderInfoWithoutShadow) || !info->cgContext || !info->description)
-        return;
-
-    int oldFontSmoothingLevel = -1;
-    if (info->overrideSmoothingLevel >= 0) {
-        oldFontSmoothingLevel = wkGetFontSmoothingLevel();
-        wkSetFontSmoothingLevel(info->overrideSmoothingLevel);
-    }
-
-    {
-        GraphicsContext context(info->cgContext);
-        String drawString(info->text, info->length);
-        if (info->drawAsPassword)
-            drawString.fill(WTF::Unicode::bullet);
-
-        context.save();
-
-        // Set shadow setting
-        if (info->structSize == sizeof(WebTextRenderInfo) &&
-            (info->shadowOffset.cx || info->shadowOffset.cy || info->shadowBlur || info->shadowColor))
-            context.setShadow(FloatSize(info->shadowOffset.cx, info->shadowOffset.cy), info->shadowBlur, info->shadowColor, ColorSpaceDeviceRGB);
-
-        WebCoreDrawTextAtPoint(context, drawString, info->pt, makeFont(*(info->description)), info->color, info->underlinedIndex);
-        context.restore();
-    }
-
-    if (info->overrideSmoothingLevel >= 0)
-        wkSetFontSmoothingLevel(oldFontSmoothingLevel);
-}
-
 float TextFloatWidth(LPCTSTR text, int length, const WebFontDescription& description)
 {
     return WebCoreTextFloatWidth(String(text, length), makeFont(description));

Modified: trunk/Source/WebKit/win/WebKitGraphics.h (158308 => 158309)


--- trunk/Source/WebKit/win/WebKitGraphics.h	2013-10-30 20:22:40 UTC (rev 158308)
+++ trunk/Source/WebKit/win/WebKitGraphics.h	2013-10-30 20:32:27 UTC (rev 158309)
@@ -63,7 +63,6 @@
     CGColorRef shadowColor;
 };
 
-void WebDrawText(WebTextRenderInfo*);
 float TextFloatWidth(LPCTSTR text, int length, const WebFontDescription&);
 void FontMetrics(const WebFontDescription&, int* ascent, int* descent, int* lineSpacing);
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to