<!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>[189829] trunk/Source/WebCore</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/189829">189829</a></dd>
<dt>Author</dt> <dd>mmaxfield@apple.com</dd>
<dt>Date</dt> <dd>2015-09-15 17:05:58 -0700 (Tue, 15 Sep 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>GraphicsContext::drawBidiText()'s BidiResolver should not have isolated runs
https://bugs.webkit.org/show_bug.cgi?id=149193

Reviewed by Anders Carlsson.

There are two users of BidiResolver, one which needs isolated runs (in RenderBlockLineLayout) and
one which doesn't (in GraphicsContext::drawBidiText()). Because of [1], the isolated runs vector
is migrating to a new type outside of platform/. Therefore, only the first user of BidiResolver
should have this member variable.

This is achieved by creating two subclasses of BidiResolver, and using the Curiously Repeating
Template pattern to downcast into specializations.

[1] https://bugs.webkit.org/show_bug.cgi?id=149153

No new tests because there is no behavior change.

* platform/text/BidiResolver.h:
(WebCore::BidiResolverBase::BidiResolverBase):
(WebCore::BidiResolverBase::increment):
(WebCore::BidiResolverBase::appendRun):
(WebCore::BidiResolverBase::incrementInternal):
(WebCore::IsolateRun&gt;::~BidiResolverWithIsolate):
(WebCore::Subclass&gt;::appendRunInternal):
(WebCore::Subclass&gt;::embed):
(WebCore::Subclass&gt;::checkDirectionInLowerRaiseEmbeddingLevel):
(WebCore::Subclass&gt;::lowerExplicitEmbeddingLevel):
(WebCore::Subclass&gt;::raiseExplicitEmbeddingLevel):
(WebCore::Subclass&gt;::commitExplicitEmbedding):
(WebCore::Subclass&gt;::updateStatusLastFromCurrentDirection):
(WebCore::Subclass&gt;::reorderRunsFromLevels):
(WebCore::Subclass&gt;::createBidiRunsForLine):
(WebCore::Subclass&gt;::setMidpointForIsolatedRun):
(WebCore::Subclass&gt;::midpointForIsolatedRun):
(WebCore::BidiResolver::BidiResolver): Deleted.
(WebCore::BidiResolver::increment): Deleted.
(WebCore::BidiResolver::isolatedRuns): Deleted.
(WebCore::Run&gt;::~BidiResolver): Deleted.
(WebCore::Run&gt;::appendRun): Deleted.
(WebCore::Run&gt;::embed): Deleted.
(WebCore::Run&gt;::checkDirectionInLowerRaiseEmbeddingLevel): Deleted.
(WebCore::Run&gt;::lowerExplicitEmbeddingLevel): Deleted.
(WebCore::Run&gt;::raiseExplicitEmbeddingLevel): Deleted.
(WebCore::Run&gt;::commitExplicitEmbedding): Deleted.
(WebCore::Run&gt;::updateStatusLastFromCurrentDirection): Deleted.
(WebCore::Run&gt;::reorderRunsFromLevels): Deleted.
(WebCore::Run&gt;::createBidiRunsForLine): Deleted.
(WebCore::Run&gt;::setMidpointForIsolatedRun): Deleted.
(WebCore::Run&gt;::midpointForIsolatedRun): Deleted.
* rendering/InlineIterator.h:
(WebCore::InlineBidiResolver::incrementInternal):
(WebCore::InlineBidiResolver::appendRunInternal):
(WebCore::InlineBidiResolver::increment): Deleted.
(WebCore::InlineBidiResolver::appendRun): Deleted.
* rendering/line/TrailingObjects.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreplatformtextBidiResolverh">trunk/Source/WebCore/platform/text/BidiResolver.h</a></li>
<li><a href="#trunkSourceWebCorerenderingInlineIteratorh">trunk/Source/WebCore/rendering/InlineIterator.h</a></li>
<li><a href="#trunkSourceWebCorerenderinglineTrailingObjectsh">trunk/Source/WebCore/rendering/line/TrailingObjects.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (189828 => 189829)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-09-15 23:44:30 UTC (rev 189828)
+++ trunk/Source/WebCore/ChangeLog        2015-09-16 00:05:58 UTC (rev 189829)
</span><span class="lines">@@ -1,3 +1,61 @@
</span><ins>+2015-09-15  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
+
+        GraphicsContext::drawBidiText()'s BidiResolver should not have isolated runs
+        https://bugs.webkit.org/show_bug.cgi?id=149193
+
+        Reviewed by Anders Carlsson.
+
+        There are two users of BidiResolver, one which needs isolated runs (in RenderBlockLineLayout) and
+        one which doesn't (in GraphicsContext::drawBidiText()). Because of [1], the isolated runs vector
+        is migrating to a new type outside of platform/. Therefore, only the first user of BidiResolver
+        should have this member variable.
+
+        This is achieved by creating two subclasses of BidiResolver, and using the Curiously Repeating
+        Template pattern to downcast into specializations.
+
+        [1] https://bugs.webkit.org/show_bug.cgi?id=149153
+
+        No new tests because there is no behavior change.
+
+        * platform/text/BidiResolver.h:
+        (WebCore::BidiResolverBase::BidiResolverBase):
+        (WebCore::BidiResolverBase::increment):
+        (WebCore::BidiResolverBase::appendRun):
+        (WebCore::BidiResolverBase::incrementInternal):
+        (WebCore::IsolateRun&gt;::~BidiResolverWithIsolate):
+        (WebCore::Subclass&gt;::appendRunInternal):
+        (WebCore::Subclass&gt;::embed):
+        (WebCore::Subclass&gt;::checkDirectionInLowerRaiseEmbeddingLevel):
+        (WebCore::Subclass&gt;::lowerExplicitEmbeddingLevel):
+        (WebCore::Subclass&gt;::raiseExplicitEmbeddingLevel):
+        (WebCore::Subclass&gt;::commitExplicitEmbedding):
+        (WebCore::Subclass&gt;::updateStatusLastFromCurrentDirection):
+        (WebCore::Subclass&gt;::reorderRunsFromLevels):
+        (WebCore::Subclass&gt;::createBidiRunsForLine):
+        (WebCore::Subclass&gt;::setMidpointForIsolatedRun):
+        (WebCore::Subclass&gt;::midpointForIsolatedRun):
+        (WebCore::BidiResolver::BidiResolver): Deleted.
+        (WebCore::BidiResolver::increment): Deleted.
+        (WebCore::BidiResolver::isolatedRuns): Deleted.
+        (WebCore::Run&gt;::~BidiResolver): Deleted.
+        (WebCore::Run&gt;::appendRun): Deleted.
+        (WebCore::Run&gt;::embed): Deleted.
+        (WebCore::Run&gt;::checkDirectionInLowerRaiseEmbeddingLevel): Deleted.
+        (WebCore::Run&gt;::lowerExplicitEmbeddingLevel): Deleted.
+        (WebCore::Run&gt;::raiseExplicitEmbeddingLevel): Deleted.
+        (WebCore::Run&gt;::commitExplicitEmbedding): Deleted.
+        (WebCore::Run&gt;::updateStatusLastFromCurrentDirection): Deleted.
+        (WebCore::Run&gt;::reorderRunsFromLevels): Deleted.
+        (WebCore::Run&gt;::createBidiRunsForLine): Deleted.
+        (WebCore::Run&gt;::setMidpointForIsolatedRun): Deleted.
+        (WebCore::Run&gt;::midpointForIsolatedRun): Deleted.
+        * rendering/InlineIterator.h:
+        (WebCore::InlineBidiResolver::incrementInternal):
+        (WebCore::InlineBidiResolver::appendRunInternal):
+        (WebCore::InlineBidiResolver::increment): Deleted.
+        (WebCore::InlineBidiResolver::appendRun): Deleted.
+        * rendering/line/TrailingObjects.h:
+
</ins><span class="cx"> 2015-09-15  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         new Event() without parameter should throw
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformtextBidiResolverh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/text/BidiResolver.h (189828 => 189829)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/text/BidiResolver.h        2015-09-15 23:44:30 UTC (rev 189828)
+++ trunk/Source/WebCore/platform/text/BidiResolver.h        2015-09-16 00:05:58 UTC (rev 189829)
</span><span class="lines">@@ -203,10 +203,10 @@
</span><span class="cx"> 
</span><span class="cx"> // BidiResolver is WebKit's implementation of the Unicode Bidi Algorithm
</span><span class="cx"> // http://unicode.org/reports/tr9
</span><del>-template &lt;class Iterator, class Run&gt; class BidiResolver {
-    WTF_MAKE_NONCOPYABLE(BidiResolver);
</del><ins>+template &lt;class Iterator, class Run, class Subclass&gt; class BidiResolverBase {
+    WTF_MAKE_NONCOPYABLE(BidiResolverBase);
</ins><span class="cx"> public:
</span><del>-    BidiResolver()
</del><ins>+    BidiResolverBase()
</ins><span class="cx">         : m_direction(U_OTHER_NEUTRAL)
</span><span class="cx">         , m_reachedEndOfLine(false)
</span><span class="cx">         , m_emptyRun(true)
</span><span class="lines">@@ -214,10 +214,6 @@
</span><span class="cx">     {
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-#ifndef NDEBUG
-    ~BidiResolver();
-#endif
-
</del><span class="cx">     const Iterator&amp; position() const { return m_current; }
</span><span class="cx">     void setPositionIgnoringNestedIsolates(const Iterator&amp; position) { m_current = position; }
</span><span class="cx">     void setPosition(const Iterator&amp; position, unsigned nestedIsolatedCount)
</span><span class="lines">@@ -226,7 +222,7 @@
</span><span class="cx">         m_nestedIsolateCount = nestedIsolatedCount;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    void increment() { m_current.increment(); }
</del><ins>+    void increment() { static_cast&lt;Subclass*&gt;(this)-&gt;incrementInternal(); }
</ins><span class="cx"> 
</span><span class="cx">     BidiContext* context() const { return m_status.context.get(); }
</span><span class="cx">     void setContext(PassRefPtr&lt;BidiContext&gt; c) { m_status.context = c; }
</span><span class="lines">@@ -261,14 +257,13 @@
</span><span class="cx">     // It's unclear if this is still needed.
</span><span class="cx">     void markCurrentRunEmpty() { m_emptyRun = true; }
</span><span class="cx"> 
</span><del>-    Vector&lt;Run*&gt;&amp; isolatedRuns() { return m_isolatedRuns; }
</del><span class="cx">     void setMidpointForIsolatedRun(Run*, unsigned);
</span><span class="cx">     unsigned midpointForIsolatedRun(Run*);
</span><span class="cx"> 
</span><span class="cx"> protected:
</span><span class="cx">     // FIXME: Instead of InlineBidiResolvers subclassing this method, we should
</span><span class="cx">     // pass in some sort of Traits object which knows how to create runs for appending.
</span><del>-    void appendRun();
</del><ins>+    void appendRun() { static_cast&lt;Subclass*&gt;(this)-&gt;appendRunInternal(); }
</ins><span class="cx"> 
</span><span class="cx">     Iterator m_current;
</span><span class="cx">     // sor and eor are &quot;start of run&quot; and &quot;end of run&quot; respectively and correpond
</span><span class="lines">@@ -290,7 +285,6 @@
</span><span class="cx">     MidpointState&lt;Iterator&gt; m_midpointState;
</span><span class="cx"> 
</span><span class="cx">     unsigned m_nestedIsolateCount;
</span><del>-    Vector&lt;Run*&gt; m_isolatedRuns;
</del><span class="cx">     HashMap&lt;Run*, unsigned&gt; m_midpointForIsolatedRun;
</span><span class="cx"> 
</span><span class="cx"> private:
</span><span class="lines">@@ -300,21 +294,42 @@
</span><span class="cx"> 
</span><span class="cx">     void updateStatusLastFromCurrentDirection(UCharDirection);
</span><span class="cx">     void reorderRunsFromLevels();
</span><ins>+    void incrementInternal() { m_current.increment(); }
+    void appendRunInternal();
</ins><span class="cx"> 
</span><span class="cx">     Vector&lt;BidiEmbedding, 8&gt; m_currentExplicitEmbeddingSequence;
</span><span class="cx"> };
</span><span class="cx"> 
</span><ins>+template &lt;class Iterator, class Run&gt;
+class BidiResolver : public BidiResolverBase&lt;Iterator, Run, BidiResolver&lt;Iterator, Run&gt;&gt; {
+};
+
+template &lt;class Iterator, class Run, class IsolateRun&gt;
+class BidiResolverWithIsolate : public BidiResolverBase&lt;Iterator, Run, BidiResolverWithIsolate&lt;Iterator, Run, IsolateRun&gt;&gt; {
+public:
</ins><span class="cx"> #ifndef NDEBUG
</span><del>-template &lt;class Iterator, class Run&gt;
-BidiResolver&lt;Iterator, Run&gt;::~BidiResolver()
</del><ins>+    ~BidiResolverWithIsolate();
+#endif
+
+    void incrementInternal();
+    void appendRunInternal();
+    Vector&lt;Run*&gt;&amp; isolatedRuns() { return m_isolatedRuns; }
+
+private:
+    Vector&lt;Run*&gt; m_isolatedRuns;
+};
+
+#ifndef NDEBUG
+template &lt;class Iterator, class Run, class IsolateRun&gt;
+BidiResolverWithIsolate&lt;Iterator, Run, IsolateRun&gt;::~BidiResolverWithIsolate()
</ins><span class="cx"> {
</span><span class="cx">     // The owner of this resolver should have handled the isolated runs.
</span><span class="cx">     ASSERT(m_isolatedRuns.isEmpty());
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-template &lt;class Iterator, class Run&gt;
-void BidiResolver&lt;Iterator, Run&gt;::appendRun()
</del><ins>+template &lt;class Iterator, class Run, class Subclass&gt;
+void BidiResolverBase&lt;Iterator, Run, Subclass&gt;::appendRunInternal()
</ins><span class="cx"> {
</span><span class="cx">     if (!m_emptyRun &amp;&amp; !m_eor.atEnd()) {
</span><span class="cx">         unsigned startOffset = m_sor.offset();
</span><span class="lines">@@ -336,8 +351,8 @@
</span><span class="cx">     m_status.eor = U_OTHER_NEUTRAL;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-template &lt;class Iterator, class Run&gt;
-void BidiResolver&lt;Iterator, Run&gt;::embed(UCharDirection dir, BidiEmbeddingSource source)
</del><ins>+template &lt;class Iterator, class Run, class Subclass&gt;
+void BidiResolverBase&lt;Iterator, Run, Subclass&gt;::embed(UCharDirection dir, BidiEmbeddingSource source)
</ins><span class="cx"> {
</span><span class="cx">     // Isolated spans compute base directionality during their own UBA run.
</span><span class="cx">     // Do not insert fake embed characters once we enter an isolated span.
</span><span class="lines">@@ -347,8 +362,8 @@
</span><span class="cx">     m_currentExplicitEmbeddingSequence.append(BidiEmbedding(dir, source));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-template &lt;class Iterator, class Run&gt;
-void BidiResolver&lt;Iterator, Run&gt;::checkDirectionInLowerRaiseEmbeddingLevel()
</del><ins>+template &lt;class Iterator, class Run, class Subclass&gt;
+void BidiResolverBase&lt;Iterator, Run, Subclass&gt;::checkDirectionInLowerRaiseEmbeddingLevel()
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(m_status.eor != U_OTHER_NEUTRAL || m_eor.atEnd());
</span><span class="cx">     ASSERT(m_status.last != U_DIR_NON_SPACING_MARK
</span><span class="lines">@@ -362,8 +377,8 @@
</span><span class="cx">         m_direction = m_status.lastStrong == U_LEFT_TO_RIGHT ? U_LEFT_TO_RIGHT : U_RIGHT_TO_LEFT;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-template &lt;class Iterator, class Run&gt;
-void BidiResolver&lt;Iterator, Run&gt;::lowerExplicitEmbeddingLevel(UCharDirection from)
</del><ins>+template &lt;class Iterator, class Run, class Subclass&gt;
+void BidiResolverBase&lt;Iterator, Run, Subclass&gt;::lowerExplicitEmbeddingLevel(UCharDirection from)
</ins><span class="cx"> {
</span><span class="cx">     if (!m_emptyRun &amp;&amp; m_eor != m_last) {
</span><span class="cx">         checkDirectionInLowerRaiseEmbeddingLevel();
</span><span class="lines">@@ -398,8 +413,8 @@
</span><span class="cx">     m_eor = Iterator();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-template &lt;class Iterator, class Run&gt;
-void BidiResolver&lt;Iterator, Run&gt;::raiseExplicitEmbeddingLevel(UCharDirection from, UCharDirection to)
</del><ins>+template &lt;class Iterator, class Run, class Subclass&gt;
+void BidiResolverBase&lt;Iterator, Run, Subclass&gt;::raiseExplicitEmbeddingLevel(UCharDirection from, UCharDirection to)
</ins><span class="cx"> {
</span><span class="cx">     if (!m_emptyRun &amp;&amp; m_eor != m_last) {
</span><span class="cx">         checkDirectionInLowerRaiseEmbeddingLevel();
</span><span class="lines">@@ -435,8 +450,8 @@
</span><span class="cx">     m_eor = Iterator();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-template &lt;class Iterator, class Run&gt;
-bool BidiResolver&lt;Iterator, Run&gt;::commitExplicitEmbedding()
</del><ins>+template &lt;class Iterator, class Run, class Subclass&gt;
+bool BidiResolverBase&lt;Iterator, Run, Subclass&gt;::commitExplicitEmbedding()
</ins><span class="cx"> {
</span><span class="cx">     // When we're &quot;inIsolate()&quot; we're resolving the parent context which
</span><span class="cx">     // ignores (skips over) the isolated content, including embedding levels.
</span><span class="lines">@@ -478,8 +493,8 @@
</span><span class="cx">     return fromLevel != toLevel;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-template &lt;class Iterator, class Run&gt;
-inline void BidiResolver&lt;Iterator, Run&gt;::updateStatusLastFromCurrentDirection(UCharDirection dirCurrent)
</del><ins>+template &lt;class Iterator, class Run, class Subclass&gt;
+inline void BidiResolverBase&lt;Iterator, Run, Subclass&gt;::updateStatusLastFromCurrentDirection(UCharDirection dirCurrent)
</ins><span class="cx"> {
</span><span class="cx">     switch (dirCurrent) {
</span><span class="cx">     case U_EUROPEAN_NUMBER_TERMINATOR:
</span><span class="lines">@@ -519,8 +534,8 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-template &lt;class Iterator, class Run&gt;
-inline void BidiResolver&lt;Iterator, Run&gt;::reorderRunsFromLevels()
</del><ins>+template &lt;class Iterator, class Run, class Subclass&gt;
+inline void BidiResolverBase&lt;Iterator, Run, Subclass&gt;::reorderRunsFromLevels()
</ins><span class="cx"> {
</span><span class="cx">     unsigned char levelLow = 128;
</span><span class="cx">     unsigned char levelHigh = 0;
</span><span class="lines">@@ -556,8 +571,8 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-template &lt;class Iterator, class Run&gt;
-void BidiResolver&lt;Iterator, Run&gt;::createBidiRunsForLine(const Iterator&amp; end, VisualDirectionOverride override, bool hardLineBreak)
</del><ins>+template &lt;class Iterator, class Run, class Subclass&gt;
+void BidiResolverBase&lt;Iterator, Run, Subclass&gt;::createBidiRunsForLine(const Iterator&amp; end, VisualDirectionOverride override, bool hardLineBreak)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(m_direction == U_OTHER_NEUTRAL);
</span><span class="cx"> 
</span><span class="lines">@@ -583,7 +598,7 @@
</span><span class="cx"> 
</span><span class="cx">     m_last = m_current;
</span><span class="cx">     bool pastEnd = false;
</span><del>-    BidiResolver&lt;Iterator, Run&gt; stateAtEnd;
</del><ins>+    BidiResolverBase&lt;Iterator, Run, Subclass&gt; stateAtEnd;
</ins><span class="cx"> 
</span><span class="cx">     while (true) {
</span><span class="cx">         UCharDirection dirCurrent;
</span><span class="lines">@@ -956,15 +971,15 @@
</span><span class="cx">     endOfLine = Iterator();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-template &lt;class Iterator, class Run&gt;
-void BidiResolver&lt;Iterator, Run&gt;::setMidpointForIsolatedRun(Run* run, unsigned midpoint)
</del><ins>+template &lt;class Iterator, class Run, class Subclass&gt;
+void BidiResolverBase&lt;Iterator, Run, Subclass&gt;::setMidpointForIsolatedRun(Run* run, unsigned midpoint)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(!m_midpointForIsolatedRun.contains(run));
</span><span class="cx">     m_midpointForIsolatedRun.add(run, midpoint);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-template&lt;class Iterator, class Run&gt;
-unsigned BidiResolver&lt;Iterator, Run&gt;::midpointForIsolatedRun(Run* run)
</del><ins>+template&lt;class Iterator, class Run, class Subclass&gt;
+unsigned BidiResolverBase&lt;Iterator, Run, Subclass&gt;::midpointForIsolatedRun(Run* run)
</ins><span class="cx"> {
</span><span class="cx">     return m_midpointForIsolatedRun.take(run);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingInlineIteratorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/InlineIterator.h (189828 => 189829)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/InlineIterator.h        2015-09-15 23:44:30 UTC (rev 189828)
+++ trunk/Source/WebCore/rendering/InlineIterator.h        2015-09-16 00:05:58 UTC (rev 189829)
</span><span class="lines">@@ -442,7 +442,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> template&lt;&gt;
</span><del>-inline void InlineBidiResolver::increment()
</del><ins>+inline void InlineBidiResolver::incrementInternal()
</ins><span class="cx"> {
</span><span class="cx">     m_current.increment(this);
</span><span class="cx"> }
</span><span class="lines">@@ -529,8 +529,8 @@
</span><span class="cx">     bool m_haveAddedFakeRunForRootIsolate;
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-template &lt;&gt;
-inline void InlineBidiResolver::appendRun()
</del><ins>+template&lt;&gt;
+inline void InlineBidiResolver::appendRunInternal()
</ins><span class="cx"> {
</span><span class="cx">     if (!m_emptyRun &amp;&amp; !m_eor.atEnd() &amp;&amp; !m_reachedEndOfLine) {
</span><span class="cx">         // Keep track of when we enter/leave &quot;unicode-bidi: isolate&quot; inlines.
</span></span></pre></div>
<a id="trunkSourceWebCorerenderinglineTrailingObjectsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/line/TrailingObjects.h (189828 => 189829)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/line/TrailingObjects.h        2015-09-15 23:44:30 UTC (rev 189828)
+++ trunk/Source/WebCore/rendering/line/TrailingObjects.h        2015-09-16 00:05:58 UTC (rev 189829)
</span><span class="lines">@@ -36,8 +36,9 @@
</span><span class="cx"> struct BidiRun;
</span><span class="cx"> 
</span><span class="cx"> template &lt;class Iterator, class Run&gt; class BidiResolver;
</span><ins>+template &lt;class Iterator, class Run, class IsolateRun&gt; class BidiResolverWithIsolate;
</ins><span class="cx"> template &lt;class Iterator&gt; class MidpointState;
</span><del>-typedef BidiResolver&lt;InlineIterator, BidiRun&gt; InlineBidiResolver;
</del><ins>+typedef BidiResolverWithIsolate&lt;InlineIterator, BidiRun, BidiRun&gt; InlineBidiResolver;
</ins><span class="cx"> typedef MidpointState&lt;InlineIterator&gt; LineMidpointState;
</span><span class="cx"> 
</span><span class="cx"> class TrailingObjects {
</span></span></pre>
</div>
</div>

</body>
</html>