[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

mitz at apple.com mitz at apple.com
Wed Dec 22 12:22:23 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit d38b4f3b5319adfba4719ef8612e268b8b14fdd9
Author: mitz at apple.com <mitz at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Aug 20 07:58:04 2010 +0000

    Follow-up to r41020.
    
    Reviewed by Mark Rowe.
    
    No change in behavior, thus no new tests.
    
    * platform/graphics/mac/FontPlatformDataMac.mm:
    (WebCore::FontPlatformData::FontPlatformData): Asserted that the NSFont parameter is not nil,
    and removed nil check.
    (WebCore::FontPlatformData::setFont): Asserted that the NSFont parameter is not nil and that
    this is not the deleted value, and removed code to handle those cases.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65727 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 218dd7a..79f71a8 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2010-08-20  Dan Bernstein  <mitz at apple.com>
+
+        Reviewed by Mark Rowe.
+
+        Follow-up to r41020.
+
+        No change in behavior, thus no new tests.
+
+        * platform/graphics/mac/FontPlatformDataMac.mm:
+        (WebCore::FontPlatformData::FontPlatformData): Asserted that the NSFont parameter is not nil,
+        and removed nil check.
+        (WebCore::FontPlatformData::setFont): Asserted that the NSFont parameter is not nil and that
+        this is not the deleted value, and removed code to handle those cases.
+
 2010-08-19  Vincent Scheib  <scheib at chromium.org>
 
         Reviewed by David Levin.
diff --git a/WebCore/platform/graphics/mac/FontPlatformDataMac.mm b/WebCore/platform/graphics/mac/FontPlatformDataMac.mm
index 33de3c3..d905b62 100644
--- a/WebCore/platform/graphics/mac/FontPlatformDataMac.mm
+++ b/WebCore/platform/graphics/mac/FontPlatformDataMac.mm
@@ -39,9 +39,10 @@ FontPlatformData::FontPlatformData(NSFont *nsFont, bool syntheticBold, bool synt
     , m_isColorBitmapFont(false)
 #endif
 {
-    if (nsFont)
-        CFRetain(nsFont);
-    m_size = nsFont ? [nsFont pointSize] : 0.0f;
+    ASSERT_ARG(nsFont, nsFont);
+
+    CFRetain(nsFont);
+    m_size = [nsFont pointSize];
 #ifndef BUILDING_ON_TIGER
     m_cgFont.adoptCF(CTFontCopyGraphicsFont(toCTFontRef(nsFont), 0));
     m_atsuFontID = CTFontGetPlatformFont(toCTFontRef(nsFont), 0);
@@ -95,14 +96,17 @@ const FontPlatformData& FontPlatformData::operator=(const FontPlatformData& f)
 
 void FontPlatformData::setFont(NSFont *font)
 {
+    ASSERT_ARG(font, font);
+    ASSERT(m_font != reinterpret_cast<NSFont *>(-1));
+
     if (m_font == font)
         return;
-    if (font)
-        CFRetain(font);
-    if (m_font && m_font != reinterpret_cast<NSFont *>(-1))
+
+    CFRetain(font);
+    if (m_font)
         CFRelease(m_font);
     m_font = font;
-    m_size = font ? [font pointSize] : 0.0f;
+    m_size = [font pointSize];
 #ifndef BUILDING_ON_TIGER
     m_cgFont.adoptCF(CTFontCopyGraphicsFont(toCTFontRef(font), 0));
     m_atsuFontID = CTFontGetPlatformFont(toCTFontRef(font), 0);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list