Title: [210400] trunk/Source/WebCore
- Revision
- 210400
- Author
- [email protected]
- Date
- 2017-01-05 17:06:15 -0800 (Thu, 05 Jan 2017)
Log Message
CoreText variation axis identifiers don't work with 64-bit numbers
https://bugs.webkit.org/show_bug.cgi?id=166745
<rdar://problem/29856541>
<rdar://problem/29848883>
Reviewed by Tim Horton.
There is a bug where some CFNumbers are getting garbage results when
being placed into a 64-bit field. Luckily, we don't need the full
64-bits; 32-bits is sufficient.
Test: fast/text/international/system-language/hindi-system-font-punctuation.html
* platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::defaultVariationValues):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (210399 => 210400)
--- trunk/Source/WebCore/ChangeLog 2017-01-06 01:04:34 UTC (rev 210399)
+++ trunk/Source/WebCore/ChangeLog 2017-01-06 01:06:15 UTC (rev 210400)
@@ -1,3 +1,21 @@
+2017-01-05 Myles C. Maxfield <[email protected]>
+
+ CoreText variation axis identifiers don't work with 64-bit numbers
+ https://bugs.webkit.org/show_bug.cgi?id=166745
+ <rdar://problem/29856541>
+ <rdar://problem/29848883>
+
+ Reviewed by Tim Horton.
+
+ There is a bug where some CFNumbers are getting garbage results when
+ being placed into a 64-bit field. Luckily, we don't need the full
+ 64-bits; 32-bits is sufficient.
+
+ Test: fast/text/international/system-language/hindi-system-font-punctuation.html
+
+ * platform/graphics/cocoa/FontCacheCoreText.cpp:
+ (WebCore::defaultVariationValues):
+
2017-01-05 Zalan Bujtas <[email protected]>
Start hittesting a clean tree in RenderEmbeddedObject::isReplacementObscured
Modified: trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp (210399 => 210400)
--- trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp 2017-01-06 01:04:34 UTC (rev 210399)
+++ trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp 2017-01-06 01:06:15 UTC (rev 210400)
@@ -385,8 +385,8 @@
CFNumberRef defaultValue = static_cast<CFNumberRef>(CFDictionaryGetValue(axis, kCTFontVariationAxisDefaultValueKey));
CFNumberRef minimumValue = static_cast<CFNumberRef>(CFDictionaryGetValue(axis, kCTFontVariationAxisMinimumValueKey));
CFNumberRef maximumValue = static_cast<CFNumberRef>(CFDictionaryGetValue(axis, kCTFontVariationAxisMaximumValueKey));
- int64_t rawAxisIdentifier = 0;
- Boolean success = CFNumberGetValue(axisIdentifier, kCFNumberSInt64Type, &rawAxisIdentifier);
+ uint32_t rawAxisIdentifier = 0;
+ Boolean success = CFNumberGetValue(axisIdentifier, kCFNumberSInt32Type, &rawAxisIdentifier);
ASSERT_UNUSED(success, success);
float rawDefaultValue = 0;
float rawMinimumValue = 0;
@@ -411,10 +411,6 @@
auto b2 = (rawAxisIdentifier & 0xFF0000) >> 16;
auto b3 = (rawAxisIdentifier & 0xFF00) >> 8;
auto b4 = rawAxisIdentifier & 0xFF;
- ASSERT(b1 >= 0 && b1 <= std::numeric_limits<char>::max());
- ASSERT(b2 >= 0 && b2 <= std::numeric_limits<char>::max());
- ASSERT(b3 >= 0 && b3 <= std::numeric_limits<char>::max());
- ASSERT(b4 >= 0 && b4 <= std::numeric_limits<char>::max());
FontTag resultKey = {{ static_cast<char>(b1), static_cast<char>(b2), static_cast<char>(b3), static_cast<char>(b4) }};
VariationDefaults resultValues = { rawDefaultValue, rawMinimumValue, rawMaximumValue };
result.set(resultKey, resultValues);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes