<!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>[169011] 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/169011">169011</a></dd>
<dt>Author</dt> <dd>antti@apple.com</dd>
<dt>Date</dt> <dd>2014-05-18 03:51:53 -0700 (Sun, 18 May 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>REGRESSION (<a href="http://trac.webkit.org/projects/webkit/changeset/160259">r160259</a>): text-combine glyphs are not rendered
https://bugs.webkit.org/show_bug.cgi?id=127324
Reviewed by Andreas Kling.
Source/WebCore:
The original text gets overwritten by a change that is supposed to affect rendered text only.
Fixed by giving the text update functions well-defined purposes.
Test: fast/text/text-combine-rendering.html
* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::styleDidChange):
(WebCore::RenderCombineText::setRenderedText):
(WebCore::RenderCombineText::combineText):
(WebCore::RenderCombineText::setTextInternal): Deleted.
* rendering/RenderCombineText.h:
* rendering/RenderCounter.cpp:
(WebCore::RenderCounter::computePreferredLogicalWidths):
* rendering/RenderText.cpp:
(WebCore::RenderText::setRenderedText):
This function now updates the rendered text but does not change the original.
Get the original text by calling originalText().
(WebCore::RenderText::setText):
This the only place original text now changes.
(WebCore::RenderText::setTextInternal): Deleted.
Renamed to setRenderedText.
* rendering/RenderText.h:
* rendering/svg/RenderSVGInlineText.cpp:
(WebCore::RenderSVGInlineText::setRenderedText):
(WebCore::RenderSVGInlineText::setTextInternal): Deleted.
* rendering/svg/RenderSVGInlineText.h:
LayoutTests:
* fast/text/text-combine-rendering-expected.html: Added.
* fast/text/text-combine-rendering.html: Added.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderCombineTextcpp">trunk/Source/WebCore/rendering/RenderCombineText.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderCombineTexth">trunk/Source/WebCore/rendering/RenderCombineText.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderCountercpp">trunk/Source/WebCore/rendering/RenderCounter.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderTextcpp">trunk/Source/WebCore/rendering/RenderText.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderTexth">trunk/Source/WebCore/rendering/RenderText.h</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGInlineTextcpp">trunk/Source/WebCore/rendering/svg/RenderSVGInlineText.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGInlineTexth">trunk/Source/WebCore/rendering/svg/RenderSVGInlineText.h</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfasttexttextcombinerenderingexpectedhtml">trunk/LayoutTests/fast/text/text-combine-rendering-expected.html</a></li>
<li><a href="#trunkLayoutTestsfasttexttextcombinerenderinghtml">trunk/LayoutTests/fast/text/text-combine-rendering.html</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (169010 => 169011)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-05-18 07:57:27 UTC (rev 169010)
+++ trunk/LayoutTests/ChangeLog        2014-05-18 10:51:53 UTC (rev 169011)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2014-05-18 Antti Koivisto <antti@apple.com>
+
+ REGRESSION (r160259): text-combine glyphs are not rendered
+ https://bugs.webkit.org/show_bug.cgi?id=127324
+
+ Reviewed by Andreas Kling.
+
+ * fast/text/text-combine-rendering-expected.html: Added.
+ * fast/text/text-combine-rendering.html: Added.
+
</ins><span class="cx"> 2014-05-17 Maciej Stachowiak <mjs@apple.com>
</span><span class="cx">
</span><span class="cx"> Don't attempt to update id or name for nodes that are already removed
</span></span></pre></div>
<a id="trunkLayoutTestsfasttexttextcombinerenderingexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/text/text-combine-rendering-expected.html (0 => 169011)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/text/text-combine-rendering-expected.html         (rev 0)
+++ trunk/LayoutTests/fast/text/text-combine-rendering-expected.html        2014-05-18 10:51:53 UTC (rev 169011)
</span><span class="lines">@@ -0,0 +1,5 @@
</span><ins>+<link rel="stylesheet" href="../css/resources/ahem.css" />
+<style>
+body { font-family: myahem; color: green}
+</style>
+x
</ins></span></pre></div>
<a id="trunkLayoutTestsfasttexttextcombinerenderinghtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/text/text-combine-rendering.html (0 => 169011)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/text/text-combine-rendering.html         (rev 0)
+++ trunk/LayoutTests/fast/text/text-combine-rendering.html        2014-05-18 10:51:53 UTC (rev 169011)
</span><span class="lines">@@ -0,0 +1,6 @@
</span><ins>+<link rel="stylesheet" href="../css/resources/ahem.css" />
+<style>
+body { -webkit-writing-mode: vertical-lr; font-family: myahem; color: green }
+.combine { -webkit-text-combine: horizontal }
+</style>
+<span class="combine">x</span>
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (169010 => 169011)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-05-18 07:57:27 UTC (rev 169010)
+++ trunk/Source/WebCore/ChangeLog        2014-05-18 10:51:53 UTC (rev 169011)
</span><span class="lines">@@ -1,3 +1,43 @@
</span><ins>+2014-05-18 Antti Koivisto <antti@apple.com>
+
+ REGRESSION (r160259): text-combine glyphs are not rendered
+ https://bugs.webkit.org/show_bug.cgi?id=127324
+
+ Reviewed by Andreas Kling.
+
+ The original text gets overwritten by a change that is supposed to affect rendered text only.
+ Fixed by giving the text update functions well-defined purposes.
+
+ Test: fast/text/text-combine-rendering.html
+
+ * rendering/RenderCombineText.cpp:
+ (WebCore::RenderCombineText::styleDidChange):
+ (WebCore::RenderCombineText::setRenderedText):
+ (WebCore::RenderCombineText::combineText):
+ (WebCore::RenderCombineText::setTextInternal): Deleted.
+ * rendering/RenderCombineText.h:
+ * rendering/RenderCounter.cpp:
+ (WebCore::RenderCounter::computePreferredLogicalWidths):
+ * rendering/RenderText.cpp:
+ (WebCore::RenderText::setRenderedText):
+
+ This function now updates the rendered text but does not change the original.
+ Get the original text by calling originalText().
+
+ (WebCore::RenderText::setText):
+
+ This the only place original text now changes.
+
+ (WebCore::RenderText::setTextInternal): Deleted.
+
+ Renamed to setRenderedText.
+
+ * rendering/RenderText.h:
+ * rendering/svg/RenderSVGInlineText.cpp:
+ (WebCore::RenderSVGInlineText::setRenderedText):
+ (WebCore::RenderSVGInlineText::setTextInternal): Deleted.
+ * rendering/svg/RenderSVGInlineText.h:
+
</ins><span class="cx"> 2014-05-17 Maciej Stachowiak <mjs@apple.com>
</span><span class="cx">
</span><span class="cx"> Don't attempt to update id or name for nodes that are already removed
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderCombineTextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderCombineText.cpp (169010 => 169011)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderCombineText.cpp        2014-05-18 07:57:27 UTC (rev 169010)
+++ trunk/Source/WebCore/rendering/RenderCombineText.cpp        2014-05-18 10:51:53 UTC (rev 169011)
</span><span class="lines">@@ -44,16 +44,16 @@
</span><span class="cx"> RenderText::styleDidChange(diff, oldStyle);
</span><span class="cx">
</span><span class="cx"> if (m_isCombined) {
</span><del>- RenderText::setTextInternal(originalText()); // This RenderCombineText has been combined once. Restore the original text for the next combineText().
</del><ins>+ RenderText::setRenderedText(originalText()); // This RenderCombineText has been combined once. Restore the original text for the next combineText().
</ins><span class="cx"> m_isCombined = false;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> m_needsFontUpdate = true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void RenderCombineText::setTextInternal(const String& text)
</del><ins>+void RenderCombineText::setRenderedText(const String& text)
</ins><span class="cx"> {
</span><del>- RenderText::setTextInternal(text);
</del><ins>+ RenderText::setRenderedText(text);
</ins><span class="cx">
</span><span class="cx"> m_needsFontUpdate = true;
</span><span class="cx"> }
</span><span class="lines">@@ -137,7 +137,7 @@
</span><span class="cx">
</span><span class="cx"> if (m_isCombined) {
</span><span class="cx"> DEPRECATED_DEFINE_STATIC_LOCAL(String, objectReplacementCharacterString, (&objectReplacementCharacter, 1));
</span><del>- RenderText::setTextInternal(objectReplacementCharacterString.impl());
</del><ins>+ RenderText::setRenderedText(objectReplacementCharacterString.impl());
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderCombineTexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderCombineText.h (169010 => 169011)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderCombineText.h        2014-05-18 07:57:27 UTC (rev 169010)
+++ trunk/Source/WebCore/rendering/RenderCombineText.h        2014-05-18 10:51:53 UTC (rev 169011)
</span><span class="lines">@@ -49,7 +49,7 @@
</span><span class="cx"> virtual float width(unsigned from, unsigned length, const Font&, float xPosition, HashSet<const SimpleFontData*>* fallbackFonts = 0, GlyphOverflow* = 0) const;
</span><span class="cx"> virtual const char* renderName() const { return "RenderCombineText"; }
</span><span class="cx"> virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle);
</span><del>- virtual void setTextInternal(const String&) override;
</del><ins>+ virtual void setRenderedText(const String&) override;
</ins><span class="cx">
</span><span class="cx"> RefPtr<RenderStyle> m_combineFontStyle;
</span><span class="cx"> float m_combinedTextWidth;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderCountercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderCounter.cpp (169010 => 169011)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderCounter.cpp        2014-05-18 07:57:27 UTC (rev 169010)
+++ trunk/Source/WebCore/rendering/RenderCounter.cpp        2014-05-18 10:51:53 UTC (rev 169011)
</span><span class="lines">@@ -436,7 +436,7 @@
</span><span class="cx"> SetLayoutNeededForbiddenScope layoutForbiddenScope(this, false);
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>- setTextInternal(originalText());
</del><ins>+ setRenderedText(originalText());
</ins><span class="cx">
</span><span class="cx"> RenderText::computePreferredLogicalWidths(lead);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderTextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderText.cpp (169010 => 169011)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderText.cpp        2014-05-18 07:57:27 UTC (rev 169010)
+++ trunk/Source/WebCore/rendering/RenderText.cpp        2014-05-18 10:51:53 UTC (rev 169011)
</span><span class="lines">@@ -1017,15 +1017,11 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void RenderText::setTextInternal(const String& text)
</del><ins>+void RenderText::setRenderedText(const String& text)
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(!text.isNull());
</span><span class="cx">
</span><del>- if (m_originalTextDiffersFromRendered) {
- originalTextMap().remove(this);
- m_originalTextDiffersFromRendered = false;
- }
- String originalText = text;
</del><ins>+ String originalText = this->originalText();
</ins><span class="cx">
</span><span class="cx"> m_text = text;
</span><span class="cx">
</span><span class="lines">@@ -1069,8 +1065,11 @@
</span><span class="cx"> m_canUseSimpleFontCodePath = computeCanUseSimpleFontCodePath();
</span><span class="cx">
</span><span class="cx"> if (m_text != originalText) {
</span><del>- originalTextMap().add(this, originalText);
</del><ins>+ originalTextMap().set(this, originalText);
</ins><span class="cx"> m_originalTextDiffersFromRendered = true;
</span><ins>+ } else if (m_originalTextDiffersFromRendered) {
+ originalTextMap().remove(this);
+ m_originalTextDiffersFromRendered = false;
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1103,7 +1102,14 @@
</span><span class="cx"> if (!force && text == originalText())
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- setTextInternal(text);
</del><ins>+ m_text = text;
+ if (m_originalTextDiffersFromRendered) {
+ originalTextMap().remove(this);
+ m_originalTextDiffersFromRendered = false;
+ }
+
+ setRenderedText(text);
+
</ins><span class="cx"> setNeedsLayoutAndPrefWidthsRecalc();
</span><span class="cx"> m_knownToHaveNoOverflowAndNoFallbackFonts = false;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderTexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderText.h (169010 => 169011)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderText.h        2014-05-18 07:57:27 UTC (rev 169010)
+++ trunk/Source/WebCore/rendering/RenderText.h        2014-05-18 10:51:53 UTC (rev 169011)
</span><span class="lines">@@ -158,7 +158,7 @@
</span><span class="cx"> virtual void computePreferredLogicalWidths(float leadWidth);
</span><span class="cx"> virtual void willBeDestroyed() override;
</span><span class="cx">
</span><del>- virtual void setTextInternal(const String&);
</del><ins>+ virtual void setRenderedText(const String&);
</ins><span class="cx"> virtual UChar previousCharacter() const;
</span><span class="cx">
</span><span class="cx"> private:
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGInlineTextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGInlineText.cpp (169010 => 169011)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGInlineText.cpp        2014-05-18 07:57:27 UTC (rev 169010)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGInlineText.cpp        2014-05-18 10:51:53 UTC (rev 169011)
</span><span class="lines">@@ -77,9 +77,9 @@
</span><span class="cx"> return textNode().data();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void RenderSVGInlineText::setTextInternal(const String& text)
</del><ins>+void RenderSVGInlineText::setRenderedText(const String& text)
</ins><span class="cx"> {
</span><del>- RenderText::setTextInternal(text);
</del><ins>+ RenderText::setRenderedText(text);
</ins><span class="cx"> if (auto* textAncestor = RenderSVGText::locateRenderSVGTextAncestor(*this))
</span><span class="cx"> textAncestor->subtreeTextDidChange(this);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGInlineTexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGInlineText.h (169010 => 169011)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGInlineText.h        2014-05-18 07:57:27 UTC (rev 169010)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGInlineText.h        2014-05-18 10:51:53 UTC (rev 169011)
</span><span class="lines">@@ -52,7 +52,7 @@
</span><span class="cx"> virtual const char* renderName() const override { return "RenderSVGInlineText"; }
</span><span class="cx">
</span><span class="cx"> virtual String originalText() const override;
</span><del>- virtual void setTextInternal(const String&) override;
</del><ins>+ virtual void setRenderedText(const String&) override;
</ins><span class="cx"> virtual void styleDidChange(StyleDifference, const RenderStyle*) override;
</span><span class="cx">
</span><span class="cx"> virtual FloatRect objectBoundingBox() const override { return floatLinesBoundingBox(); }
</span></span></pre>
</div>
</div>
</body>
</html>