Diff
Modified: branches/safari-601.1.46-branch/LayoutTests/ChangeLog (193868 => 193869)
--- branches/safari-601.1.46-branch/LayoutTests/ChangeLog 2015-12-09 22:39:42 UTC (rev 193868)
+++ branches/safari-601.1.46-branch/LayoutTests/ChangeLog 2015-12-09 22:39:46 UTC (rev 193869)
@@ -1,5 +1,21 @@
2015-12-09 Matthew Hanson <matthew_han...@apple.com>
+ Merge r192639. rdar://problem/23814338
+
+ 2015-11-19 Myles C. Maxfield <mmaxfi...@apple.com>
+
+ Tatechuyoko in ruby sits too high
+ https://bugs.webkit.org/show_bug.cgi?id=151309
+ <rdar://problem/23536621>
+
+ Reviewed by Darin Adler.
+
+ * fast/text/resources/tatechuyoko.svg: Added.
+ * fast/text/text-combine-placement-expected.html: Added.
+ * fast/text/text-combine-placement.html: Added.
+
+2015-12-09 Matthew Hanson <matthew_han...@apple.com>
+
Merge r192388. rdar://problem/23814336
2015-11-12 David Hyatt <hy...@apple.com>
Added: branches/safari-601.1.46-branch/LayoutTests/fast/text/resources/tatechuyoko.svg (0 => 193869)
--- branches/safari-601.1.46-branch/LayoutTests/fast/text/resources/tatechuyoko.svg (rev 0)
+++ branches/safari-601.1.46-branch/LayoutTests/fast/text/resources/tatechuyoko.svg 2015-12-09 22:39:46 UTC (rev 193869)
@@ -0,0 +1,11 @@
+<?xml version="1.0" standalone="yes"?>
+<svg version="1.1" viewBox="0 0 160 160" xmlns = 'http://www.w3.org/2000/svg' xmlns:xlink="http://www.w3.org/1999/xlink">
+ <defs>
+ <font id="Litherum" horiz-adv-x="1024">
+ <font-face units-per-em="1024" ascent="512" descent="512">
+ </font-face>
+ <glyph unicode="A" horiz-adv-x="256" d="m 0 0 v 128 h 128 v -128 z"/>
+ <glyph unicode="の" horiz-adv-x="256" d="m 0 0 v 128 h 128 v -128 z"/>
+ </font>
+ </defs>
+</svg>
Added: branches/safari-601.1.46-branch/LayoutTests/fast/text/text-combine-placement-expected.html (0 => 193869)
--- branches/safari-601.1.46-branch/LayoutTests/fast/text/text-combine-placement-expected.html (rev 0)
+++ branches/safari-601.1.46-branch/LayoutTests/fast/text/text-combine-placement-expected.html 2015-12-09 22:39:46 UTC (rev 193869)
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+@font-face {
+ font-family: "Litherum";
+ src: url("resources/tatechuyoko.svg#Litherum") format("svg");
+}
+</style>
+</head>
+<body>
+<p>This test makes sure that tatechuyoko glyphs are centered correctly within the space left for them. The test is successful if the three boxes on the left have the same vertical positions as the three boxes on the right. The two vertically-middle boxes should be vertically centered between the four corner boxes.</p>
+<p>Note that the boxes' horizontal spacing is irrelevant here. We are only interested in vertical spacing.</p>
+<div style="-webkit-writing-mode: vertical-rl;">
+<div><span style="font: 32px Ahem;">A</span><span style="font: 256px Litherum; -webkit-text-combine: horizontal;">A</span><span style="font: 32px Ahem;">A</span></div>
+<div><span style="font: 32px Ahem;">A</span><span style="font: 256px Litherum; -webkit-text-combine: horizontal;">A</span><span style="font: 32px Ahem;">A</span></div>
+</div>
+</body>
+</html>
\ No newline at end of file
Added: branches/safari-601.1.46-branch/LayoutTests/fast/text/text-combine-placement.html (0 => 193869)
--- branches/safari-601.1.46-branch/LayoutTests/fast/text/text-combine-placement.html (rev 0)
+++ branches/safari-601.1.46-branch/LayoutTests/fast/text/text-combine-placement.html 2015-12-09 22:39:46 UTC (rev 193869)
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+@font-face {
+ font-family: "Litherum";
+ src: url("resources/tatechuyoko.svg#Litherum") format("svg");
+}
+</style>
+</head>
+<body>
+<p>This test makes sure that tatechuyoko glyphs are centered correctly within the space left for them. The test is successful if the three boxes on the left have the same vertical positions as the three boxes on the right. The two vertically-middle boxes should be vertically centered between the four corner boxes.</p>
+<p>Note that the boxes' horizontal spacing is irrelevant here. We are only interested in vertical spacing.</p>
+<div style="-webkit-writing-mode: vertical-rl;">
+<div><span style="font: 32px Ahem;">A</span><span style="font: 256px Litherum; -webkit-text-combine: horizontal;">A</span><span style="font: 32px Ahem;">A</span></div>
+<div><span style="font: 32px Ahem;">A</span><span style="font: 256px Litherum; -webkit-text-combine: horizontal;">の</span><span style="font: 32px Ahem;">A</span></div>
+</div>
+</body>
+</html>
\ No newline at end of file
Modified: branches/safari-601.1.46-branch/Source/WebCore/ChangeLog (193868 => 193869)
--- branches/safari-601.1.46-branch/Source/WebCore/ChangeLog 2015-12-09 22:39:42 UTC (rev 193868)
+++ branches/safari-601.1.46-branch/Source/WebCore/ChangeLog 2015-12-09 22:39:46 UTC (rev 193869)
@@ -1,5 +1,32 @@
2015-12-09 Matthew Hanson <matthew_han...@apple.com>
+ Merge r192639. rdar://problem/23814338
+
+ 2015-11-19 Myles C. Maxfield <mmaxfi...@apple.com>
+
+ Tatechuyoko in ruby sits too high
+ https://bugs.webkit.org/show_bug.cgi?id=151309
+ <rdar://problem/23536621>
+
+ Reviewed by Darin Adler.
+
+ When combining text, we ask what the text's width is in order to determine if it fits in the
+ column. However, when we do that, we were not setting the font's orientation to horizontal.
+ This means that, for CJK text, the "width" which was returned was actually the height of the
+ glyph, and the GlyphOverflow data was similarly garbled.
+
+ We actually already were creating a corrected FontDescription, and using it in two places.
+ However, we weren't using it in the last place, which was causing this bug.
+
+ Test: fast/text/text-combine-placement.html
+
+ * platform/graphics/FontCascade.cpp:
+ (WebCore::FontCascade::width):
+ * rendering/RenderCombineText.cpp:
+ (WebCore::RenderCombineText::combineText):
+
+2015-12-09 Matthew Hanson <matthew_han...@apple.com>
+
Merge r192388. rdar://problem/23814336
2015-11-12 David Hyatt <hy...@apple.com>
Modified: branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/FontCascade.cpp (193868 => 193869)
--- branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/FontCascade.cpp 2015-12-09 22:39:42 UTC (rev 193868)
+++ branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/FontCascade.cpp 2015-12-09 22:39:46 UTC (rev 193869)
@@ -368,10 +368,10 @@
if (codePathToUse != Complex) {
// The complex path is more restrictive about returning fallback fonts than the simple path, so we need an explicit test to make their behaviors match.
if (!canReturnFallbackFontsForComplexText())
- fallbackFonts = 0;
+ fallbackFonts = nullptr;
// The simple path can optimize the case where glyph overflow is not observable.
if (codePathToUse != SimpleWithGlyphOverflow && (glyphOverflow && !glyphOverflow->computeBounds))
- glyphOverflow = 0;
+ glyphOverflow = nullptr;
}
bool hasWordSpacingOrLetterSpacing = wordSpacing() || letterSpacing();
Modified: branches/safari-601.1.46-branch/Source/WebCore/rendering/RenderCombineText.cpp (193868 => 193869)
--- branches/safari-601.1.46-branch/Source/WebCore/rendering/RenderCombineText.cpp 2015-12-09 22:39:42 UTC (rev 193868)
+++ branches/safari-601.1.46-branch/Source/WebCore/rendering/RenderCombineText.cpp 2015-12-09 22:39:46 UTC (rev 193869)
@@ -117,20 +117,22 @@
float emWidth = description.computedSize() * textCombineMargin;
bool shouldUpdateFont = false;
+ FontSelector* fontSelector = style().fontCascade().fontSelector();
+
description.setOrientation(Horizontal); // We are going to draw combined text horizontally.
+
+ FontCascade horizontalFont(description, style().fontCascade().letterSpacing(), style().fontCascade().wordSpacing());
+ horizontalFont.update(fontSelector);
GlyphOverflow glyphOverflow;
glyphOverflow.computeBounds = true;
-
- float combinedTextWidth = width(0, textLength(), originalFont(), 0, nullptr, &glyphOverflow);
+ float combinedTextWidth = width(0, textLength(), horizontalFont, 0, nullptr, &glyphOverflow);
float bestFitDelta = combinedTextWidth - emWidth;
auto bestFitDescription = description;
m_isCombined = combinedTextWidth <= emWidth;
- FontSelector* fontSelector = style().fontCascade().fontSelector();
-
if (m_isCombined)
shouldUpdateFont = m_combineFontStyle->setFontDescription(description); // Need to change font orientation to horizontal.
else {