<!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>[150259] 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/150259">150259</a></dd>
<dt>Author</dt> <dd>akling@apple.com</dd>
<dt>Date</dt> <dd>2013-05-17 08:26:30 -0700 (Fri, 17 May 2013)</dd>
</dl>

<h3>Log Message</h3>
<pre>Changes in text-only properties shouldn't cause repaints unless there is actually text.
&lt;http://webkit.org/b/116250&gt;

Reviewed by Antti Koivisto.

Add a new StyleDifferenceRepaintIfText value to the repertoire of RenderStyle::diff().
This result means that the renderer only needs to repaint if one of its immediate children contains text.

This lets us avoid repainting the same pixels when hovering over constructs like:

    &lt;style&gt;
        a { text-decoration: none; }
        a:hover { text-decoration: underline; }
    &lt;/style&gt;
    &lt;a href=&quot;http://is.gd/andersca&quot;&gt;
        &lt;img src=&quot;cool-hat.jpg&quot;&gt;
    &lt;/a&gt;

Since the change in text-decoration has no effect on the rendering of the &lt;img&gt; element,
we'll now be smart enough to avoid repainting it.

* rendering/style/RenderStyleConstants.h:
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::diff):

    Move checking of text-only properties until the very end, and return StyleDifferenceRepaintIfText
    in case a difference is found, giving precedence to StyleDifferenceRepaint.

* rendering/RenderObject.h:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::hasImmediateNonWhitespaceTextChild):

    Helper to check if a RenderObject has at least one RenderText child containing more than just
    collapsible whitespace.

(WebCore::RenderObject::shouldRepaintForStyleDifference):

    Helper to check if a StyleDifference is either ...Repaint or ...RepaintIfText and the renderer
    has an immediate text child.

(WebCore::RenderObject::styleWillChange):
(WebCore::RenderObject::setStyle):

    Don't repaint for StyleDifferenceRepaintIfText unless hasImmediateNonWhitespaceTextChild().

* rendering/RenderBox.cpp:
(WebCore::RenderBox::styleDidChange):
* rendering/svg/SVGResourcesCache.cpp:
(WebCore::SVGResourcesCache::clientStyleChanged):

    Tweak for new StyleDifference enum value.

* rendering/RenderText.h:
* rendering/RenderText.cpp:
(WebCore::RenderText::isAllCollapsibleWhitespace):

    Made this const.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBoxcpp">trunk/Source/WebCore/rendering/RenderBox.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderObjectcpp">trunk/Source/WebCore/rendering/RenderObject.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderObjecth">trunk/Source/WebCore/rendering/RenderObject.h</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="#trunkSourceWebCorerenderingstyleRenderStylecpp">trunk/Source/WebCore/rendering/style/RenderStyle.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleRenderStyleConstantsh">trunk/Source/WebCore/rendering/style/RenderStyleConstants.h</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgSVGResourcesCachecpp">trunk/Source/WebCore/rendering/svg/SVGResourcesCache.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (150258 => 150259)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2013-05-17 15:11:10 UTC (rev 150258)
+++ trunk/Source/WebCore/ChangeLog        2013-05-17 15:26:30 UTC (rev 150259)
</span><span class="lines">@@ -1,3 +1,63 @@
</span><ins>+2013-05-16  Andreas Kling  &lt;akling@apple.com&gt;
+
+        Changes in text-only properties shouldn't cause repaints unless there is actually text.
+        &lt;http://webkit.org/b/116250&gt;
+
+        Reviewed by Antti Koivisto.
+
+        Add a new StyleDifferenceRepaintIfText value to the repertoire of RenderStyle::diff().
+        This result means that the renderer only needs to repaint if one of its immediate children contains text.
+
+        This lets us avoid repainting the same pixels when hovering over constructs like:
+
+            &lt;style&gt;
+                a { text-decoration: none; }
+                a:hover { text-decoration: underline; }
+            &lt;/style&gt;
+            &lt;a href=&quot;http://is.gd/andersca&quot;&gt;
+                &lt;img src=&quot;cool-hat.jpg&quot;&gt;
+            &lt;/a&gt;
+
+        Since the change in text-decoration has no effect on the rendering of the &lt;img&gt; element,
+        we'll now be smart enough to avoid repainting it.
+
+        * rendering/style/RenderStyleConstants.h:
+        * rendering/style/RenderStyle.cpp:
+        (WebCore::RenderStyle::diff):
+
+            Move checking of text-only properties until the very end, and return StyleDifferenceRepaintIfText
+            in case a difference is found, giving precedence to StyleDifferenceRepaint.
+
+        * rendering/RenderObject.h:
+        * rendering/RenderObject.cpp:
+        (WebCore::RenderObject::hasImmediateNonWhitespaceTextChild):
+
+            Helper to check if a RenderObject has at least one RenderText child containing more than just
+            collapsible whitespace.
+
+        (WebCore::RenderObject::shouldRepaintForStyleDifference):
+
+            Helper to check if a StyleDifference is either ...Repaint or ...RepaintIfText and the renderer
+            has an immediate text child.
+
+        (WebCore::RenderObject::styleWillChange):
+        (WebCore::RenderObject::setStyle):
+
+            Don't repaint for StyleDifferenceRepaintIfText unless hasImmediateNonWhitespaceTextChild().
+
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::styleDidChange):
+        * rendering/svg/SVGResourcesCache.cpp:
+        (WebCore::SVGResourcesCache::clientStyleChanged):
+
+            Tweak for new StyleDifference enum value.
+
+        * rendering/RenderText.h:
+        * rendering/RenderText.cpp:
+        (WebCore::RenderText::isAllCollapsibleWhitespace):
+
+            Made this const.
+
</ins><span class="cx"> 2013-05-17  Lamarque V. Souza  &lt;Lamarque.Souza@basyskom.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Improve -webkit-text-underline-position memory usage.
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (150258 => 150259)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBox.cpp        2013-05-17 15:11:10 UTC (rev 150258)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp        2013-05-17 15:26:30 UTC (rev 150259)
</span><span class="lines">@@ -276,7 +276,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // Our opaqueness might have changed without triggering layout.
</span><del>-    if (diff == StyleDifferenceRepaint || diff == StyleDifferenceRepaintLayer) {
</del><ins>+    if (diff &gt;= StyleDifferenceRepaint &amp;&amp; diff &lt;= StyleDifferenceRepaintLayer) {
</ins><span class="cx">         RenderObject* parentToInvalidate = parent();
</span><span class="cx">         for (unsigned i = 0; i &lt; backgroundObscurationTestMaxDepth &amp;&amp; parentToInvalidate; ++i) {
</span><span class="cx">             parentToInvalidate-&gt;invalidateBackgroundObscurationStatus();
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderObject.cpp (150258 => 150259)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderObject.cpp        2013-05-17 15:11:10 UTC (rev 150258)
+++ trunk/Source/WebCore/rendering/RenderObject.cpp        2013-05-17 15:26:30 UTC (rev 150259)
</span><span class="lines">@@ -1758,6 +1758,20 @@
</span><span class="cx">     setStyle(pseudoStyle);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+inline bool RenderObject::hasImmediateNonWhitespaceTextChild() const
+{
+    for (const RenderObject* r = firstChild(); r; r = r-&gt;nextSibling()) {
+        if (r-&gt;isText() &amp;&amp; !toRenderText(r)-&gt;isAllCollapsibleWhitespace())
+            return true;
+    }
+    return false;
+}
+
+inline bool RenderObject::shouldRepaintForStyleDifference(StyleDifference diff) const
+{
+    return diff == StyleDifferenceRepaint || (diff == StyleDifferenceRepaintIfText &amp;&amp; hasImmediateNonWhitespaceTextChild());
+}
+
</ins><span class="cx"> void RenderObject::setStyle(PassRefPtr&lt;RenderStyle&gt; style)
</span><span class="cx"> {
</span><span class="cx">     if (m_style == style) {
</span><span class="lines">@@ -1818,8 +1832,8 @@
</span><span class="cx">         } else if (updatedDiff == StyleDifferenceSimplifiedLayout)
</span><span class="cx">             setNeedsSimplifiedNormalFlowLayout();
</span><span class="cx">     }
</span><del>-    
-    if (updatedDiff == StyleDifferenceRepaintLayer || updatedDiff == StyleDifferenceRepaint) {
</del><ins>+
+    if (updatedDiff == StyleDifferenceRepaintLayer || shouldRepaintForStyleDifference(updatedDiff)) {
</ins><span class="cx">         // Do a repaint with the new style now, e.g., for example if we go from
</span><span class="cx">         // not having an outline to having an outline.
</span><span class="cx">         repaint();
</span><span class="lines">@@ -1863,7 +1877,7 @@
</span><span class="cx">             }
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        if (m_parent &amp;&amp; (diff == StyleDifferenceRepaint || newStyle-&gt;outlineSize() &lt; m_style-&gt;outlineSize()))
</del><ins>+        if (m_parent &amp;&amp; (newStyle-&gt;outlineSize() &lt; m_style-&gt;outlineSize() || shouldRepaintForStyleDifference(diff)))
</ins><span class="cx">             repaint();
</span><span class="cx">         if (isFloating() &amp;&amp; (m_style-&gt;floating() != newStyle-&gt;floating()))
</span><span class="cx">             // For changes in float styles, we need to conceivably remove ourselves
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderObject.h (150258 => 150259)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderObject.h        2013-05-17 15:11:10 UTC (rev 150258)
+++ trunk/Source/WebCore/rendering/RenderObject.h        2013-05-17 15:26:30 UTC (rev 150259)
</span><span class="lines">@@ -1024,6 +1024,9 @@
</span><span class="cx">     void removeFromRenderFlowThread();
</span><span class="cx">     void removeFromRenderFlowThreadRecursive(RenderFlowThread*);
</span><span class="cx"> 
</span><ins>+    bool shouldRepaintForStyleDifference(StyleDifference) const;
+    bool hasImmediateNonWhitespaceTextChild() const;
+
</ins><span class="cx">     RenderStyle* cachedFirstLineStyle() const;
</span><span class="cx">     StyleDifference adjustStyleDifference(StyleDifference, unsigned contextSensitiveProperties) const;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderTextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderText.cpp (150258 => 150259)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderText.cpp        2013-05-17 15:11:10 UTC (rev 150258)
+++ trunk/Source/WebCore/rendering/RenderText.cpp        2013-05-17 15:26:30 UTC (rev 150259)
</span><span class="lines">@@ -1180,7 +1180,7 @@
</span><span class="cx">     setPreferredLogicalWidthsDirty(false);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool RenderText::isAllCollapsibleWhitespace()
</del><ins>+bool RenderText::isAllCollapsibleWhitespace() const
</ins><span class="cx"> {
</span><span class="cx">     unsigned length = textLength();
</span><span class="cx">     if (is8Bit()) {
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderTexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderText.h (150258 => 150259)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderText.h        2013-05-17 15:11:10 UTC (rev 150258)
+++ trunk/Source/WebCore/rendering/RenderText.h        2013-05-17 15:26:30 UTC (rev 150259)
</span><span class="lines">@@ -130,7 +130,7 @@
</span><span class="cx"> 
</span><span class="cx">     void checkConsistency() const;
</span><span class="cx"> 
</span><del>-    bool isAllCollapsibleWhitespace();
</del><ins>+    bool isAllCollapsibleWhitespace() const;
</ins><span class="cx"> 
</span><span class="cx">     bool canUseSimpleFontCodePath() const { return m_canUseSimpleFontCodePath; }
</span><span class="cx">     bool knownToHaveNoOverflowAndNoFallbackFonts() const { return m_knownToHaveNoOverflowAndNoFallbackFonts; }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleRenderStylecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/RenderStyle.cpp (150258 => 150259)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/RenderStyle.cpp        2013-05-17 15:11:10 UTC (rev 150258)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.cpp        2013-05-17 15:26:30 UTC (rev 150259)
</span><span class="lines">@@ -675,26 +675,15 @@
</span><span class="cx">         || rareNonInheritedData-&gt;m_maskBoxImage != other-&gt;rareNonInheritedData-&gt;m_maskBoxImage)
</span><span class="cx">         return StyleDifferenceRepaintLayer;
</span><span class="cx"> 
</span><del>-    if (inherited-&gt;color != other-&gt;inherited-&gt;color
-        || inherited_flags._visibility != other-&gt;inherited_flags._visibility
-        || inherited_flags._text_decorations != other-&gt;inherited_flags._text_decorations
</del><ins>+    if (inherited_flags._visibility != other-&gt;inherited_flags._visibility
</ins><span class="cx">         || inherited_flags.m_printColorAdjust != other-&gt;inherited_flags.m_printColorAdjust
</span><span class="cx">         || inherited_flags._insideLink != other-&gt;inherited_flags._insideLink
</span><span class="cx">         || surround-&gt;border != other-&gt;surround-&gt;border
</span><span class="cx">         || *m_background.get() != *other-&gt;m_background.get()
</span><del>-        || visual-&gt;textDecoration != other-&gt;visual-&gt;textDecoration
</del><span class="cx">         || rareInheritedData-&gt;userModify != other-&gt;rareInheritedData-&gt;userModify
</span><span class="cx">         || rareInheritedData-&gt;userSelect != other-&gt;rareInheritedData-&gt;userSelect
</span><span class="cx">         || rareNonInheritedData-&gt;userDrag != other-&gt;rareNonInheritedData-&gt;userDrag
</span><span class="cx">         || rareNonInheritedData-&gt;m_borderFit != other-&gt;rareNonInheritedData-&gt;m_borderFit
</span><del>-#if ENABLE(CSS3_TEXT)
-        || rareNonInheritedData-&gt;m_textDecorationStyle != other-&gt;rareNonInheritedData-&gt;m_textDecorationStyle
-        || rareNonInheritedData-&gt;m_textDecorationColor != other-&gt;rareNonInheritedData-&gt;m_textDecorationColor
-#endif // CSS3_TEXT
-        || rareInheritedData-&gt;textFillColor != other-&gt;rareInheritedData-&gt;textFillColor
-        || rareInheritedData-&gt;textStrokeColor != other-&gt;rareInheritedData-&gt;textStrokeColor
-        || rareInheritedData-&gt;textEmphasisColor != other-&gt;rareInheritedData-&gt;textEmphasisColor
-        || rareInheritedData-&gt;textEmphasisFill != other-&gt;rareInheritedData-&gt;textEmphasisFill
</del><span class="cx">         || rareInheritedData-&gt;m_imageRendering != other-&gt;rareInheritedData-&gt;m_imageRendering)
</span><span class="cx">         return StyleDifferenceRepaint;
</span><span class="cx">         
</span><span class="lines">@@ -709,7 +698,6 @@
</span><span class="cx">         if (rareNonInheritedData-&gt;m_clipPath != other-&gt;rareNonInheritedData-&gt;m_clipPath)
</span><span class="cx">             return StyleDifferenceRepaint;
</span><span class="cx"> 
</span><del>-
</del><span class="cx"> #if USE(ACCELERATED_COMPOSITING)
</span><span class="cx">     if (rareNonInheritedData.get() != other-&gt;rareNonInheritedData.get()) {
</span><span class="cx">         if (rareNonInheritedData-&gt;m_transformStyle3D != other-&gt;rareNonInheritedData-&gt;m_transformStyle3D
</span><span class="lines">@@ -721,6 +709,19 @@
</span><span class="cx">     }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+    if (inherited-&gt;color != other-&gt;inherited-&gt;color
+        || inherited_flags._text_decorations != other-&gt;inherited_flags._text_decorations
+        || visual-&gt;textDecoration != other-&gt;visual-&gt;textDecoration
+#if ENABLE(CSS3_TEXT)
+        || rareNonInheritedData-&gt;m_textDecorationStyle != other-&gt;rareNonInheritedData-&gt;m_textDecorationStyle
+        || rareNonInheritedData-&gt;m_textDecorationColor != other-&gt;rareNonInheritedData-&gt;m_textDecorationColor
+#endif // CSS3_TEXT
+        || rareInheritedData-&gt;textFillColor != other-&gt;rareInheritedData-&gt;textFillColor
+        || rareInheritedData-&gt;textStrokeColor != other-&gt;rareInheritedData-&gt;textStrokeColor
+        || rareInheritedData-&gt;textEmphasisColor != other-&gt;rareInheritedData-&gt;textEmphasisColor
+        || rareInheritedData-&gt;textEmphasisFill != other-&gt;rareInheritedData-&gt;textEmphasisFill)
+        return StyleDifferenceRepaintIfText;
+
</ins><span class="cx">     // Cursors are not checked, since they will be set appropriately in response to mouse events,
</span><span class="cx">     // so they don't need to cause any repaint or layout.
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleRenderStyleConstantsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/RenderStyleConstants.h (150258 => 150259)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/RenderStyleConstants.h        2013-05-17 15:11:10 UTC (rev 150258)
+++ trunk/Source/WebCore/rendering/style/RenderStyleConstants.h        2013-05-17 15:26:30 UTC (rev 150259)
</span><span class="lines">@@ -35,20 +35,22 @@
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> // The difference between two styles.  The following values are used:
</span><del>-// (1) StyleDifferenceEqual - The two styles are identical
-// (2) StyleDifferenceRecompositeLayer - The layer needs its position and transform updated, but no repaint
-// (3) StyleDifferenceRepaint - The object just needs to be repainted.
-// (4) StyleDifferenceRepaintLayer - The layer and its descendant layers needs to be repainted.
-// (5) StyleDifferenceLayoutPositionedMovementOnly - Only the position of this positioned object has been updated
-// (6) StyleDifferenceSimplifiedLayout - Only overflow needs to be recomputed
-// (7) StyleDifferenceSimplifiedLayoutAndPositionedMovement - Both positioned movement and simplified layout updates are required.
-// (8) StyleDifferenceLayout - A full layout is required.
</del><ins>+// - StyleDifferenceEqual - The two styles are identical
+// - StyleDifferenceRecompositeLayer - The layer needs its position and transform updated, but no repaint
+// - StyleDifferenceRepaint - The object just needs to be repainted.
+// - StyleDifferenceRepaintIfText - The object needs to be repainted if it contains text.
+// - StyleDifferenceRepaintLayer - The layer and its descendant layers needs to be repainted.
+// - StyleDifferenceLayoutPositionedMovementOnly - Only the position of this positioned object has been updated
+// - StyleDifferenceSimplifiedLayout - Only overflow needs to be recomputed
+// - StyleDifferenceSimplifiedLayoutAndPositionedMovement - Both positioned movement and simplified layout updates are required.
+// - StyleDifferenceLayout - A full layout is required.
</ins><span class="cx"> enum StyleDifference {
</span><span class="cx">     StyleDifferenceEqual,
</span><span class="cx"> #if USE(ACCELERATED_COMPOSITING)
</span><span class="cx">     StyleDifferenceRecompositeLayer,
</span><span class="cx"> #endif
</span><span class="cx">     StyleDifferenceRepaint,
</span><ins>+    StyleDifferenceRepaintIfText,
</ins><span class="cx">     StyleDifferenceRepaintLayer,
</span><span class="cx">     StyleDifferenceLayoutPositionedMovementOnly,
</span><span class="cx">     StyleDifferenceSimplifiedLayout,
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgSVGResourcesCachecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/SVGResourcesCache.cpp (150258 => 150259)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/SVGResourcesCache.cpp        2013-05-17 15:11:10 UTC (rev 150258)
+++ trunk/Source/WebCore/rendering/svg/SVGResourcesCache.cpp        2013-05-17 15:26:30 UTC (rev 150259)
</span><span class="lines">@@ -129,7 +129,7 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     // In this case the proper SVGFE*Element will decide whether the modified CSS properties require a relayout or repaint.
</span><del>-    if (renderer-&gt;isSVGResourceFilterPrimitive() &amp;&amp; diff == StyleDifferenceRepaint)
</del><ins>+    if (renderer-&gt;isSVGResourceFilterPrimitive() &amp;&amp; (diff == StyleDifferenceRepaint || diff == StyleDifferenceRepaintIfText))
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     // Dynamic changes of CSS properties like 'clip-path' may require us to recompute the associated resources for a renderer.
</span></span></pre>
</div>
</div>

</body>
</html>