<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[192269] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/192269">192269</a></dd>
<dt>Author</dt> <dd>hyatt@apple.com</dd>
<dt>Date</dt> <dd>2015-11-10 14:04:34 -0800 (Tue, 10 Nov 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>tate-chu-yoko should shrink to fit when it exceeds the available width.
&lt;rdar://problem/12130468&gt;
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
&lt;rdar://problem/12130468&gt;
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
&lt;rdar://problem/12130468&gt;
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
&lt;rdar://problem/12130468&gt;
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
&lt;rdar://problem/12130468&gt;
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
&lt;rdar://problem/12130468&gt;
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
&lt;rdar://problem/12130468&gt;
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
&lt;rdar://problem/12130468&gt;
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
&lt;rdar://problem/12130468&gt;
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
&lt;rdar://problem/12130468&gt;
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
&lt;rdar://problem/12130468&gt;
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
&lt;rdar://problem/12130468&gt;
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
&lt;rdar://problem/12130468&gt;
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
&lt;rdar://problem/12130468&gt;
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
&lt;rdar://problem/12130468&gt;
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
&lt;rdar://problem/12130468&gt;
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
&lt;rdar://problem/12130468&gt;
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
&lt;rdar://problem/12130468&gt;
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
&lt;rdar://problem/12130468&gt;
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
&lt;rdar://problem/12130468&gt;
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
&lt;rdar://problem/12130468&gt;
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
&lt;rdar://problem/12130468&gt;
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
&lt;rdar://problem/12130468&gt;
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
&lt;rdar://problem/12130468&gt;
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
&lt;rdar://problem/12130468&gt;
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
&lt;rdar://problem/12130468&gt;
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
&lt;rdar://problem/12130468&gt;
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
&lt;rdar://problem/12130468&gt;
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
&lt;rdar://problem/12130468&gt;
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
&lt;rdar://problem/12130468&gt;
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
&lt;rdar://problem/12130468&gt;
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
&lt;rdar://problem/12130468&gt;
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
&lt;rdar://problem/12130468&gt;
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
&lt;rdar://problem/12130468&gt;
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
&lt;rdar://problem/12130468&gt;
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
&lt;rdar://problem/12130468&gt;
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
&lt;rdar://problem/12130468&gt;
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
&lt;rdar://problem/12130468&gt;
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
&lt;rdar://problem/12130468&gt;
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
&lt;rdar://problem/12130468&gt;
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
&lt;rdar://problem/12130468&gt;
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
&lt;rdar://problem/12130468&gt;
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
&lt;rdar://problem/12130468&gt;
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
&lt;rdar://problem/12130468&gt;
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
&lt;rdar://problem/12130468&gt;
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
&lt;rdar://problem/12130468&gt;
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
&lt;rdar://problem/12130468&gt;
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfasttexttextcombinecrashexpectedtxt">trunk/LayoutTests/fast/text/text-combine-crash-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacfasttextdecorationswithtextcombineexpectedpng">trunk/LayoutTests/platform/mac/fast/text/decorations-with-text-combine-expected.png</a></li>
<li><a href="#trunkLayoutTestsplatformmacfasttextdecorationswithtextcombineexpectedtxt">trunk/LayoutTests/platform/mac/fast/text/decorations-with-text-combine-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacfasttextinternationaltextcombineimagetestexpectedtxt">trunk/LayoutTests/platform/mac/fast/text/international/text-combine-image-test-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacfasttexttatechuyokoexpectedpng">trunk/LayoutTests/platform/mac/fast/text/tatechuyoko-expected.png</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderCombineTextcpp">trunk/Source/WebCore/rendering/RenderCombineText.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (192268 => 192269)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-11-10 21:55:56 UTC (rev 192268)
+++ trunk/LayoutTests/ChangeLog        2015-11-10 22:04:34 UTC (rev 192269)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2015-11-09  David Hyatt  &lt;hyatt@apple.com&gt;
+
+        tate-chu-yoko should shrink to fit when it exceeds the available width.
+        &lt;rdar://problem/12130468&gt;
+        https://bugs.webkit.org/show_bug.cgi?id=151051
+
+        Reviewed by Myles Maxfield.
+
+        * fast/text/international/spaces-combined-in-vertical-text-expected.txt:
+        * fast/text/text-combine-crash-expected.txt:
+        * platform/mac/fast/text/decorations-with-text-combine-expected.png:
+        * platform/mac/fast/text/decorations-with-text-combine-expected.txt:
+        * platform/mac/fast/text/international/text-combine-image-test-expected.txt:
+        * platform/mac/fast/text/tatechuyoko-expected.png:
+        * platform/mac/fast/text/tatechuyoko-expected.txt:
+
</ins><span class="cx"> 2015-11-10  Jiewen Tan  &lt;jiewen_tan@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Null dereference loading Blink layout test editing/execCommand/selectAll-including-marquee-crash.html
</span></span></pre></div>
<a id="trunkLayoutTestsfasttexttextcombinecrashexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/text/text-combine-crash-expected.txt (192268 => 192269)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/text/text-combine-crash-expected.txt        2015-11-10 21:55:56 UTC (rev 192268)
+++ trunk/LayoutTests/fast/text/text-combine-crash-expected.txt        2015-11-10 22:04:34 UTC (rev 192269)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> CONSOLE MESSAGE: line 1: SyntaxError: Unexpected token '&amp;'
</span><span class="cx"> Test passes if there's no crash.
</span><span class="cx"> 
</span><del>-foo   
</del><ins>+
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> Errlog webtest_fn_1: TypeError: undefined is not an object (evaluating 'document.applets[0].addEventListener')
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacfasttextdecorationswithtextcombineexpectedpng"></a>
<div class="binary"><h4>Modified: trunk/LayoutTests/platform/mac/fast/text/decorations-with-text-combine-expected.png</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacfasttextdecorationswithtextcombineexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/fast/text/decorations-with-text-combine-expected.txt (192268 => 192269)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/fast/text/decorations-with-text-combine-expected.txt        2015-11-10 21:55:56 UTC (rev 192268)
+++ trunk/LayoutTests/platform/mac/fast/text/decorations-with-text-combine-expected.txt        2015-11-10 22:04:34 UTC (rev 192269)
</span><span class="lines">@@ -17,11 +17,11 @@
</span><span class="cx">               text run at (6,144) width 24: &quot;\x{FFFC}&quot;
</span><span class="cx">           RenderText {#text} at (6,168) size 24x120
</span><span class="cx">             text run at (6,168) width 120: &quot;\x{304B}\x{3057}\x{3064}\x{3051}\x{306B}&quot;
</span><del>-          RenderInline {SPAN} at (0,0) size 24x71 [color=#0000FF]
-            RenderCombineText {#text} at (6,288) size 24x71
-              text run at (6,288) width 71: &quot;12345&quot;
-          RenderText {#text} at (6,358) size 24x169
-            text run at (6,358) width 168: &quot;\x{6765}\x{3066}\x{304F}\x{308C}\x{308B}\x{307E}\x{3067}&quot;
</del><ins>+          RenderInline {SPAN} at (0,0) size 24x24 [color=#0000FF]
+            RenderCombineText {#text} at (6,288) size 24x24
+              text run at (6,288) width 24: &quot;\x{FFFC}&quot;
+          RenderText {#text} at (6,312) size 24x168
+            text run at (6,312) width 168: &quot;\x{6765}\x{3066}\x{304F}\x{308C}\x{308B}\x{307E}\x{3067}&quot;
</ins><span class="cx">         RenderBlock {DIV} at (46,0) size 36x584
</span><span class="cx">           RenderText {#text} at (6,0) size 24x72
</span><span class="cx">             text run at (6,0) width 72: &quot;\x{305D}\x{306E}\x{5973}&quot;
</span><span class="lines">@@ -35,11 +35,11 @@
</span><span class="cx">               text run at (6,144) width 24: &quot;\x{FFFC}&quot;
</span><span class="cx">           RenderText {#text} at (6,168) size 24x120
</span><span class="cx">             text run at (6,168) width 120: &quot;\x{304B}\x{3057}\x{3064}\x{3051}\x{306B}&quot;
</span><del>-          RenderInline {SPAN} at (0,0) size 24x71 [color=#0000FF]
-            RenderCombineText {#text} at (6,288) size 24x71
-              text run at (6,288) width 71: &quot;12345&quot;
-          RenderText {#text} at (6,358) size 24x169
-            text run at (6,358) width 168: &quot;\x{6765}\x{3066}\x{304F}\x{308C}\x{308B}\x{307E}\x{3067}&quot;
</del><ins>+          RenderInline {SPAN} at (0,0) size 24x24 [color=#0000FF]
+            RenderCombineText {#text} at (6,288) size 24x24
+              text run at (6,288) width 24: &quot;\x{FFFC}&quot;
+          RenderText {#text} at (6,312) size 24x168
+            text run at (6,312) width 168: &quot;\x{6765}\x{3066}\x{304F}\x{308C}\x{308B}\x{307E}\x{3067}&quot;
</ins><span class="cx">       RenderBlock {DIV} at (92,0) size 82x584
</span><span class="cx">         RenderBlock {DIV} at (0,0) size 36x584
</span><span class="cx">           RenderText {#text} at (6,0) size 24x72
</span><span class="lines">@@ -54,11 +54,11 @@
</span><span class="cx">               text run at (6,144) width 24: &quot;\x{FFFC}&quot;
</span><span class="cx">           RenderText {#text} at (6,168) size 24x120
</span><span class="cx">             text run at (6,168) width 120: &quot;\x{304B}\x{3057}\x{3064}\x{3051}\x{306B}&quot;
</span><del>-          RenderInline {SPAN} at (0,0) size 24x71 [color=#0000FF]
-            RenderCombineText {#text} at (6,288) size 24x71
-              text run at (6,288) width 71: &quot;12345&quot;
-          RenderText {#text} at (6,358) size 24x169
-            text run at (6,358) width 168: &quot;\x{6765}\x{3066}\x{304F}\x{308C}\x{308B}\x{307E}\x{3067}&quot;
</del><ins>+          RenderInline {SPAN} at (0,0) size 24x24 [color=#0000FF]
+            RenderCombineText {#text} at (6,288) size 24x24
+              text run at (6,288) width 24: &quot;\x{FFFC}&quot;
+          RenderText {#text} at (6,312) size 24x168
+            text run at (6,312) width 168: &quot;\x{6765}\x{3066}\x{304F}\x{308C}\x{308B}\x{307E}\x{3067}&quot;
</ins><span class="cx">         RenderBlock {DIV} at (46,0) size 36x584
</span><span class="cx">           RenderText {#text} at (6,0) size 24x72
</span><span class="cx">             text run at (6,0) width 72: &quot;\x{305D}\x{306E}\x{5973}&quot;
</span><span class="lines">@@ -72,11 +72,11 @@
</span><span class="cx">               text run at (6,144) width 24: &quot;\x{FFFC}&quot;
</span><span class="cx">           RenderText {#text} at (6,168) size 24x120
</span><span class="cx">             text run at (6,168) width 120: &quot;\x{304B}\x{3057}\x{3064}\x{3051}\x{306B}&quot;
</span><del>-          RenderInline {SPAN} at (0,0) size 24x71 [color=#0000FF]
-            RenderCombineText {#text} at (6,288) size 24x71
-              text run at (6,288) width 71: &quot;12345&quot;
-          RenderText {#text} at (6,358) size 24x169
-            text run at (6,358) width 168: &quot;\x{6765}\x{3066}\x{304F}\x{308C}\x{308B}\x{307E}\x{3067}&quot;
</del><ins>+          RenderInline {SPAN} at (0,0) size 24x24 [color=#0000FF]
+            RenderCombineText {#text} at (6,288) size 24x24
+              text run at (6,288) width 24: &quot;\x{FFFC}&quot;
+          RenderText {#text} at (6,312) size 24x168
+            text run at (6,312) width 168: &quot;\x{6765}\x{3066}\x{304F}\x{308C}\x{308B}\x{307E}\x{3067}&quot;
</ins><span class="cx">       RenderBlock {DIV} at (184,0) size 82x584
</span><span class="cx">         RenderBlock {DIV} at (0,0) size 36x584
</span><span class="cx">           RenderText {#text} at (6,0) size 24x72
</span><span class="lines">@@ -91,11 +91,11 @@
</span><span class="cx">               text run at (6,144) width 24: &quot;\x{FFFC}&quot;
</span><span class="cx">           RenderText {#text} at (6,168) size 24x120
</span><span class="cx">             text run at (6,168) width 120: &quot;\x{304B}\x{3057}\x{3064}\x{3051}\x{306B}&quot;
</span><del>-          RenderInline {SPAN} at (0,0) size 24x71 [color=#0000FF]
-            RenderCombineText {#text} at (6,288) size 24x71
-              text run at (6,288) width 71: &quot;12345&quot;
-          RenderText {#text} at (6,358) size 24x169
-            text run at (6,358) width 168: &quot;\x{6765}\x{3066}\x{304F}\x{308C}\x{308B}\x{307E}\x{3067}&quot;
</del><ins>+          RenderInline {SPAN} at (0,0) size 24x24 [color=#0000FF]
+            RenderCombineText {#text} at (6,288) size 24x24
+              text run at (6,288) width 24: &quot;\x{FFFC}&quot;
+          RenderText {#text} at (6,312) size 24x168
+            text run at (6,312) width 168: &quot;\x{6765}\x{3066}\x{304F}\x{308C}\x{308B}\x{307E}\x{3067}&quot;
</ins><span class="cx">         RenderBlock {DIV} at (46,0) size 36x584
</span><span class="cx">           RenderText {#text} at (6,0) size 24x72
</span><span class="cx">             text run at (6,0) width 72: &quot;\x{305D}\x{306E}\x{5973}&quot;
</span><span class="lines">@@ -109,11 +109,11 @@
</span><span class="cx">               text run at (6,144) width 24: &quot;\x{FFFC}&quot;
</span><span class="cx">           RenderText {#text} at (6,168) size 24x120
</span><span class="cx">             text run at (6,168) width 120: &quot;\x{304B}\x{3057}\x{3064}\x{3051}\x{306B}&quot;
</span><del>-          RenderInline {SPAN} at (0,0) size 24x71 [color=#0000FF]
-            RenderCombineText {#text} at (6,288) size 24x71
-              text run at (6,288) width 71: &quot;12345&quot;
-          RenderText {#text} at (6,358) size 24x169
-            text run at (6,358) width 168: &quot;\x{6765}\x{3066}\x{304F}\x{308C}\x{308B}\x{307E}\x{3067}&quot;
</del><ins>+          RenderInline {SPAN} at (0,0) size 24x24 [color=#0000FF]
+            RenderCombineText {#text} at (6,288) size 24x24
+              text run at (6,288) width 24: &quot;\x{FFFC}&quot;
+          RenderText {#text} at (6,312) size 24x168
+            text run at (6,312) width 168: &quot;\x{6765}\x{3066}\x{304F}\x{308C}\x{308B}\x{307E}\x{3067}&quot;
</ins><span class="cx">       RenderBlock {DIV} at (276,0) size 98x584
</span><span class="cx">         RenderBlock {DIV} at (0,0) size 44x584
</span><span class="cx">           RenderText {#text} at (14,0) size 24x72
</span><span class="lines">@@ -128,11 +128,11 @@
</span><span class="cx">               text run at (14,144) width 24: &quot;\x{FFFC}&quot;
</span><span class="cx">           RenderText {#text} at (14,168) size 24x120
</span><span class="cx">             text run at (14,168) width 120: &quot;\x{304B}\x{3057}\x{3064}\x{3051}\x{306B}&quot;
</span><del>-          RenderInline {SPAN} at (0,0) size 24x71 [color=#0000FF]
-            RenderCombineText {#text} at (14,288) size 24x71
-              text run at (14,288) width 71: &quot;12345&quot;
-          RenderText {#text} at (14,358) size 24x169
-            text run at (14,358) width 168: &quot;\x{6765}\x{3066}\x{304F}\x{308C}\x{308B}\x{307E}\x{3067}&quot;
</del><ins>+          RenderInline {SPAN} at (0,0) size 24x24 [color=#0000FF]
+            RenderCombineText {#text} at (14,288) size 24x24
+              text run at (14,288) width 24: &quot;\x{FFFC}&quot;
+          RenderText {#text} at (14,312) size 24x168
+            text run at (14,312) width 168: &quot;\x{6765}\x{3066}\x{304F}\x{308C}\x{308B}\x{307E}\x{3067}&quot;
</ins><span class="cx">         RenderBlock {DIV} at (54,0) size 44x584
</span><span class="cx">           RenderText {#text} at (14,0) size 24x72
</span><span class="cx">             text run at (14,0) width 72: &quot;\x{305D}\x{306E}\x{5973}&quot;
</span><span class="lines">@@ -146,8 +146,8 @@
</span><span class="cx">               text run at (14,144) width 24: &quot;\x{FFFC}&quot;
</span><span class="cx">           RenderText {#text} at (14,168) size 24x120
</span><span class="cx">             text run at (14,168) width 120: &quot;\x{304B}\x{3057}\x{3064}\x{3051}\x{306B}&quot;
</span><del>-          RenderInline {SPAN} at (0,0) size 24x71 [color=#0000FF]
-            RenderCombineText {#text} at (14,288) size 24x71
-              text run at (14,288) width 71: &quot;12345&quot;
-          RenderText {#text} at (14,358) size 24x169
-            text run at (14,358) width 168: &quot;\x{6765}\x{3066}\x{304F}\x{308C}\x{308B}\x{307E}\x{3067}&quot;
</del><ins>+          RenderInline {SPAN} at (0,0) size 24x24 [color=#0000FF]
+            RenderCombineText {#text} at (14,288) size 24x24
+              text run at (14,288) width 24: &quot;\x{FFFC}&quot;
+          RenderText {#text} at (14,312) size 24x168
+            text run at (14,312) width 168: &quot;\x{6765}\x{3066}\x{304F}\x{308C}\x{308B}\x{307E}\x{3067}&quot;
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacfasttextinternationaltextcombineimagetestexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/fast/text/international/text-combine-image-test-expected.txt (192268 => 192269)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/fast/text/international/text-combine-image-test-expected.txt        2015-11-10 21:55:56 UTC (rev 192268)
+++ trunk/LayoutTests/platform/mac/fast/text/international/text-combine-image-test-expected.txt        2015-11-10 22:04:34 UTC (rev 192269)
</span><span class="lines">@@ -40,32 +40,32 @@
</span><span class="cx">         RenderText {#text} at (0,0) size 0x0
</span><span class="cx">       RenderBlock {HR} at (132,0) size 2x584 [border: (1px inset #000000)]
</span><span class="cx">       RenderBlock (anonymous) at (142,0) size 45x584
</span><del>-        RenderInline {SPAN} at (0,0) size 37x465
-          RenderInline {SPAN} at (0,0) size 37x79
-            RenderCombineText {#text} at (4,0) size 37x79
-              text run at (4,0) width 79: &quot;Times&quot;
-          RenderText {#text} at (4,78) size 37x83
-            text run at (4,78) width 83: &quot;=\x{897F}\x{66A6}&quot;
-          RenderInline {SPAN} at (0,0) size 37x65
-            RenderCombineText {#text} at (4,160) size 37x65
-              text run at (4,160) width 64: &quot;2010&quot;
-          RenderText {#text} at (4,224) size 37x33
-            text run at (4,224) width 32: &quot;\x{5E74}&quot;
</del><ins>+        RenderInline {SPAN} at (0,0) size 37x371
+          RenderInline {SPAN} at (0,0) size 37x32
+            RenderCombineText {#text} at (4,0) size 37x32
+              text run at (4,0) width 32: &quot;\x{FFFC}&quot;
+          RenderText {#text} at (4,32) size 37x83
+            text run at (4,32) width 83: &quot;=\x{897F}\x{66A6}&quot;
</ins><span class="cx">           RenderInline {SPAN} at (0,0) size 37x33
</span><del>-            RenderCombineText {#text} at (4,256) size 37x33
-              text run at (4,256) width 32: &quot;\x{FFFC}&quot;
-          RenderText {#text} at (4,288) size 37x33
-            text run at (4,288) width 32: &quot;\x{6708}&quot;
</del><ins>+            RenderCombineText {#text} at (4,114) size 37x33
+              text run at (4,114) width 32: &quot;\x{FFFC}&quot;
+          RenderText {#text} at (4,146) size 37x33
+            text run at (4,146) width 32: &quot;\x{5E74}&quot;
</ins><span class="cx">           RenderInline {SPAN} at (0,0) size 37x33
</span><del>-            RenderCombineText {#text} at (4,320) size 37x33
-              text run at (4,320) width 32: &quot;\x{FFFC}&quot;
-          RenderText {#text} at (4,352) size 37x33
-            text run at (4,352) width 32: &quot;\x{65E5}&quot;
-          RenderInline {SPAN} at (0,0) size 37x49
-            RenderCombineText {#text} at (4,384) size 37x49
-              text run at (4,384) width 48: &quot;365&quot;
-          RenderText {#text} at (4,432) size 37x33
-            text run at (4,432) width 32: &quot;\x{56DE}&quot;
</del><ins>+            RenderCombineText {#text} at (4,178) size 37x33
+              text run at (4,178) width 32: &quot;\x{FFFC}&quot;
+          RenderText {#text} at (4,210) size 37x33
+            text run at (4,210) width 32: &quot;\x{6708}&quot;
+          RenderInline {SPAN} at (0,0) size 37x33
+            RenderCombineText {#text} at (4,242) size 37x33
+              text run at (4,242) width 32: &quot;\x{FFFC}&quot;
+          RenderText {#text} at (4,274) size 37x33
+            text run at (4,274) width 32: &quot;\x{65E5}&quot;
+          RenderInline {SPAN} at (0,0) size 37x33
+            RenderCombineText {#text} at (4,306) size 37x33
+              text run at (4,306) width 32: &quot;\x{FFFC}&quot;
+          RenderText {#text} at (4,338) size 37x33
+            text run at (4,338) width 32: &quot;\x{56DE}&quot;
</ins><span class="cx">         RenderText {#text} at (0,0) size 0x0
</span><span class="cx">       RenderBlock {HR} at (195,0) size 2x584 [border: (1px inset #000000)]
</span><span class="cx">       RenderBlock (anonymous) at (205,0) size 96x584
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacfasttexttatechuyokoexpectedpng"></a>
<div class="binary"><h4>Modified: trunk/LayoutTests/platform/mac/fast/text/tatechuyoko-expected.png</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (192268 => 192269)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-11-10 21:55:56 UTC (rev 192268)
+++ trunk/Source/WebCore/ChangeLog        2015-11-10 22:04:34 UTC (rev 192269)
</span><span class="lines">@@ -1,3 +1,25 @@
</span><ins>+2015-11-09  David Hyatt  &lt;hyatt@apple.com&gt;
+
+        tate-chu-yoko should shrink to fit when it exceeds the available width.
+        &lt;rdar://problem/12130468&gt;
+        https://bugs.webkit.org/show_bug.cgi?id=151051
+
+        Reviewed by Myles Maxfield.
+
+        Covered by existing tests
+
+        * rendering/RenderCombineText.cpp:
+        (WebCore::RenderCombineText::combineText):
+
+        When testing for text-combine, find the font variant that is the best fit, i.e.,
+        that exceeds the available width by the smallest amount. Scale that best fit down
+        repeatedly until it fits within the available space. We set a pixel size of 6 as
+        the threshold at which we give up.
+
+        Also make sure to reset glyphOverflow on each measurement, as this was creating
+        a potential bug both with variant checking and then with scaling, since glyphOverflow
+        isn't reset when width() is invoked.
+
</ins><span class="cx"> 2015-11-10  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Tatechuyoko text is not vertically centered in its vertical advance
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderCombineTextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderCombineText.cpp (192268 => 192269)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderCombineText.cpp        2015-11-10 21:55:56 UTC (rev 192268)
+++ trunk/Source/WebCore/rendering/RenderCombineText.cpp        2015-11-10 22:04:34 UTC (rev 192269)
</span><span class="lines">@@ -118,10 +118,14 @@
</span><span class="cx">     glyphOverflow.computeBounds = true;
</span><span class="cx">     
</span><span class="cx">     float combinedTextWidth = width(0, textLength(), originalFont(), 0, nullptr, &amp;glyphOverflow);
</span><ins>+
+    float bestFitDelta = combinedTextWidth - emWidth;
+    auto bestFitDescription = description;
+
</ins><span class="cx">     m_isCombined = combinedTextWidth &lt;= emWidth;
</span><span class="cx">     
</span><span class="cx">     FontSelector* fontSelector = style().fontCascade().fontSelector();
</span><del>-
</del><ins>+    
</ins><span class="cx">     if (m_isCombined)
</span><span class="cx">         shouldUpdateFont = m_combineFontStyle-&gt;setFontDescription(description); // Need to change font orientation to horizontal.
</span><span class="cx">     else {
</span><span class="lines">@@ -133,6 +137,7 @@
</span><span class="cx">             FontCascade compressedFont(description, style().fontCascade().letterSpacing(), style().fontCascade().wordSpacing());
</span><span class="cx">             compressedFont.update(fontSelector);
</span><span class="cx">             
</span><ins>+            glyphOverflow.left = glyphOverflow.top = glyphOverflow.right = glyphOverflow.bottom = 0;
</ins><span class="cx">             float runWidth = RenderText::width(0, textLength(), compressedFont, 0, nullptr, &amp;glyphOverflow);
</span><span class="cx">             if (runWidth &lt;= emWidth) {
</span><span class="cx">                 combinedTextWidth = runWidth;
</span><span class="lines">@@ -142,11 +147,36 @@
</span><span class="cx">                 shouldUpdateFont = m_combineFontStyle-&gt;setFontDescription(description);
</span><span class="cx">                 break;
</span><span class="cx">             }
</span><ins>+            
+            float widthDelta = runWidth - emWidth;
+            if (widthDelta &lt; bestFitDelta) {
+                bestFitDelta = widthDelta;
+                bestFitDescription = description;
+            }
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (!m_isCombined)
-        shouldUpdateFont = m_combineFontStyle-&gt;setFontDescription(originalFont().fontDescription());
</del><ins>+    if (!m_isCombined) {
+        float scaleFactor = std::max(0.4f, emWidth / (emWidth + bestFitDelta));
+        float originalSize = bestFitDescription.computedSize();
+        do {
+            float computedSize = originalSize * scaleFactor;
+            bestFitDescription.setComputedSize(computedSize);
+            shouldUpdateFont = m_combineFontStyle-&gt;setFontDescription(bestFitDescription);
+        
+            FontCascade compressedFont(bestFitDescription, style().fontCascade().letterSpacing(), style().fontCascade().wordSpacing());
+            compressedFont.update(fontSelector);
+            
+            glyphOverflow.left = glyphOverflow.top = glyphOverflow.right = glyphOverflow.bottom = 0;
+            float runWidth = RenderText::width(0, textLength(), compressedFont, 0, nullptr, &amp;glyphOverflow);
+            if (runWidth &lt;= emWidth) {
+                combinedTextWidth = runWidth;
+                m_isCombined = true;
+                break;
+            }
+            scaleFactor -= 0.05f;
+        } while (scaleFactor &gt;= 0.4f);
+    }
</ins><span class="cx"> 
</span><span class="cx">     if (shouldUpdateFont)
</span><span class="cx">         m_combineFontStyle-&gt;fontCascade().update(fontSelector);
</span></span></pre>
</div>
</div>

</body>
</html>