Source/WebCore/rendering/RenderThemeMac.mm:2181:118: error: null passed to a callee...
authordino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Mar 2015 06:06:15 +0000 (06:06 +0000)
committerdino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Mar 2015 06:06:15 +0000 (06:06 +0000)
https://bugs.webkit.org/show_bug.cgi?id=143039

Unreviewed build fix for newer versions of OS X.

* rendering/RenderThemeMac.mm: Define a null language parameter. This
seemed better than turning the clang warning off for just that
function.
(WebCore::AttachmentLayout::layOutTitle):
(WebCore::AttachmentLayout::layOutSubtitle):

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

Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderThemeMac.mm

index 9a74dd8..beb4747 100644 (file)
@@ -1,3 +1,16 @@
+2015-03-24  Dean Jackson  <dino@apple.com>
+
+        Source/WebCore/rendering/RenderThemeMac.mm:2181:118: error: null passed to a callee that requires a non-null argument [-Werror,-Wnonnull]
+        https://bugs.webkit.org/show_bug.cgi?id=143039
+
+        Unreviewed build fix for newer versions of OS X.
+
+        * rendering/RenderThemeMac.mm: Define a null language parameter. This
+        seemed better than turning the clang warning off for just that
+        function.
+        (WebCore::AttachmentLayout::layOutTitle):
+        (WebCore::AttachmentLayout::layOutSubtitle):
+
 2015-03-24  Dan Bernstein  <mitz@apple.com>
 
         Another attempt to fix the build.
index 81df763..3b607e0 100644 (file)
@@ -2178,7 +2178,8 @@ void AttachmentLayout::addTitleLine(CTLineRef line, CGFloat& yOffset, Vector<CGP
 
 void AttachmentLayout::layOutTitle(const RenderAttachment& attachment)
 {
-    RetainPtr<CTFontRef> font = adoptCF(CTFontCreateUIFontForLanguage(kCTFontUIFontSystem, attachmentTitleFontSize, nullptr));
+    CFStringRef language = 0; // By not specifying a language we use the system language.
+    RetainPtr<CTFontRef> font = adoptCF(CTFontCreateUIFontForLanguage(kCTFontUIFontSystem, attachmentTitleFontSize, language));
     baseline = CGRound(attachmentIconBackgroundSize + attachmentIconToTitleMargin + CTFontGetAscent(font.get()));
 
     String title = attachment.attachmentElement().attachmentTitle();
@@ -2241,7 +2242,8 @@ void AttachmentLayout::layOutSubtitle(const RenderAttachment& attachment)
     if (subtitleText.isEmpty())
         return;
 
-    RetainPtr<CTFontRef> font = adoptCF(CTFontCreateUIFontForLanguage(kCTFontUIFontSystem, attachmentSubtitleFontSize, nullptr));
+    CFStringRef language = 0; // By not specifying a language we use the system language.
+    RetainPtr<CTFontRef> font = adoptCF(CTFontCreateUIFontForLanguage(kCTFontUIFontSystem, attachmentSubtitleFontSize, language));
     NSDictionary *textAttributes = @{
         (id)kCTFontAttributeName: (id)font.get(),
         (id)kCTForegroundColorAttributeName: (NSColor *)cachedCGColor(attachmentSubtitleTextColor(), ColorSpaceDeviceRGB)