Try to fix windows build.
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 15 Jan 2015 19:41:40 +0000 (19:41 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 15 Jan 2015 19:41:40 +0000 (19:41 +0000)
* platform/graphics/ca/win/PlatformCALayerWin.cpp:
* platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
(PlatformCALayerWinInternal::displayCallback):
* platform/win/DragImageWin.cpp:
(WebCore::dragLabelFont):
(WebCore::createDragImageForLink):
* platform/win/PopupMenuWin.cpp:
(WebCore::PopupMenuWin::calculatePositionAndSize):
(WebCore::PopupMenuWin::paint):
* platform/win/WebCoreTextRenderer.cpp:
(WebCore::doDrawTextAtPoint):
(WebCore::WebCoreDrawDoubledTextAtPoint):
(WebCore::WebCoreTextFloatWidth):
(WebCore::WebCoreSetAlwaysUsesComplexTextCodePath):
(WebCore::WebCoreAlwaysUsesComplexTextCodePath):
* rendering/RenderThemeSafari.cpp:
(WebCore::RenderThemeSafari::setFontFromControlSize):

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

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/ca/win/PlatformCALayerWin.cpp
Source/WebCore/platform/graphics/ca/win/PlatformCALayerWinInternal.cpp
Source/WebCore/platform/win/DragImageWin.cpp
Source/WebCore/platform/win/PopupMenuWin.cpp
Source/WebCore/platform/win/WebCoreTextRenderer.cpp
Source/WebCore/rendering/RenderThemeSafari.cpp

index 0d8b112..bbc0171 100644 (file)
@@ -1,5 +1,27 @@
 2015-01-15  Antti Koivisto  <antti@apple.com>
 
+        Try to fix windows build.
+
+        * platform/graphics/ca/win/PlatformCALayerWin.cpp:
+        * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
+        (PlatformCALayerWinInternal::displayCallback):
+        * platform/win/DragImageWin.cpp:
+        (WebCore::dragLabelFont):
+        (WebCore::createDragImageForLink):
+        * platform/win/PopupMenuWin.cpp:
+        (WebCore::PopupMenuWin::calculatePositionAndSize):
+        (WebCore::PopupMenuWin::paint):
+        * platform/win/WebCoreTextRenderer.cpp:
+        (WebCore::doDrawTextAtPoint):
+        (WebCore::WebCoreDrawDoubledTextAtPoint):
+        (WebCore::WebCoreTextFloatWidth):
+        (WebCore::WebCoreSetAlwaysUsesComplexTextCodePath):
+        (WebCore::WebCoreAlwaysUsesComplexTextCodePath):
+        * rendering/RenderThemeSafari.cpp:
+        (WebCore::RenderThemeSafari::setFontFromControlSize):
+
+2015-01-15  Antti Koivisto  <antti@apple.com>
+
         Unreviewed, rolling out r178518.
 
         Didn't mean to commit some of this
index 88b1902..5dd7e2f 100644 (file)
@@ -28,7 +28,7 @@
 #include "PlatformCALayerWin.h"
 
 #include "AbstractCACFLayerTreeHost.h"
-#include "Font.h"
+#include "FontCascade.h"
 #include "GraphicsContext.h"
 #include "PlatformCAAnimationWin.h"
 #include "PlatformCALayerWinInternal.h"
index f9a3853..ce5d42b 100644 (file)
@@ -27,7 +27,7 @@
 
 #include "PlatformCALayerWinInternal.h"
 
-#include "Font.h"
+#include "FontCascade.h"
 #include "GraphicsContext.h"
 #include "PlatformCALayer.h"
 #include "TextRun.h"
@@ -159,7 +159,7 @@ void PlatformCALayerWinInternal::displayCallback(CACFLayerRef caLayer, CGContext
 
         desc.setComputedSize(18);
         
-        Font font = Font(desc, 0, 0);
+        FontCascade font = FontCascade(desc, 0, 0);
         font.update(0);
 
         GraphicsContext cg(context);
index 2615835..6003ae7 100644 (file)
@@ -27,7 +27,7 @@
 #include "DragImage.h"
 
 #include "FloatRoundedRect.h"
-#include "Font.h"
+#include "FontCascade.h"
 #include "FontDescription.h"
 #include "FontSelector.h"
 #include "GraphicsContext.h"
@@ -101,9 +101,9 @@ const float MaxDragLabelStringWidth = (MaxDragLabelWidth - 2 * DragLabelBorderX)
 const float DragLinkLabelFontsize = 11;
 const float DragLinkUrlFontSize = 10;
 
-static Font dragLabelFont(int size, bool bold, FontRenderingMode renderingMode)
+static FontCascade dragLabelFont(int size, bool bold, FontRenderingMode renderingMode)
 {
-    Font result;
+    FontCascade result;
     NONCLIENTMETRICS metrics;
     metrics.cbSize = sizeof(metrics);
     SystemParametersInfo(SPI_GETNONCLIENTMETRICS, metrics.cbSize, &metrics, 0);
@@ -114,7 +114,7 @@ static Font dragLabelFont(int size, bool bold, FontRenderingMode renderingMode)
     description.setSpecifiedSize((float)size);
     description.setComputedSize((float)size);
     description.setRenderingMode(renderingMode);
-    result = Font(description, 0, 0);
+    result = FontCascade(description, 0, 0);
     result.update(0);
     return result;
 }
@@ -123,8 +123,8 @@ DragImageRef createDragImageForLink(URL& url, const String& inLabel, FontRenderi
 {
     // This is more or less an exact match for the Mac OS X code.
 
-    const Font* labelFont;
-    const Font* urlFont;
+    const FontCascade* labelFont;
+    const FontCascade* urlFont;
 
     if (fontRenderingMode == AlternateRenderingMode) {
         static const Font alternateRenderingModeLabelFont = dragLabelFont(DragLinkLabelFontsize, true, AlternateRenderingMode);
index a956401..209594e 100644 (file)
@@ -335,11 +335,11 @@ void PopupMenuWin::calculatePositionAndSize(const IntRect& r, FrameView* v)
         if (text.isEmpty())
             continue;
 
-        Font itemFont = client()->menuStyle().font();
+        FontCascade itemFont = client()->menuStyle().font();
         if (client()->itemIsLabel(i)) {
             FontDescription d = itemFont.fontDescription();
             d.setWeight(d.bolderWeight());
-            itemFont = Font(d, itemFont.letterSpacing(), itemFont.wordSpacing());
+            itemFont = FontCascade(d, itemFont.letterSpacing(), itemFont.wordSpacing());
             itemFont.update(m_popupClient->fontSelector());
         }
 
@@ -641,11 +641,11 @@ void PopupMenuWin::paint(const IntRect& damageRect, HDC hdc)
         TextRun textRun(itemText, 0, 0, TextRun::AllowTrailingExpansion, itemStyle.textDirection(), itemStyle.hasTextDirectionOverride());
         context.setFillColor(optionTextColor, ColorSpaceDeviceRGB);
         
-        Font itemFont = client()->menuStyle().font();
+        FontCascade itemFont = client()->menuStyle().font();
         if (client()->itemIsLabel(index)) {
             FontDescription d = itemFont.fontDescription();
             d.setWeight(d.bolderWeight());
-            itemFont = Font(d, itemFont.letterSpacing(), itemFont.wordSpacing());
+            itemFont = FontCascade(d, itemFont.letterSpacing(), itemFont.wordSpacing());
             itemFont.update(m_popupClient->fontSelector());
         }
         
index 5325e6f..ce14dd0 100644 (file)
@@ -25,7 +25,7 @@
 #include "config.h"
 #include "WebCoreTextRenderer.h"
 
-#include "Font.h"
+#include "FontCascade.h"
 #include "FontDescription.h"
 #include "GraphicsContext.h"
 #include "StringTruncator.h"
@@ -45,7 +45,7 @@ static bool isOneLeftToRightRun(const TextRun& run)
     return true;
 }
 
-static void doDrawTextAtPoint(GraphicsContext& context, const String& text, const IntPoint& point, const Font& font, const Color& color, int underlinedIndex)
+static void doDrawTextAtPoint(GraphicsContext& context, const String& text, const IntPoint& point, const FontCascade& font, const Color& color, int underlinedIndex)
 {
     TextRun run(text);
 
@@ -76,7 +76,7 @@ static void doDrawTextAtPoint(GraphicsContext& context, const String& text, cons
     }
 }
 
-void WebCoreDrawDoubledTextAtPoint(GraphicsContext& context, const String& text, const IntPoint& point, const Font& font, const Color& topColor, const Color& bottomColor, int underlinedIndex)
+void WebCoreDrawDoubledTextAtPoint(GraphicsContext& context, const String& text, const IntPoint& point, const FontCascade& font, const Color& topColor, const Color& bottomColor, int underlinedIndex)
 {
     context.save();
 
@@ -89,7 +89,7 @@ void WebCoreDrawDoubledTextAtPoint(GraphicsContext& context, const String& text,
     context.restore();
 }
 
-float WebCoreTextFloatWidth(const String& text, const Font& font)
+float WebCoreTextFloatWidth(const String& text, const FontCascade& font)
 {
     return StringTruncator::width(text, font, StringTruncator::EnableRoundingHacks);
 }
@@ -106,12 +106,12 @@ bool WebCoreShouldUseFontSmoothing()
 
 void WebCoreSetAlwaysUsesComplexTextCodePath(bool complex)
 {
-    Font::setCodePath(complex ? Font::Complex : Font::Auto);
+    Font::setCodePath(complex ? FontCascade::Complex : FontCascade::Auto);
 }
 
 bool WebCoreAlwaysUsesComplexTextCodePath()
 {
-    return Font::codePath() == Font::Complex;
+    return Font::codePath() == FontCascade::Complex;
 }
 
 } // namespace WebCore
index e993690..942849d 100644 (file)
@@ -401,7 +401,7 @@ void RenderThemeSafari::setFontFromControlSize(StyleResolver& styleResolver, Ren
     style.setLineHeight(RenderStyle::initialLineHeight());
 
     if (style.setFontDescription(fontDescription))
-        style.font().update(styleResolver.fontSelector());
+        style.fontCascade().update(styleResolver.fontSelector());
 }
 
 NSControlSize RenderThemeSafari::controlSizeForSystemFont(RenderStyle& style) const