<!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>[165381] branches/safari-537.75-branch</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/165381">165381</a></dd>
<dt>Author</dt> <dd>matthew_hanson@apple.com</dd>
<dt>Date</dt> <dd>2014-03-10 10:49:38 -0700 (Mon, 10 Mar 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Merge <a href="http://trac.webkit.org/projects/webkit/changeset/162972">r162972</a> and <a href="http://trac.webkit.org/projects/webkit/changeset/163007">r163007</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari53775branchLayoutTestsplatformmacfastcssgeneratedcontent005expectedtxt">branches/safari-537.75-branch/LayoutTests/platform/mac/fast/css-generated-content/005-expected.txt</a></li>
<li><a href="#branchessafari53775branchLayoutTestsplatformmacfastcssgeneratedcontentbeforeAfterinterdocumentexpectedtxt">branches/safari-537.75-branch/LayoutTests/platform/mac/fast/css-generated-content/beforeAfter-interdocument-expected.txt</a></li>
<li><a href="#branchessafari53775branchLayoutTestsplatformmacfastcssgeneratedcontentnestedtableswithbeforeaftercontentcrashexpectedtxt">branches/safari-537.75-branch/LayoutTests/platform/mac/fast/css-generated-content/nested-tables-with-before-after-content-crash-expected.txt</a></li>
<li><a href="#branchessafari53775branchLayoutTestsplatformmacfastcssgeneratedcontentnoopenclosequoteexpectedtxt">branches/safari-537.75-branch/LayoutTests/platform/mac/fast/css-generated-content/no-openclose-quote-expected.txt</a></li>
<li><a href="#branchessafari53775branchLayoutTestsplatformmacfasttablequotetextaroundiframeexpectedtxt">branches/safari-537.75-branch/LayoutTests/platform/mac/fast/table/quote-text-around-iframe-expected.txt</a></li>
<li><a href="#branchessafari53775branchSourceWebCoreChangeLog">branches/safari-537.75-branch/Source/WebCore/ChangeLog</a></li>
<li><a href="#branchessafari53775branchSourceWebCoredomPseudoElementcpp">branches/safari-537.75-branch/Source/WebCore/dom/PseudoElement.cpp</a></li>
<li><a href="#branchessafari53775branchSourceWebCorerenderingRenderObjectcpp">branches/safari-537.75-branch/Source/WebCore/rendering/RenderObject.cpp</a></li>
<li><a href="#branchessafari53775branchSourceWebCorerenderingRenderQuotecpp">branches/safari-537.75-branch/Source/WebCore/rendering/RenderQuote.cpp</a></li>
<li><a href="#branchessafari53775branchSourceWebCorerenderingRenderQuoteh">branches/safari-537.75-branch/Source/WebCore/rendering/RenderQuote.h</a></li>
<li><a href="#branchessafari53775branchSourceWebCorerenderingstyleRenderStylecpp">branches/safari-537.75-branch/Source/WebCore/rendering/style/RenderStyle.cpp</a></li>
<li><a href="#branchessafari53775branchSourceWebCorerenderingstyleRenderStyleh">branches/safari-537.75-branch/Source/WebCore/rendering/style/RenderStyle.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari53775branchLayoutTestsplatformmacfastcssgeneratedcontent005expectedtxt"></a>
<div class="modfile"><h4>Modified: branches/safari-537.75-branch/LayoutTests/platform/mac/fast/css-generated-content/005-expected.txt (165380 => 165381)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.75-branch/LayoutTests/platform/mac/fast/css-generated-content/005-expected.txt        2014-03-10 17:42:25 UTC (rev 165380)
+++ branches/safari-537.75-branch/LayoutTests/platform/mac/fast/css-generated-content/005-expected.txt        2014-03-10 17:49:38 UTC (rev 165381)
</span><span class="lines">@@ -7,7 +7,8 @@
</span><span class="cx">         RenderInline {Q} at (0,0) size 158x18
</span><span class="cx">           RenderInline (generated) at (0,0) size 7x18
</span><span class="cx">             RenderQuote at (0,0) size 7x18
</span><del>-              text run at (0,0) width 7: &quot;\&quot;&quot;
</del><ins>+              RenderText at (0,0) size 7x18
+                text run at (0,0) width 7: &quot;\&quot;&quot;
</ins><span class="cx">           RenderText {#text} at (7,0) size 151x18
</span><span class="cx">             text run at (7,0) width 151: &quot;Quotes should surround&quot;
</span><span class="cx">       RenderBlock (anonymous) at (0,34) size 784x0
</span><span class="lines">@@ -17,6 +18,7 @@
</span><span class="cx">           RenderText {#text} at (0,0) size 53x18
</span><span class="cx">             text run at (0,0) width 53: &quot;this text.&quot;
</span><span class="cx">           RenderInline (generated) at (0,0) size 7x18
</span><del>-            RenderQuote at (53,0) size 7x18
-              text run at (53,0) width 7: &quot;\&quot;&quot;
</del><ins>+            RenderQuote at (0,0) size 7x18
+              RenderText at (53,0) size 7x18
+                text run at (53,0) width 7: &quot;\&quot;&quot;
</ins><span class="cx">         RenderText {#text} at (0,0) size 0x0
</span></span></pre></div>
<a id="branchessafari53775branchLayoutTestsplatformmacfastcssgeneratedcontentbeforeAfterinterdocumentexpectedtxt"></a>
<div class="modfile"><h4>Modified: branches/safari-537.75-branch/LayoutTests/platform/mac/fast/css-generated-content/beforeAfter-interdocument-expected.txt (165380 => 165381)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.75-branch/LayoutTests/platform/mac/fast/css-generated-content/beforeAfter-interdocument-expected.txt        2014-03-10 17:42:25 UTC (rev 165380)
+++ branches/safari-537.75-branch/LayoutTests/platform/mac/fast/css-generated-content/beforeAfter-interdocument-expected.txt        2014-03-10 17:49:38 UTC (rev 165381)
</span><span class="lines">@@ -19,7 +19,8 @@
</span><span class="cx">           RenderInline {Q} at (0,0) size 158x18
</span><span class="cx">             RenderInline (generated) at (0,0) size 7x18
</span><span class="cx">               RenderQuote at (0,0) size 7x18
</span><del>-                text run at (0,0) width 7: &quot;\&quot;&quot;
</del><ins>+                RenderText at (0,0) size 7x18
+                  text run at (0,0) width 7: &quot;\&quot;&quot;
</ins><span class="cx">             RenderText {#text} at (7,0) size 151x18
</span><span class="cx">               text run at (7,0) width 151: &quot;Quotes should surround&quot;
</span><span class="cx">         RenderBlock (anonymous) at (0,34) size 784x0
</span><span class="lines">@@ -29,5 +30,6 @@
</span><span class="cx">             RenderText {#text} at (0,0) size 53x18
</span><span class="cx">               text run at (0,0) width 53: &quot;this text.&quot;
</span><span class="cx">             RenderInline (generated) at (0,0) size 7x18
</span><del>-              RenderQuote at (53,0) size 7x18
-                text run at (53,0) width 7: &quot;\&quot;&quot;
</del><ins>+              RenderQuote at (0,0) size 7x18
+                RenderText at (53,0) size 7x18
+                  text run at (53,0) width 7: &quot;\&quot;&quot;
</ins></span></pre></div>
<a id="branchessafari53775branchLayoutTestsplatformmacfastcssgeneratedcontentnestedtableswithbeforeaftercontentcrashexpectedtxt"></a>
<div class="modfile"><h4>Modified: branches/safari-537.75-branch/LayoutTests/platform/mac/fast/css-generated-content/nested-tables-with-before-after-content-crash-expected.txt (165380 => 165381)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.75-branch/LayoutTests/platform/mac/fast/css-generated-content/nested-tables-with-before-after-content-crash-expected.txt        2014-03-10 17:42:25 UTC (rev 165380)
+++ branches/safari-537.75-branch/LayoutTests/platform/mac/fast/css-generated-content/nested-tables-with-before-after-content-crash-expected.txt        2014-03-10 17:49:38 UTC (rev 165381)
</span><span class="lines">@@ -16,9 +16,11 @@
</span><span class="cx">                     RenderTableCell (anonymous) at (0,0) size 32x16 [r=0 c=0 rs=1 cs=1]
</span><span class="cx">                       RenderInline (generated) at (0,0) size 16x16
</span><span class="cx">                         RenderQuote at (0,0) size 16x16
</span><del>-                          text run at (0,0) width 16: &quot;\&quot;&quot;
</del><ins>+                          RenderText at (0,0) size 16x16
+                            text run at (0,0) width 16: &quot;\&quot;&quot;
</ins><span class="cx">                       RenderInline (generated) at (0,0) size 16x16
</span><del>-                        RenderQuote at (16,0) size 16x16
-                          text run at (16,0) width 16: &quot;\&quot;&quot;
</del><ins>+                        RenderQuote at (0,0) size 16x16
+                          RenderText at (16,0) size 16x16
+                            text run at (16,0) width 16: &quot;\&quot;&quot;
</ins><span class="cx">       RenderText {#text} at (0,0) size 0x0
</span><span class="cx">       RenderText {#text} at (0,0) size 0x0
</span></span></pre></div>
<a id="branchessafari53775branchLayoutTestsplatformmacfastcssgeneratedcontentnoopenclosequoteexpectedtxt"></a>
<div class="modfile"><h4>Modified: branches/safari-537.75-branch/LayoutTests/platform/mac/fast/css-generated-content/no-openclose-quote-expected.txt (165380 => 165381)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.75-branch/LayoutTests/platform/mac/fast/css-generated-content/no-openclose-quote-expected.txt        2014-03-10 17:42:25 UTC (rev 165380)
+++ branches/safari-537.75-branch/LayoutTests/platform/mac/fast/css-generated-content/no-openclose-quote-expected.txt        2014-03-10 17:49:38 UTC (rev 165381)
</span><span class="lines">@@ -7,11 +7,11 @@
</span><span class="cx">         RenderInline (generated) at (0,0) size 8x18
</span><span class="cx">           RenderText at (0,0) size 8x18
</span><span class="cx">             text run at (0,0) width 8: &quot;*&quot;
</span><del>-          RenderQuote at (0,0) size 0x0
</del><ins>+          RenderQuote at (0,0) size 0x18
</ins><span class="cx">         RenderText {#text} at (8,0) size 425x18
</span><span class="cx">           text run at (8,0) width 114: &quot;This is some text. &quot;
</span><span class="cx">           text run at (122,0) width 311: &quot;It should have a single asterisk before and after it.&quot;
</span><span class="cx">         RenderInline (generated) at (0,0) size 8x18
</span><span class="cx">           RenderText at (433,0) size 8x18
</span><span class="cx">             text run at (433,0) width 8: &quot;*&quot;
</span><del>-          RenderQuote at (0,0) size 0x0
</del><ins>+          RenderQuote at (0,0) size 0x18
</ins></span></pre></div>
<a id="branchessafari53775branchLayoutTestsplatformmacfasttablequotetextaroundiframeexpectedtxt"></a>
<div class="modfile"><h4>Modified: branches/safari-537.75-branch/LayoutTests/platform/mac/fast/table/quote-text-around-iframe-expected.txt (165380 => 165381)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.75-branch/LayoutTests/platform/mac/fast/table/quote-text-around-iframe-expected.txt        2014-03-10 17:42:25 UTC (rev 165380)
+++ branches/safari-537.75-branch/LayoutTests/platform/mac/fast/table/quote-text-around-iframe-expected.txt        2014-03-10 17:49:38 UTC (rev 165381)
</span><span class="lines">@@ -8,8 +8,9 @@
</span><span class="cx">           RenderTableRow {Q} at (0,0) size 694x316
</span><span class="cx">             RenderTableCell (anonymous) at (0,0) size 694x316 [r=0 c=0 rs=1 cs=1]
</span><span class="cx">               RenderInline (generated) at (0,0) size 13x37
</span><del>-                RenderQuote at (0,279) size 13x37
-                  text run at (0,279) width 13: &quot;\&quot;&quot;
</del><ins>+                RenderQuote at (0,0) size 13x37
+                  RenderText at (0,279) size 13x37
+                    text run at (0,279) width 13: &quot;\&quot;&quot;
</ins><span class="cx">               RenderText {#text} at (13,279) size 31x37
</span><span class="cx">                 text run at (13,279) width 31: &quot; A&quot;
</span><span class="cx">               RenderPartObject {IFRAME} at (44,0) size 608x308 [border: (4px inset #000000)]
</span><span class="lines">@@ -21,5 +22,6 @@
</span><span class="cx">               RenderText {#text} at (652,279) size 29x37
</span><span class="cx">                 text run at (652,279) width 29: &quot;B &quot;
</span><span class="cx">               RenderInline (generated) at (0,0) size 13x37
</span><del>-                RenderQuote at (681,279) size 13x37
-                  text run at (681,279) width 13: &quot;\&quot;&quot;
</del><ins>+                RenderQuote at (0,0) size 13x37
+                  RenderText at (681,279) size 13x37
+                    text run at (681,279) width 13: &quot;\&quot;&quot;
</ins></span></pre></div>
<a id="branchessafari53775branchSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-537.75-branch/Source/WebCore/ChangeLog (165380 => 165381)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.75-branch/Source/WebCore/ChangeLog        2014-03-10 17:42:25 UTC (rev 165380)
+++ branches/safari-537.75-branch/Source/WebCore/ChangeLog        2014-03-10 17:49:38 UTC (rev 165381)
</span><span class="lines">@@ -1,3 +1,35 @@
</span><ins>+2014-03-07  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
+
+        Merge r162972 and r163007.
+
+    2014-03-07  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
+
+            ASSERT_WITH_SECURITY_IMPLICATION in WebCore::InlineTextBox::paint
+            https://bugs.webkit.org/show_bug.cgi?id=114586
+
+            Reviewed by Dave Hyatt.
+
+            Taken mostly from https://chromium.googlesource.com/chromium/blink/+/cb2297db16f2e9328cb4dd8b552093d6b22340a8
+
+            If RenderQuote is a subclass of RenderObject, it can't be split by the first-letter CSS pseudoclass.
+            Instead, we should make it a subclass of RenderElement, so that it can be split properly.
+
+            Test: fast/css-generated-content/quote-first-letter.html
+
+            * dom/PseudoElement.cpp:
+            (WebCore::PseudoElement::didRecalcStyle):
+            * rendering/RenderQuote.cpp:
+            (WebCore::RenderQuote::RenderQuote):
+            (WebCore::RenderQuote::willBeDestroyed):
+            (WebCore::RenderQuote::willBeRemovedFromTree):
+            (WebCore::RenderQuote::styleDidChange):
+            (WebCore::RenderQuote::updateText):
+            (WebCore::RenderQuote::computeText):
+            (WebCore::RenderQuote::updateDepth):
+            * rendering/RenderQuote.h:
+            * rendering/style/ContentData.cpp:
+            (WebCore::QuoteContentData::createContentRenderer):
+
</ins><span class="cx"> 2014-03-10  Matthew Hanson  &lt;matthew_hanson@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Merge r165339.
</span></span></pre></div>
<a id="branchessafari53775branchSourceWebCoredomPseudoElementcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-537.75-branch/Source/WebCore/dom/PseudoElement.cpp (165380 => 165381)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.75-branch/Source/WebCore/dom/PseudoElement.cpp        2014-03-10 17:42:25 UTC (rev 165380)
+++ branches/safari-537.75-branch/Source/WebCore/dom/PseudoElement.cpp        2014-03-10 17:49:38 UTC (rev 165381)
</span><span class="lines">@@ -115,7 +115,7 @@
</span><span class="cx">     RenderObject* renderer = this-&gt;renderer();
</span><span class="cx">     for (RenderObject* child = renderer-&gt;nextInPreOrder(renderer); child; child = child-&gt;nextInPreOrder(renderer)) {
</span><span class="cx">         // We only manage the style for the generated content which must be images or text.
</span><del>-        if (!child-&gt;isText() &amp;&amp; !child-&gt;isRenderImage())
</del><ins>+        if (!child-&gt;isText() &amp;&amp; !child-&gt;isRenderImage() &amp;&amp; !child-&gt;isQuote())
</ins><span class="cx">             continue;
</span><span class="cx"> 
</span><span class="cx">         // The style for the RenderTextFragment for first letter is managed by an enclosing block, not by us.
</span></span></pre></div>
<a id="branchessafari53775branchSourceWebCorerenderingRenderObjectcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-537.75-branch/Source/WebCore/rendering/RenderObject.cpp (165380 => 165381)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.75-branch/Source/WebCore/rendering/RenderObject.cpp        2014-03-10 17:42:25 UTC (rev 165380)
+++ branches/safari-537.75-branch/Source/WebCore/rendering/RenderObject.cpp        2014-03-10 17:49:38 UTC (rev 165381)
</span><span class="lines">@@ -1788,19 +1788,7 @@
</span><span class="cx"> 
</span><span class="cx"> void RenderObject::setPseudoStyle(PassRefPtr&lt;RenderStyle&gt; pseudoStyle)
</span><span class="cx"> {
</span><del>-    ASSERT(pseudoStyle-&gt;styleType() == BEFORE || pseudoStyle-&gt;styleType() == AFTER);
-
-    // Images are special and must inherit the pseudoStyle so the width and height of
-    // the pseudo element doesn't change the size of the image. In all other cases we
-    // can just share the style.
-    if (isImage()) {
-        RefPtr&lt;RenderStyle&gt; style = RenderStyle::create();
-        style-&gt;inheritFrom(pseudoStyle.get());
-        setStyle(style.release());
-        return;
-    }
-
-    setStyle(pseudoStyle);
</del><ins>+    setStyle(RenderStyle::createStyleInheritingFromPseudoStyle(pseudoStyle.get()));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> inline bool RenderObject::hasImmediateNonWhitespaceTextChild() const
</span></span></pre></div>
<a id="branchessafari53775branchSourceWebCorerenderingRenderQuotecpp"></a>
<div class="modfile"><h4>Modified: branches/safari-537.75-branch/Source/WebCore/rendering/RenderQuote.cpp (165380 => 165381)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.75-branch/Source/WebCore/rendering/RenderQuote.cpp        2014-03-10 17:42:25 UTC (rev 165380)
+++ branches/safari-537.75-branch/Source/WebCore/rendering/RenderQuote.cpp        2014-03-10 17:49:38 UTC (rev 165381)
</span><span class="lines">@@ -24,19 +24,21 @@
</span><span class="cx"> #include &quot;RenderQuote.h&quot;
</span><span class="cx"> 
</span><span class="cx"> #include &quot;QuotesData.h&quot;
</span><ins>+#include &quot;RenderTextFragment.h&quot;
</ins><span class="cx"> 
</span><span class="cx"> using namespace WTF::Unicode;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-RenderQuote::RenderQuote(Document* node, QuoteType quote)
-    : RenderText(node, StringImpl::empty())
</del><ins>+RenderQuote::RenderQuote(Document* document, QuoteType quote)
+    : RenderInline(0)
</ins><span class="cx">     , m_type(quote)
</span><span class="cx">     , m_depth(-1)
</span><span class="cx">     , m_next(0)
</span><span class="cx">     , m_previous(0)
</span><span class="cx">     , m_isAttached(false)
</span><span class="cx"> {
</span><ins>+    setDocumentForAnonymous(document);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> RenderQuote::~RenderQuote()
</span><span class="lines">@@ -49,19 +51,19 @@
</span><span class="cx"> void RenderQuote::willBeDestroyed()
</span><span class="cx"> {
</span><span class="cx">     detachQuote();
</span><del>-    RenderText::willBeDestroyed();
</del><ins>+    RenderInline::willBeDestroyed();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void RenderQuote::willBeRemovedFromTree()
</span><span class="cx"> {
</span><del>-    RenderText::willBeRemovedFromTree();
</del><ins>+    RenderInline::willBeRemovedFromTree();
</ins><span class="cx">     detachQuote();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void RenderQuote::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
</span><span class="cx"> {
</span><del>-    RenderText::styleDidChange(diff, oldStyle);
-    setText(originalText());
</del><ins>+    RenderInline::styleDidChange(diff, oldStyle);
+    updateText();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> const unsigned maxDistinctQuoteCharacters = 16;
</span><span class="lines">@@ -335,8 +337,29 @@
</span><span class="cx">     return apostropheString;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-PassRefPtr&lt;StringImpl&gt; RenderQuote::originalText() const
</del><ins>+void RenderQuote::updateText()
</ins><span class="cx"> {
</span><ins>+    String text = computeText();
+    if (m_text == text)
+        return;
+
+    while (RenderObject* child = firstChild())
+        child-&gt;destroy();
+
+    if (text == emptyString() || text == String()) {
+        m_text = String();
+        return;
+    }
+
+    m_text = text;
+
+    RenderTextFragment* fragment = new (document()-&gt;renderArena()) RenderTextFragment(document(), m_text.impl());
+    fragment-&gt;setStyle(style());
+    addChild(fragment);
+}
+
+PassRefPtr&lt;StringImpl&gt; RenderQuote::computeText() const
+{
</ins><span class="cx">     if (m_depth &lt; 0)
</span><span class="cx">         return StringImpl::empty();
</span><span class="cx">     bool isOpenQuote = false;
</span><span class="lines">@@ -452,7 +475,7 @@
</span><span class="cx">     if (m_depth == depth)
</span><span class="cx">         return;
</span><span class="cx">     m_depth = depth;
</span><del>-    setText(originalText());
</del><ins>+    updateText();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="branchessafari53775branchSourceWebCorerenderingRenderQuoteh"></a>
<div class="modfile"><h4>Modified: branches/safari-537.75-branch/Source/WebCore/rendering/RenderQuote.h (165380 => 165381)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.75-branch/Source/WebCore/rendering/RenderQuote.h        2014-03-10 17:42:25 UTC (rev 165380)
+++ branches/safari-537.75-branch/Source/WebCore/rendering/RenderQuote.h        2014-03-10 17:49:38 UTC (rev 165381)
</span><span class="lines">@@ -23,11 +23,11 @@
</span><span class="cx"> #ifndef RenderQuote_h
</span><span class="cx"> #define RenderQuote_h
</span><span class="cx"> 
</span><del>-#include &quot;RenderText.h&quot;
</del><ins>+#include &quot;RenderInline.h&quot;
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-class RenderQuote FINAL : public RenderText {
</del><ins>+class RenderQuote FINAL : public RenderInline {
</ins><span class="cx"> public:
</span><span class="cx">     RenderQuote(Document*, QuoteType);
</span><span class="cx">     virtual ~RenderQuote();
</span><span class="lines">@@ -40,10 +40,11 @@
</span><span class="cx">     virtual void willBeDestroyed() OVERRIDE;
</span><span class="cx">     virtual const char* renderName() const OVERRIDE { return &quot;RenderQuote&quot;; }
</span><span class="cx">     virtual bool isQuote() const OVERRIDE { return true; };
</span><del>-    virtual PassRefPtr&lt;StringImpl&gt; originalText() const OVERRIDE;
</del><span class="cx">     virtual void styleDidChange(StyleDifference, const RenderStyle*) OVERRIDE;
</span><span class="cx">     virtual void willBeRemovedFromTree() OVERRIDE;
</span><span class="cx"> 
</span><ins>+    PassRefPtr&lt;StringImpl&gt; computeText() const;
+    void updateText();
</ins><span class="cx">     void updateDepth();
</span><span class="cx"> 
</span><span class="cx">     QuoteType m_type;
</span><span class="lines">@@ -51,6 +52,7 @@
</span><span class="cx">     RenderQuote* m_next;
</span><span class="cx">     RenderQuote* m_previous;
</span><span class="cx">     bool m_isAttached;
</span><ins>+    String m_text;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> inline RenderQuote* toRenderQuote(RenderObject* object)
</span></span></pre></div>
<a id="branchessafari53775branchSourceWebCorerenderingstyleRenderStylecpp"></a>
<div class="modfile"><h4>Modified: branches/safari-537.75-branch/Source/WebCore/rendering/style/RenderStyle.cpp (165380 => 165381)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.75-branch/Source/WebCore/rendering/style/RenderStyle.cpp        2014-03-10 17:42:25 UTC (rev 165380)
+++ branches/safari-537.75-branch/Source/WebCore/rendering/style/RenderStyle.cpp        2014-03-10 17:49:38 UTC (rev 165381)
</span><span class="lines">@@ -106,6 +106,15 @@
</span><span class="cx">     return adoptRef(new RenderStyle(*other));
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+PassRefPtr&lt;RenderStyle&gt; RenderStyle::createStyleInheritingFromPseudoStyle(const RenderStyle* pseudoStyle)
+{
+    ASSERT(pseudoStyle-&gt;styleType() == BEFORE || pseudoStyle-&gt;styleType() == AFTER);
+
+    auto style = RenderStyle::create();
+    style-&gt;inheritFrom(pseudoStyle);
+    return style;
+}
+
</ins><span class="cx"> ALWAYS_INLINE RenderStyle::RenderStyle()
</span><span class="cx">     : m_box(defaultStyle()-&gt;m_box)
</span><span class="cx">     , visual(defaultStyle()-&gt;visual)
</span></span></pre></div>
<a id="branchessafari53775branchSourceWebCorerenderingstyleRenderStyleh"></a>
<div class="modfile"><h4>Modified: branches/safari-537.75-branch/Source/WebCore/rendering/style/RenderStyle.h (165380 => 165381)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.75-branch/Source/WebCore/rendering/style/RenderStyle.h        2014-03-10 17:42:25 UTC (rev 165380)
+++ branches/safari-537.75-branch/Source/WebCore/rendering/style/RenderStyle.h        2014-03-10 17:49:38 UTC (rev 165381)
</span><span class="lines">@@ -350,6 +350,9 @@
</span><span class="cx">     static PassRefPtr&lt;RenderStyle&gt; createAnonymousStyleWithDisplay(const RenderStyle* parentStyle, EDisplay);
</span><span class="cx">     static PassRefPtr&lt;RenderStyle&gt; clone(const RenderStyle*);
</span><span class="cx"> 
</span><ins>+    // Create a RenderStyle for generated content by inheriting from a pseudo style.
+    static PassRefPtr&lt;RenderStyle&gt; createStyleInheritingFromPseudoStyle(const RenderStyle* pseudoStyle);
+
</ins><span class="cx">     enum IsAtShadowBoundary {
</span><span class="cx">         AtShadowBoundary,
</span><span class="cx">         NotAtShadowBoundary,
</span></span></pre>
</div>
</div>

</body>
</html>