Title: [205714] branches/safari-602-branch

Diff

Modified: branches/safari-602-branch/LayoutTests/ChangeLog (205713 => 205714)


--- branches/safari-602-branch/LayoutTests/ChangeLog	2016-09-09 08:42:32 UTC (rev 205713)
+++ branches/safari-602-branch/LayoutTests/ChangeLog	2016-09-09 08:42:35 UTC (rev 205714)
@@ -1,5 +1,23 @@
 2016-09-09  Babak Shafiei  <[email protected]>
 
+        Merge r204107. rdar://problem/27860536
+
+    2016-08-03  Myles C. Maxfield  <[email protected]>
+
+            [iOS] SF-Heavy is not accessible from web content
+            https://bugs.webkit.org/show_bug.cgi?id=160522
+            <rdar://problem/27685273>
+
+            Reviewed by Simon Fraser.
+
+            * platform/ios-simulator/fast/text/system-font-weight-expected.txt: iOS 9 is not
+            expected to pass this test, but there is no way to specify that currently using
+            TestExpectations. Instead, we can create an iOS 9 specific result.
+            * fast/text/system-font-weight-expected.txt:
+            * fast/text/system-font-weight.html:
+
+2016-09-09  Babak Shafiei  <[email protected]>
+
         Merge r205388. rdar://problem/27806012
 
     2016-09-02  Ryan Haddad  <[email protected]>

Modified: branches/safari-602-branch/LayoutTests/fast/text/system-font-weight-expected.txt (205713 => 205714)


--- branches/safari-602-branch/LayoutTests/fast/text/system-font-weight-expected.txt	2016-09-09 08:42:32 UTC (rev 205713)
+++ branches/safari-602-branch/LayoutTests/fast/text/system-font-weight-expected.txt	2016-09-09 08:42:35 UTC (rev 205714)
@@ -3,8 +3,19 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS six.offsetWidth is not nine.offsetWidth
+PASS four.offsetWidth is not three.offsetWidth
+PASS five.offsetWidth is not four.offsetWidth
+PASS six.offsetWidth is not five.offsetWidth
+PASS eight.offsetWidth is not seven.offsetWidth
 PASS successfullyParsed is true
 
 TEST COMPLETE
-Hello, WorldHello, World
+Hello, World
+Hello, World
+Hello, World
+Hello, World
+Hello, World
+Hello, World
+Hello, World
+Hello, World
+Hello, World

Modified: branches/safari-602-branch/LayoutTests/fast/text/system-font-weight.html (205713 => 205714)


--- branches/safari-602-branch/LayoutTests/fast/text/system-font-weight.html	2016-09-09 08:42:32 UTC (rev 205713)
+++ branches/safari-602-branch/LayoutTests/fast/text/system-font-weight.html	2016-09-09 08:42:35 UTC (rev 205714)
@@ -5,13 +5,31 @@
 </head>
 <body>
 <div style="font: 19px -apple-system">
-<span id="six" style="font-weight: 600;">Hello, World</span><span id="nine" style="font-weight: 900;">Hello, World</span>
+<div><span id="one" style="font-weight: 100;">Hello, World</span></div>
+<div><span id="two" style="font-weight: 200;">Hello, World</span></div>
+<div><span id="three" style="font-weight: 300;">Hello, World</span></div>
+<div><span id="four" style="font-weight: 400;">Hello, World</span></div>
+<div><span id="five" style="font-weight: 500;">Hello, World</span></div>
+<div><span id="six" style="font-weight: 600;">Hello, World</span></div>
+<div><span id="seven" style="font-weight: 700;">Hello, World</span></div>
+<div><span id="eight" style="font-weight: 800;">Hello, World</span></div>
+<div><span id="nine" style="font-weight: 900;">Hello, World</span></div>
 </div>
 <script>
 description("This test makes sure that extra-heavy weights of the system font can be achieved.");
+var _one_ = document.getElementById("one");
+var two = document.getElementById("two");
+var three = document.getElementById("three");
+var four = document.getElementById("four");
+var five = document.getElementById("five");
 var six = document.getElementById("six");
+var seven = document.getElementById("seven");
+var eight = document.getElementById("eight");
 var nine = document.getElementById("nine");
-shouldNotBe("six.offsetWidth", "nine.offsetWidth");
+shouldNotBe("four.offsetWidth", "three.offsetWidth");
+shouldNotBe("five.offsetWidth", "four.offsetWidth");
+shouldNotBe("six.offsetWidth", "five.offsetWidth");
+shouldNotBe("eight.offsetWidth", "seven.offsetWidth");
 </script>
 <script src=""
 </body>

Added: branches/safari-602-branch/LayoutTests/platform/ios-simulator/fast/text/system-font-weight-expected.txt (0 => 205714)


--- branches/safari-602-branch/LayoutTests/platform/ios-simulator/fast/text/system-font-weight-expected.txt	                        (rev 0)
+++ branches/safari-602-branch/LayoutTests/platform/ios-simulator/fast/text/system-font-weight-expected.txt	2016-09-09 08:42:35 UTC (rev 205714)
@@ -0,0 +1,21 @@
+This test makes sure that extra-heavy weights of the system font can be achieved.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS four.offsetWidth is not three.offsetWidth
+FAIL five.offsetWidth should not be 104.
+PASS six.offsetWidth is not five.offsetWidth
+FAIL eight.offsetWidth should not be 108.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+Hello, World
+Hello, World
+Hello, World
+Hello, World
+Hello, World
+Hello, World
+Hello, World
+Hello, World
+Hello, World

Modified: branches/safari-602-branch/Source/WebCore/ChangeLog (205713 => 205714)


--- branches/safari-602-branch/Source/WebCore/ChangeLog	2016-09-09 08:42:32 UTC (rev 205713)
+++ branches/safari-602-branch/Source/WebCore/ChangeLog	2016-09-09 08:42:35 UTC (rev 205714)
@@ -1,5 +1,25 @@
 2016-09-09  Babak Shafiei  <[email protected]>
 
+        Merge r204107. rdar://problem/27860536
+
+    2016-08-03  Myles C. Maxfield  <[email protected]>
+
+            [iOS] SF-Heavy is not accessible from web content
+            https://bugs.webkit.org/show_bug.cgi?id=160522
+            <rdar://problem/27685273>
+
+            Reviewed by Simon Fraser.
+
+            The mappings we were using from CSS font-weight to CoreText font weight were inaccurate.
+            Instead, these new mappings should be used.
+
+            Test: fast/text/system-font-weight.html
+
+            * platform/graphics/ios/FontCacheIOS.mm:
+            (WebCore::systemFontModificationAttributes):
+
+2016-09-09  Babak Shafiei  <[email protected]>
+
         Merge r205381. rdar://problem/27806012
 
     2016-09-02  Beth Dakin  <[email protected]>

Modified: branches/safari-602-branch/Source/WebCore/platform/graphics/ios/FontCacheIOS.mm (205713 => 205714)


--- branches/safari-602-branch/Source/WebCore/platform/graphics/ios/FontCacheIOS.mm	2016-09-09 08:42:32 UTC (rev 205713)
+++ branches/safari-602-branch/Source/WebCore/platform/graphics/ios/FontCacheIOS.mm	2016-09-09 08:42:35 UTC (rev 205714)
@@ -155,7 +155,17 @@
     RetainPtr<NSMutableDictionary> traitsDictionary = adoptNS([[NSMutableDictionary alloc] init]);
 
     ASSERT(weight >= FontWeight100 && weight <= FontWeight900);
-    float ctWeights[] = { -0.7, -0.5, -0.23, 0, 0.2, 0.3, 0.4, 0.6, 0.8 };
+    float ctWeights[] = {
+        static_cast<float>(kCTFontWeightUltraLight),
+        static_cast<float>(kCTFontWeightThin),
+        static_cast<float>(kCTFontWeightLight),
+        static_cast<float>(kCTFontWeightRegular),
+        static_cast<float>(kCTFontWeightMedium),
+        static_cast<float>(kCTFontWeightSemibold),
+        static_cast<float>(kCTFontWeightBold),
+        static_cast<float>(kCTFontWeightHeavy),
+        static_cast<float>(kCTFontWeightBlack)
+    };
     [traitsDictionary setObject:[NSNumber numberWithFloat:ctWeights[weight]] forKey:static_cast<NSString *>(kCTFontWeightTrait)];
 
     [traitsDictionary setObject:@YES forKey:static_cast<NSString *>(kCTFontUIFontDesignTrait)];
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to