Unreviewed build fix after r219595
authorjbedard@apple.com <jbedard@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Jul 2017 17:03:48 +0000 (17:03 +0000)
committerjbedard@apple.com <jbedard@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Jul 2017 17:03:48 +0000 (17:03 +0000)
* platform/graphics/cocoa/FontDescriptionCocoa.cpp:
(WebCore::makeNeverDestroyed): Remove duplicate makeNeverDestroyed definition.
* platform/ios/DragImageIOS.mm:
(WebCore::cascadeForSystemFont): Return correct FontCascade object.
(WebCore::createDragImageForLink): Fix compiler error.

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

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/cocoa/FontDescriptionCocoa.cpp
Source/WebCore/platform/ios/DragImageIOS.mm

index a65bae1..be3a4a1 100644 (file)
@@ -1,3 +1,13 @@
+2017-07-18  Jonathan Bedard  <jbedard@apple.com>
+
+        Unreviewed build fix after r219595
+
+        * platform/graphics/cocoa/FontDescriptionCocoa.cpp:
+        (WebCore::makeNeverDestroyed): Remove duplicate makeNeverDestroyed definition.
+        * platform/ios/DragImageIOS.mm:
+        (WebCore::cascadeForSystemFont): Return correct FontCascade object.
+        (WebCore::createDragImageForLink): Fix compiler error.
+
 2017-07-18  Daniel Bates  <dabates@apple.com>
 
         Cleanup: Remove AlternativeTextInfo and use Variant to represent alternative text info details
index 31c15c4..4e0a9b9 100644 (file)
@@ -210,11 +210,6 @@ template<typename T, typename U, std::size_t size> inline std::array<T, size> co
     return convertArray<T>(array, std::make_index_sequence<size> { });
 }
 
-template<typename T> inline NeverDestroyed<T> makeNeverDestroyed(T&& argument)
-{
-    return WTFMove(argument);
-}
-
 static inline bool isUIFontTextStyle(const AtomicString& string)
 {
     static const CFStringRef styles[] = {
index a84e11d..0254917 100644 (file)
@@ -124,8 +124,8 @@ static const TextIndicatorOptions defaultLinkIndicatorOptions = TextIndicatorOpt
 
 static FontCascade cascadeForSystemFont(CGFloat size)
 {
-    UIFont *font = [getUIFontClass() systemFontOfSize:16];
-    return FontPlatformData(CTFontCreateWithName((CFStringRef)font.fontName, font.pointSize, nil), font.pointSize), AutoSmoothing);
+    UIFont *font = [getUIFontClass() systemFontOfSize:size];
+    return FontCascade(FontPlatformData(CTFontCreateWithName((CFStringRef)font.fontName, font.pointSize, nil), font.pointSize));
 }
 
 DragImageRef createDragImageForLink(Element& linkElement, URL& url, const String& title, TextIndicatorData& indicatorData, FontRenderingMode, float)
@@ -156,9 +156,9 @@ DragImageRef createDragImageForLink(Element& linkElement, URL& url, const String
         context.translate(0, CGRectGetHeight(imageRect));
         context.scale({ 1, -1 });
         context.fillRoundedRect(FloatRoundedRect(imageRect, FloatRoundedRect::Radii(4)), { 255, 255, 255 });
-        titleFontCascade->drawText(context, TextRun(truncatedTopString), FloatPoint(dragImagePadding, 18 + dragImagePadding));
+        titleFontCascade.get().drawText(context, TextRun(truncatedTopString), FloatPoint(dragImagePadding, 18 + dragImagePadding));
         if (!truncatedBottomString.isEmpty())
-            urlFontCascade->drawText(context, TextRun(truncatedBottomString), FloatPoint(dragImagePadding, 40 + dragImagePadding));
+            urlFontCascade.get().drawText(context, TextRun(truncatedBottomString), FloatPoint(dragImagePadding, 40 + dragImagePadding));
     }];
 
     auto linkRange = rangeOfContents(linkElement);