Title: [213502] trunk/Source/WebCore
Revision
213502
Author
mmaxfi...@apple.com
Date
2017-03-06 22:24:16 -0800 (Mon, 06 Mar 2017)

Log Message

Unreviewed post-review fixup after r213464
https://bugs.webkit.org/show_bug.cgi?id=169255


* platform/graphics/FontCache.h:
(WebCore::FontDescriptionKey::FontDescriptionKey):
(WebCore::FontDescriptionKey::operator==):
(WebCore::FontDescriptionKey::computeHash):
(WebCore::FontDescriptionKey::makeFlagsKey):
* platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::computeNecessarySynthesis):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (213501 => 213502)


--- trunk/Source/WebCore/ChangeLog	2017-03-07 06:10:37 UTC (rev 213501)
+++ trunk/Source/WebCore/ChangeLog	2017-03-07 06:24:16 UTC (rev 213502)
@@ -1,3 +1,16 @@
+2017-03-06  Myles C. Maxfield  <mmaxfi...@apple.com>
+
+        Unreviewed post-review fixup after r213464
+        https://bugs.webkit.org/show_bug.cgi?id=169255
+
+        * platform/graphics/FontCache.h:
+        (WebCore::FontDescriptionKey::FontDescriptionKey):
+        (WebCore::FontDescriptionKey::operator==):
+        (WebCore::FontDescriptionKey::computeHash):
+        (WebCore::FontDescriptionKey::makeFlagsKey):
+        * platform/graphics/cocoa/FontCacheCoreText.cpp:
+        (WebCore::computeNecessarySynthesis):
+
 2017-03-06  Brent Fulgham  <bfulg...@apple.com>
 
         Validate DOM after potentially destructive actions during parser insert operations

Modified: trunk/Source/WebCore/platform/graphics/FontCache.h (213501 => 213502)


--- trunk/Source/WebCore/platform/graphics/FontCache.h	2017-03-07 06:10:37 UTC (rev 213501)
+++ trunk/Source/WebCore/platform/graphics/FontCache.h	2017-03-07 06:24:16 UTC (rev 213502)
@@ -72,13 +72,12 @@
 
     FontDescriptionKey(const FontDescription& description)
         : m_size(description.computedPixelSize())
-        , m_weight(description.weight())
+        , m_fontSelectionRequest(description.fontSelectionRequest())
         , m_flags(makeFlagsKey(description))
         , m_featureSettings(description.featureSettings())
 #if ENABLE(VARIATION_FONTS)
         , m_variationSettings(description.variationSettings())
 #endif
-        , m_stretch(description.stretch().rawValue())
     { }
 
     explicit FontDescriptionKey(WTF::HashTableDeletedValueType)
@@ -88,8 +87,7 @@
     bool operator==(const FontDescriptionKey& other) const
     {
         return m_size == other.m_size
-            && m_weight == other.m_weight
-            && m_stretch == other.m_stretch
+            && m_fontSelectionRequest == other.m_fontSelectionRequest
             && m_flags == other.m_flags
 #if ENABLE(VARIATION_FONTS)
             && m_variationSettings == other.m_variationSettings
@@ -108,8 +106,9 @@
     {
         IntegerHasher hasher;
         hasher.add(m_size);
-        hasher.add(m_weight);
-        hasher.add(m_stretch);
+        hasher.add(m_fontSelectionRequest.weight);
+        hasher.add(m_fontSelectionRequest.width);
+        hasher.add(m_fontSelectionRequest.slope);
         for (unsigned flagItem : m_flags)
             hasher.add(flagItem);
         hasher.add(m_featureSettings.hash());
@@ -129,7 +128,6 @@
             | static_cast<unsigned>(description.widthVariant()) << 4
             | static_cast<unsigned>(description.nonCJKGlyphOrientation()) << 3
             | static_cast<unsigned>(description.orientation()) << 2
-            | static_cast<unsigned>(description.italic()) << 1
             | static_cast<unsigned>(description.renderingMode());
         unsigned second = static_cast<unsigned>(description.variantEastAsianRuby()) << 27
             | static_cast<unsigned>(description.variantEastAsianWidth()) << 25
@@ -153,13 +151,12 @@
 
     // FontCascade::locale() is explicitly not included in this struct.
     unsigned m_size { 0 };
-    unsigned m_weight { 0 };
+    FontSelectionRequest m_fontSelectionRequest;
     std::array<unsigned, 2> m_flags {{ 0, 0 }};
     FontFeatureSettings m_featureSettings;
 #if ENABLE(VARIATION_FONTS)
     FontVariationSettings m_variationSettings;
 #endif
-    uint16_t m_stretch { 0 };
 };
 
 struct FontDescriptionKeyHash {

Modified: trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp (213501 => 213502)


--- trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp	2017-03-07 06:10:37 UTC (rev 213501)
+++ trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp	2017-03-07 06:24:16 UTC (rev 213502)
@@ -661,7 +661,7 @@
     CTFontSymbolicTraits desiredTraits = computeTraits(fontDescription);
 
     CTFontSymbolicTraits actualTraits = 0;
-    if (isFontWeightBold(fontDescription.weight()) || fontDescription.italic())
+    if (isFontWeightBold(fontDescription.weight()) || isItalic(fontDescription.italic()))
         actualTraits = CTFontGetSymbolicTraits(font);
 
     bool needsSyntheticBold = (fontDescription.fontSynthesis() & FontSynthesisWeight) && (desiredTraits & kCTFontTraitBold) && !(actualTraits & kCTFontTraitBold);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to