Diff
Modified: trunk/LayoutTests/ChangeLog (197810 => 197811)
--- trunk/LayoutTests/ChangeLog 2016-03-08 23:44:00 UTC (rev 197810)
+++ trunk/LayoutTests/ChangeLog 2016-03-08 23:52:39 UTC (rev 197811)
@@ -1,3 +1,23 @@
+2016-03-08 Myles C. Maxfield <[email protected]>
+
+ Font size computed style is innaccurate
+ https://bugs.webkit.org/show_bug.cgi?id=154705
+ <rdar://problem/23474068>
+
+ Reviewed by Timothy Hatcher.
+
+ Update expected results.
+
+ * css3/calc/font-size-fractional-expected.txt:
+ * css3/viewport-percentage-lengths/viewport-percentage-lengths-relative-font-size.html:
+ * css3/viewport-percentage-lengths/viewport-percentage-lengths-relative-font-size-expected.txt:
+ * editing/mac/attributed-string/font-size-expected.txt:
+ * editing/mac/attributed-string/vertical-align-expected.txt:
+ * platform/mac-mavericks/editing/mac/attributed-string/font-size-expected.txt:
+ * platform/mac-mavericks/editing/mac/attributed-string/vertical-align-expected.txt:
+ * platform/mac-yosemite/editing/mac/attributed-string/font-size-expected.txt:
+ * platform/mac-yosemite/editing/mac/attributed-string/vertical-align-expected.txt:
+
2016-03-08 Ryan Haddad <[email protected]>
Marking storage/domstorage/events/basic-body-attribute.html as flaky on ios-simulator-wk2
Modified: trunk/LayoutTests/css3/calc/font-size-fractional-expected.txt (197810 => 197811)
--- trunk/LayoutTests/css3/calc/font-size-fractional-expected.txt 2016-03-08 23:44:00 UTC (rev 197810)
+++ trunk/LayoutTests/css3/calc/font-size-fractional-expected.txt 2016-03-08 23:52:39 UTC (rev 197811)
@@ -4,7 +4,7 @@
PASS getComputedStyle(document.getElementById("calc-reduce"), null).lineHeight is "24px"
-PASS getComputedStyle(document.getElementById("calc-reduce"), null).fontSize is "10px"
+PASS getComputedStyle(document.getElementById("calc-reduce"), null).fontSize is "9.600000381469727px"
PASS successfullyParsed is true
TEST COMPLETE
Modified: trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-relative-font-size-expected.txt (197810 => 197811)
--- trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-relative-font-size-expected.txt 2016-03-08 23:44:00 UTC (rev 197810)
+++ trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-relative-font-size-expected.txt 2016-03-08 23:52:39 UTC (rev 197811)
@@ -15,17 +15,17 @@
PASS innerHeight is 600
PASS getComputedStyle(container).fontSize is "45px"
PASS getComputedStyle(ems).fontSize is "180px"
-PASS getComputedStyle(percent).fontSize is "23px"
+PASS getComputedStyle(percent).fontSize is "22.5px"
PASS innerWidth is 900
PASS innerHeight is 640
PASS getComputedStyle(container).fontSize is "45px"
PASS getComputedStyle(ems).fontSize is "180px"
-PASS getComputedStyle(percent).fontSize is "23px"
+PASS getComputedStyle(percent).fontSize is "22.5px"
PASS innerWidth is 500
PASS innerHeight is 640
PASS getComputedStyle(container).fontSize is "25px"
PASS getComputedStyle(ems).fontSize is "100px"
-PASS getComputedStyle(percent).fontSize is "13px"
+PASS getComputedStyle(percent).fontSize is "12.5px"
PASS innerWidth is 800
PASS innerHeight is 600
PASS getComputedStyle(container).fontSize is "40px"
Modified: trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-relative-font-size.html (197810 => 197811)
--- trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-relative-font-size.html 2016-03-08 23:44:00 UTC (rev 197810)
+++ trunk/LayoutTests/css3/viewport-percentage-lengths/viewport-percentage-lengths-relative-font-size.html 2016-03-08 23:52:39 UTC (rev 197811)
@@ -21,9 +21,9 @@
<script>
description("Test that relative font sizes work when the parent is in viewport units.");
standardResizeTest(function () {
- shouldBeEqualToString("getComputedStyle(container).fontSize", Math.round(innerWidth / 20) + "px");
- shouldBeEqualToString("getComputedStyle(ems).fontSize", Math.round(innerWidth / 5) + "px");
- shouldBeEqualToString("getComputedStyle(percent).fontSize", Math.round(innerWidth / 40) + "px");
+ shouldBeEqualToString("getComputedStyle(container).fontSize", (innerWidth / 20) + "px");
+ shouldBeEqualToString("getComputedStyle(ems).fontSize", (innerWidth / 5) + "px");
+ shouldBeEqualToString("getComputedStyle(percent).fontSize", (innerWidth / 40) + "px");
});
</script>
<script src=""
Modified: trunk/LayoutTests/editing/mac/attributed-string/font-size-expected.txt (197810 => 197811)
--- trunk/LayoutTests/editing/mac/attributed-string/font-size-expected.txt 2016-03-08 23:44:00 UTC (rev 197810)
+++ trunk/LayoutTests/editing/mac/attributed-string/font-size-expected.txt 2016-03-08 23:52:39 UTC (rev 197811)
@@ -34,7 +34,7 @@
HeaderLevel: 0
[small element]
NSColor: #000000 (NSDeviceRGBColorSpace)
- NSFont: Times-Roman 13.00 pt.
+ NSFont: Times-Roman 13.33 pt.
NSKern: 0pt
NSStrokeColor: NSDeviceRGBColorSpace 0 0 0 1
NSStrokeWidth: 0
@@ -412,7 +412,7 @@
HeaderLevel: 0
[5pt]
NSColor: #000000 (NSDeviceRGBColorSpace)
- NSFont: Times-Roman 7.00 pt.
+ NSFont: Times-Roman 6.67 pt.
NSKern: 0pt
NSStrokeColor: NSDeviceRGBColorSpace 0 0 0 1
NSStrokeWidth: 0
Modified: trunk/LayoutTests/editing/mac/attributed-string/vertical-align-expected.txt (197810 => 197811)
--- trunk/LayoutTests/editing/mac/attributed-string/vertical-align-expected.txt 2016-03-08 23:44:00 UTC (rev 197810)
+++ trunk/LayoutTests/editing/mac/attributed-string/vertical-align-expected.txt 2016-03-08 23:52:39 UTC (rev 197811)
@@ -29,7 +29,7 @@
HeaderLevel: 0
[sup element]
NSColor: #000000 (NSDeviceRGBColorSpace)
- NSFont: Times-Roman 13.00 pt.
+ NSFont: Times-Roman 13.33 pt.
NSKern: 0pt
NSStrokeColor: NSDeviceRGBColorSpace 0 0 0 1
NSStrokeWidth: 0
@@ -84,7 +84,7 @@
HeaderLevel: 0
[sub element]
NSColor: #000000 (NSDeviceRGBColorSpace)
- NSFont: Times-Roman 13.00 pt.
+ NSFont: Times-Roman 13.33 pt.
NSKern: 0pt
NSStrokeColor: NSDeviceRGBColorSpace 0 0 0 1
NSStrokeWidth: 0
Modified: trunk/LayoutTests/platform/mac-mavericks/editing/mac/attributed-string/font-size-expected.txt (197810 => 197811)
--- trunk/LayoutTests/platform/mac-mavericks/editing/mac/attributed-string/font-size-expected.txt 2016-03-08 23:44:00 UTC (rev 197810)
+++ trunk/LayoutTests/platform/mac-mavericks/editing/mac/attributed-string/font-size-expected.txt 2016-03-08 23:52:39 UTC (rev 197811)
@@ -31,7 +31,7 @@
TighteningFactor: 0.05
HeaderLevel: 0
[small element]
- NSFont: Times-Roman 13.00 pt.
+ NSFont: Times-Roman 13.33 pt.
NSParagraphStyle:
Alignment 4
LineSpacing: 0
@@ -325,7 +325,7 @@
TighteningFactor: 0.05
HeaderLevel: 0
[5pt]
- NSFont: Times-Roman 7.00 pt.
+ NSFont: Times-Roman 6.67 pt.
NSParagraphStyle:
Alignment 4
LineSpacing: 0
Modified: trunk/LayoutTests/platform/mac-mavericks/editing/mac/attributed-string/vertical-align-expected.txt (197810 => 197811)
--- trunk/LayoutTests/platform/mac-mavericks/editing/mac/attributed-string/vertical-align-expected.txt 2016-03-08 23:44:00 UTC (rev 197810)
+++ trunk/LayoutTests/platform/mac-mavericks/editing/mac/attributed-string/vertical-align-expected.txt 2016-03-08 23:52:39 UTC (rev 197811)
@@ -26,7 +26,7 @@
TighteningFactor: 0.05
HeaderLevel: 0
[sup element]
- NSFont: Times-Roman 13.00 pt.
+ NSFont: Times-Roman 13.33 pt.
NSSuperScript: 1
NSParagraphStyle:
Alignment 4
@@ -69,7 +69,7 @@
TighteningFactor: 0.05
HeaderLevel: 0
[sub element]
- NSFont: Times-Roman 13.00 pt.
+ NSFont: Times-Roman 13.33 pt.
NSSuperScript: -1
NSParagraphStyle:
Alignment 4
Modified: trunk/LayoutTests/platform/mac-yosemite/editing/mac/attributed-string/font-size-expected.txt (197810 => 197811)
--- trunk/LayoutTests/platform/mac-yosemite/editing/mac/attributed-string/font-size-expected.txt 2016-03-08 23:44:00 UTC (rev 197810)
+++ trunk/LayoutTests/platform/mac-yosemite/editing/mac/attributed-string/font-size-expected.txt 2016-03-08 23:52:39 UTC (rev 197811)
@@ -32,7 +32,7 @@
HeaderLevel: 0
[small element]
NSColor: #000000 (NSDeviceRGBColorSpace)
- NSFont: Times-Roman 13.00 pt.
+ NSFont: Times-Roman 13.33 pt.
NSKern: 0pt
NSStrokeColor: NSDeviceRGBColorSpace 0 0 0 1
NSStrokeWidth: 0
@@ -382,7 +382,7 @@
HeaderLevel: 0
[5pt]
NSColor: #000000 (NSDeviceRGBColorSpace)
- NSFont: Times-Roman 7.00 pt.
+ NSFont: Times-Roman 6.67 pt.
NSKern: 0pt
NSStrokeColor: NSDeviceRGBColorSpace 0 0 0 1
NSStrokeWidth: 0
Modified: trunk/LayoutTests/platform/mac-yosemite/editing/mac/attributed-string/vertical-align-expected.txt (197810 => 197811)
--- trunk/LayoutTests/platform/mac-yosemite/editing/mac/attributed-string/vertical-align-expected.txt 2016-03-08 23:44:00 UTC (rev 197810)
+++ trunk/LayoutTests/platform/mac-yosemite/editing/mac/attributed-string/vertical-align-expected.txt 2016-03-08 23:52:39 UTC (rev 197811)
@@ -27,7 +27,7 @@
HeaderLevel: 0
[sup element]
NSColor: #000000 (NSDeviceRGBColorSpace)
- NSFont: Times-Roman 13.00 pt.
+ NSFont: Times-Roman 13.33 pt.
NSKern: 0pt
NSStrokeColor: NSDeviceRGBColorSpace 0 0 0 1
NSStrokeWidth: 0
@@ -78,7 +78,7 @@
HeaderLevel: 0
[sub element]
NSColor: #000000 (NSDeviceRGBColorSpace)
- NSFont: Times-Roman 13.00 pt.
+ NSFont: Times-Roman 13.33 pt.
NSKern: 0pt
NSStrokeColor: NSDeviceRGBColorSpace 0 0 0 1
NSStrokeWidth: 0
Modified: trunk/Source/WebCore/ChangeLog (197810 => 197811)
--- trunk/Source/WebCore/ChangeLog 2016-03-08 23:44:00 UTC (rev 197810)
+++ trunk/Source/WebCore/ChangeLog 2016-03-08 23:52:39 UTC (rev 197811)
@@ -1,3 +1,20 @@
+2016-03-08 Myles C. Maxfield <[email protected]>
+
+ Font size computed style is innaccurate
+ https://bugs.webkit.org/show_bug.cgi?id=154705
+ <rdar://problem/23474068>
+
+ Reviewed by Timothy Hatcher.
+
+ Safari rounds the font size value reported to getComputedStyle(). Neither Firefox
+ nor Chrome do this.
+
+ Covered by existing tests.
+
+ * css/CSSComputedStyleDeclaration.cpp:
+ (WebCore::ComputedStyleExtractor::getFontSizeCSSValuePreferringKeyword):
+ (WebCore::fontSizeFromStyle):
+
2016-03-08 Ada Chan <[email protected]>
Enable API related to the video fullscreen layer in MediaPlayerPrivateMediaStreamAVFObjC for Mac.
Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (197810 => 197811)
--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp 2016-03-08 23:44:00 UTC (rev 197810)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp 2016-03-08 23:52:39 UTC (rev 197811)
@@ -1578,7 +1578,7 @@
if (CSSValueID sizeIdentifier = style->fontDescription().keywordSizeAsIdentifier())
return CSSValuePool::singleton().createIdentifierValue(sizeIdentifier);
- return zoomAdjustedPixelValue(style->fontDescription().computedPixelSize(), *style);
+ return zoomAdjustedPixelValue(style->fontDescription().computedSize(), *style);
}
bool ComputedStyleExtractor::useFixedFontDefaultSize() const
@@ -1830,7 +1830,7 @@
static Ref<CSSPrimitiveValue> fontSizeFromStyle(RenderStyle& style)
{
- return zoomAdjustedPixelValue(style.fontDescription().computedPixelSize(), style);
+ return zoomAdjustedPixelValue(style.fontDescription().computedSize(), style);
}
static Ref<CSSPrimitiveValue> fontStyleFromStyle(RenderStyle* style)