<!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>[160539] 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/160539">160539</a></dd>
<dt>Author</dt> <dd>akling@apple.com</dd>
<dt>Date</dt> <dd>2013-12-13 01:56:26 -0800 (Fri, 13 Dec 2013)</dd>
</dl>

<h3>Log Message</h3>
<pre>StyleResolver::adjustRenderStyle() should take RenderStyle references.
&lt;https://webkit.org/b/125623&gt;

This function doesn't handle null styles being passed, so prevent
it at compile time.

Reviewed by Anders Carlsson.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecssStyleResolvercpp">trunk/Source/WebCore/css/StyleResolver.cpp</a></li>
<li><a href="#trunkSourceWebCorecssStyleResolverh">trunk/Source/WebCore/css/StyleResolver.h</a></li>
<li><a href="#trunkSourceWebCorepageFrameViewcpp">trunk/Source/WebCore/page/FrameView.cpp</a></li>
<li><a href="#trunkSourceWebCorepageFrameViewh">trunk/Source/WebCore/page/FrameView.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderThemecpp">trunk/Source/WebCore/rendering/RenderTheme.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderThemeh">trunk/Source/WebCore/rendering/RenderTheme.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (160538 => 160539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2013-12-13 09:41:16 UTC (rev 160538)
+++ trunk/Source/WebCore/ChangeLog        2013-12-13 09:56:26 UTC (rev 160539)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2013-12-12  Andreas Kling  &lt;akling@apple.com&gt;
+
+        StyleResolver::adjustRenderStyle() should take RenderStyle references.
+        &lt;https://webkit.org/b/125623&gt;
+
+        This function doesn't handle null styles being passed, so prevent
+        it at compile time.
+
+        Reviewed by Anders Carlsson.
+
</ins><span class="cx"> 2013-12-13  Darin Adler  &lt;darin@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Eliminate awkward virtualComputedStyle construction
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleResolvercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleResolver.cpp (160538 => 160539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleResolver.cpp        2013-12-13 09:41:16 UTC (rev 160538)
+++ trunk/Source/WebCore/css/StyleResolver.cpp        2013-12-13 09:56:26 UTC (rev 160539)
</span><span class="lines">@@ -844,7 +844,7 @@
</span><span class="cx">     applyMatchedProperties(collector.matchedResult(), element);
</span><span class="cx"> 
</span><span class="cx">     // Clean up our style object's display and text decorations (among other fixups).
</span><del>-    adjustRenderStyle(state.style(), state.parentStyle(), element);
</del><ins>+    adjustRenderStyle(*state.style(), *state.parentStyle(), element);
</ins><span class="cx"> 
</span><span class="cx">     state.clear(); // Clear out for the next resolve.
</span><span class="cx"> 
</span><span class="lines">@@ -1009,7 +1009,7 @@
</span><span class="cx">     applyMatchedProperties(collector.matchedResult(), e);
</span><span class="cx"> 
</span><span class="cx">     // Clean up our style object's display and text decorations (among other fixups).
</span><del>-    adjustRenderStyle(state.style(), m_state.parentStyle(), 0);
</del><ins>+    adjustRenderStyle(*state.style(), *m_state.parentStyle(), 0);
</ins><span class="cx"> 
</span><span class="cx">     // Start loading resources referenced by this style.
</span><span class="cx">     loadPendingResources();
</span><span class="lines">@@ -1066,25 +1066,25 @@
</span><span class="cx">     return m_state.takeStyle();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static void addIntrinsicMargins(RenderStyle* style)
</del><ins>+static void addIntrinsicMargins(RenderStyle&amp; style)
</ins><span class="cx"> {
</span><span class="cx">     // Intrinsic margin value.
</span><del>-    const int intrinsicMargin = 2 * style-&gt;effectiveZoom();
</del><ins>+    const int intrinsicMargin = 2 * style.effectiveZoom();
</ins><span class="cx"> 
</span><span class="cx">     // FIXME: Using width/height alone and not also dealing with min-width/max-width is flawed.
</span><span class="cx">     // FIXME: Using &quot;quirk&quot; to decide the margin wasn't set is kind of lame.
</span><del>-    if (style-&gt;width().isIntrinsicOrAuto()) {
-        if (style-&gt;marginLeft().quirk())
-            style-&gt;setMarginLeft(Length(intrinsicMargin, Fixed));
-        if (style-&gt;marginRight().quirk())
-            style-&gt;setMarginRight(Length(intrinsicMargin, Fixed));
</del><ins>+    if (style.width().isIntrinsicOrAuto()) {
+        if (style.marginLeft().quirk())
+            style.setMarginLeft(Length(intrinsicMargin, Fixed));
+        if (style.marginRight().quirk())
+            style.setMarginRight(Length(intrinsicMargin, Fixed));
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (style-&gt;height().isAuto()) {
-        if (style-&gt;marginTop().quirk())
-            style-&gt;setMarginTop(Length(intrinsicMargin, Fixed));
-        if (style-&gt;marginBottom().quirk())
-            style-&gt;setMarginBottom(Length(intrinsicMargin, Fixed));
</del><ins>+    if (style.height().isAuto()) {
+        if (style.marginTop().quirk())
+            style.setMarginTop(Length(intrinsicMargin, Fixed));
+        if (style.marginBottom().quirk())
+            style.setMarginBottom(Length(intrinsicMargin, Fixed));
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1136,11 +1136,11 @@
</span><span class="cx"> // CSS requires text-decoration to be reset at each DOM element for tables, 
</span><span class="cx"> // inline blocks, inline tables, run-ins, shadow DOM crossings, floating elements,
</span><span class="cx"> // and absolute or relatively positioned elements.
</span><del>-static bool doesNotInheritTextDecoration(RenderStyle* style, Element* e)
</del><ins>+static bool doesNotInheritTextDecoration(const RenderStyle&amp; style, Element* e)
</ins><span class="cx"> {
</span><del>-    return style-&gt;display() == TABLE || style-&gt;display() == INLINE_TABLE || style-&gt;display() == RUN_IN
-        || style-&gt;display() == INLINE_BLOCK || style-&gt;display() == INLINE_BOX || isAtShadowBoundary(e)
-        || style-&gt;isFloating() || style-&gt;hasOutOfFlowPosition();
</del><ins>+    return style.display() == TABLE || style.display() == INLINE_TABLE || style.display() == RUN_IN
+        || style.display() == INLINE_BLOCK || style.display() == INLINE_BOX || isAtShadowBoundary(e)
+        || style.isFloating() || style.hasOutOfFlowPosition();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static bool isDisplayFlexibleBox(EDisplay display)
</span><span class="lines">@@ -1155,183 +1155,181 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-void StyleResolver::adjustRenderStyle(RenderStyle* style, RenderStyle* parentStyle, Element *e)
</del><ins>+void StyleResolver::adjustRenderStyle(RenderStyle&amp; style, const RenderStyle&amp; parentStyle, Element *e)
</ins><span class="cx"> {
</span><del>-    ASSERT(parentStyle);
-
</del><span class="cx">     // Cache our original display.
</span><del>-    style-&gt;setOriginalDisplay(style-&gt;display());
</del><ins>+    style.setOriginalDisplay(style.display());
</ins><span class="cx"> 
</span><del>-    if (style-&gt;display() != NONE) {
</del><ins>+    if (style.display() != NONE) {
</ins><span class="cx">         // If we have a &lt;td&gt; that specifies a float property, in quirks mode we just drop the float
</span><span class="cx">         // property.
</span><span class="cx">         // Sites also commonly use display:inline/block on &lt;td&gt;s and &lt;table&gt;s. In quirks mode we force
</span><span class="cx">         // these tags to retain their display types.
</span><span class="cx">         if (document().inQuirksMode() &amp;&amp; e) {
</span><span class="cx">             if (e-&gt;hasTagName(tdTag)) {
</span><del>-                style-&gt;setDisplay(TABLE_CELL);
-                style-&gt;setFloating(NoFloat);
</del><ins>+                style.setDisplay(TABLE_CELL);
+                style.setFloating(NoFloat);
</ins><span class="cx">             } else if (isHTMLTableElement(e))
</span><del>-                style-&gt;setDisplay(style-&gt;isDisplayInlineType() ? INLINE_TABLE : TABLE);
</del><ins>+                style.setDisplay(style.isDisplayInlineType() ? INLINE_TABLE : TABLE);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         if (e &amp;&amp; (e-&gt;hasTagName(tdTag) || e-&gt;hasTagName(thTag))) {
</span><del>-            if (style-&gt;whiteSpace() == KHTML_NOWRAP) {
</del><ins>+            if (style.whiteSpace() == KHTML_NOWRAP) {
</ins><span class="cx">                 // Figure out if we are really nowrapping or if we should just
</span><span class="cx">                 // use normal instead. If the width of the cell is fixed, then
</span><span class="cx">                 // we don't actually use NOWRAP.
</span><del>-                if (style-&gt;width().isFixed())
-                    style-&gt;setWhiteSpace(NORMAL);
</del><ins>+                if (style.width().isFixed())
+                    style.setWhiteSpace(NORMAL);
</ins><span class="cx">                 else
</span><del>-                    style-&gt;setWhiteSpace(NOWRAP);
</del><ins>+                    style.setWhiteSpace(NOWRAP);
</ins><span class="cx">             }
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         // Tables never support the -webkit-* values for text-align and will reset back to the default.
</span><del>-        if (e &amp;&amp; isHTMLTableElement(e) &amp;&amp; (style-&gt;textAlign() == WEBKIT_LEFT || style-&gt;textAlign() == WEBKIT_CENTER || style-&gt;textAlign() == WEBKIT_RIGHT))
-            style-&gt;setTextAlign(TASTART);
</del><ins>+        if (e &amp;&amp; isHTMLTableElement(e) &amp;&amp; (style.textAlign() == WEBKIT_LEFT || style.textAlign() == WEBKIT_CENTER || style.textAlign() == WEBKIT_RIGHT))
+            style.setTextAlign(TASTART);
</ins><span class="cx"> 
</span><span class="cx">         // Frames and framesets never honor position:relative or position:absolute. This is necessary to
</span><span class="cx">         // fix a crash where a site tries to position these objects. They also never honor display.
</span><span class="cx">         if (e &amp;&amp; (e-&gt;hasTagName(frameTag) || e-&gt;hasTagName(framesetTag))) {
</span><del>-            style-&gt;setPosition(StaticPosition);
-            style-&gt;setDisplay(BLOCK);
</del><ins>+            style.setPosition(StaticPosition);
+            style.setDisplay(BLOCK);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         // Ruby text does not support float or position. This might change with evolution of the specification.
</span><span class="cx">         if (e &amp;&amp; e-&gt;hasTagName(rtTag)) {
</span><del>-            style-&gt;setPosition(StaticPosition);
-            style-&gt;setFloating(NoFloat);
</del><ins>+            style.setPosition(StaticPosition);
+            style.setFloating(NoFloat);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         // FIXME: We shouldn't be overriding start/-webkit-auto like this. Do it in html.css instead.
</span><span class="cx">         // Table headers with a text-align of -webkit-auto will change the text-align to center.
</span><del>-        if (e &amp;&amp; e-&gt;hasTagName(thTag) &amp;&amp; style-&gt;textAlign() == TASTART)
-            style-&gt;setTextAlign(CENTER);
</del><ins>+        if (e &amp;&amp; e-&gt;hasTagName(thTag) &amp;&amp; style.textAlign() == TASTART)
+            style.setTextAlign(CENTER);
</ins><span class="cx"> 
</span><span class="cx">         if (e &amp;&amp; e-&gt;hasTagName(legendTag))
</span><del>-            style-&gt;setDisplay(BLOCK);
</del><ins>+            style.setDisplay(BLOCK);
</ins><span class="cx"> 
</span><span class="cx">         // Absolute/fixed positioned elements, floating elements and the document element need block-like outside display.
</span><del>-        if (style-&gt;hasOutOfFlowPosition() || style-&gt;isFloating() || (e &amp;&amp; e-&gt;document().documentElement() == e))
-            style-&gt;setDisplay(equivalentBlockDisplay(style-&gt;display(), style-&gt;isFloating(), !document().inQuirksMode()));
</del><ins>+        if (style.hasOutOfFlowPosition() || style.isFloating() || (e &amp;&amp; e-&gt;document().documentElement() == e))
+            style.setDisplay(equivalentBlockDisplay(style.display(), style.isFloating(), !document().inQuirksMode()));
</ins><span class="cx"> 
</span><span class="cx">         // FIXME: Don't support this mutation for pseudo styles like first-letter or first-line, since it's not completely
</span><span class="cx">         // clear how that should work.
</span><del>-        if (style-&gt;display() == INLINE &amp;&amp; style-&gt;styleType() == NOPSEUDO &amp;&amp; style-&gt;writingMode() != parentStyle-&gt;writingMode())
-            style-&gt;setDisplay(INLINE_BLOCK);
</del><ins>+        if (style.display() == INLINE &amp;&amp; style.styleType() == NOPSEUDO &amp;&amp; style.writingMode() != parentStyle.writingMode())
+            style.setDisplay(INLINE_BLOCK);
</ins><span class="cx"> 
</span><span class="cx">         // After performing the display mutation, check table rows. We do not honor position:relative or position:sticky on
</span><span class="cx">         // table rows or cells. This has been established for position:relative in CSS2.1 (and caused a crash in containingBlock()
</span><span class="cx">         // on some sites).
</span><del>-        if ((style-&gt;display() == TABLE_HEADER_GROUP || style-&gt;display() == TABLE_ROW_GROUP
-            || style-&gt;display() == TABLE_FOOTER_GROUP || style-&gt;display() == TABLE_ROW)
-            &amp;&amp; style-&gt;hasInFlowPosition())
-            style-&gt;setPosition(StaticPosition);
</del><ins>+        if ((style.display() == TABLE_HEADER_GROUP || style.display() == TABLE_ROW_GROUP
+            || style.display() == TABLE_FOOTER_GROUP || style.display() == TABLE_ROW)
+            &amp;&amp; style.hasInFlowPosition())
+            style.setPosition(StaticPosition);
</ins><span class="cx"> 
</span><span class="cx">         // writing-mode does not apply to table row groups, table column groups, table rows, and table columns.
</span><span class="cx">         // FIXME: Table cells should be allowed to be perpendicular or flipped with respect to the table, though.
</span><del>-        if (style-&gt;display() == TABLE_COLUMN || style-&gt;display() == TABLE_COLUMN_GROUP || style-&gt;display() == TABLE_FOOTER_GROUP
-            || style-&gt;display() == TABLE_HEADER_GROUP || style-&gt;display() == TABLE_ROW || style-&gt;display() == TABLE_ROW_GROUP
-            || style-&gt;display() == TABLE_CELL)
-            style-&gt;setWritingMode(parentStyle-&gt;writingMode());
</del><ins>+        if (style.display() == TABLE_COLUMN || style.display() == TABLE_COLUMN_GROUP || style.display() == TABLE_FOOTER_GROUP
+            || style.display() == TABLE_HEADER_GROUP || style.display() == TABLE_ROW || style.display() == TABLE_ROW_GROUP
+            || style.display() == TABLE_CELL)
+            style.setWritingMode(parentStyle.writingMode());
</ins><span class="cx"> 
</span><span class="cx">         // FIXME: Since we don't support block-flow on flexible boxes yet, disallow setting
</span><span class="cx">         // of block-flow to anything other than TopToBottomWritingMode.
</span><span class="cx">         // https://bugs.webkit.org/show_bug.cgi?id=46418 - Flexible box support.
</span><del>-        if (style-&gt;writingMode() != TopToBottomWritingMode &amp;&amp; (style-&gt;display() == BOX || style-&gt;display() == INLINE_BOX))
-            style-&gt;setWritingMode(TopToBottomWritingMode);
</del><ins>+        if (style.writingMode() != TopToBottomWritingMode &amp;&amp; (style.display() == BOX || style.display() == INLINE_BOX))
+            style.setWritingMode(TopToBottomWritingMode);
</ins><span class="cx"> 
</span><del>-        if (isDisplayFlexibleBox(parentStyle-&gt;display())) {
-            style-&gt;setFloating(NoFloat);
-            style-&gt;setDisplay(equivalentBlockDisplay(style-&gt;display(), style-&gt;isFloating(), !document().inQuirksMode()));
</del><ins>+        if (isDisplayFlexibleBox(parentStyle.display())) {
+            style.setFloating(NoFloat);
+            style.setDisplay(equivalentBlockDisplay(style.display(), style.isFloating(), !document().inQuirksMode()));
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // Make sure our z-index value is only applied if the object is positioned.
</span><del>-    if (style-&gt;position() == StaticPosition &amp;&amp; !isDisplayFlexibleBox(parentStyle-&gt;display()))
-        style-&gt;setHasAutoZIndex();
</del><ins>+    if (style.position() == StaticPosition &amp;&amp; !isDisplayFlexibleBox(parentStyle.display()))
+        style.setHasAutoZIndex();
</ins><span class="cx"> 
</span><span class="cx">     // Auto z-index becomes 0 for the root element and transparent objects. This prevents
</span><span class="cx">     // cases where objects that should be blended as a single unit end up with a non-transparent
</span><span class="cx">     // object wedged in between them. Auto z-index also becomes 0 for objects that specify transforms/masks/reflections.
</span><del>-    if (style-&gt;hasAutoZIndex() &amp;&amp; ((e &amp;&amp; e-&gt;document().documentElement() == e)
-        || style-&gt;opacity() &lt; 1.0f
-        || style-&gt;hasTransformRelatedProperty()
-        || style-&gt;hasMask()
-        || style-&gt;clipPath()
-        || style-&gt;boxReflect()
-        || style-&gt;hasFilter()
-        || style-&gt;hasBlendMode()
-        || style-&gt;position() == StickyPosition
-        || (style-&gt;position() == FixedPosition &amp;&amp; e &amp;&amp; e-&gt;document().page() &amp;&amp; e-&gt;document().page()-&gt;settings().fixedPositionCreatesStackingContext())
-        || style-&gt;hasFlowFrom()
</del><ins>+    if (style.hasAutoZIndex() &amp;&amp; ((e &amp;&amp; e-&gt;document().documentElement() == e)
+        || style.opacity() &lt; 1.0f
+        || style.hasTransformRelatedProperty()
+        || style.hasMask()
+        || style.clipPath()
+        || style.boxReflect()
+        || style.hasFilter()
+        || style.hasBlendMode()
+        || style.position() == StickyPosition
+        || (style.position() == FixedPosition &amp;&amp; e &amp;&amp; e-&gt;document().page() &amp;&amp; e-&gt;document().page()-&gt;settings().fixedPositionCreatesStackingContext())
+        || style.hasFlowFrom()
</ins><span class="cx">         ))
</span><del>-        style-&gt;setZIndex(0);
</del><ins>+        style.setZIndex(0);
</ins><span class="cx"> 
</span><span class="cx">     // Textarea considers overflow visible as auto.
</span><span class="cx">     if (e &amp;&amp; isHTMLTextAreaElement(e)) {
</span><del>-        style-&gt;setOverflowX(style-&gt;overflowX() == OVISIBLE ? OAUTO : style-&gt;overflowX());
-        style-&gt;setOverflowY(style-&gt;overflowY() == OVISIBLE ? OAUTO : style-&gt;overflowY());
</del><ins>+        style.setOverflowX(style.overflowX() == OVISIBLE ? OAUTO : style.overflowX());
+        style.setOverflowY(style.overflowY() == OVISIBLE ? OAUTO : style.overflowY());
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (doesNotInheritTextDecoration(style, e))
</span><del>-        style-&gt;setTextDecorationsInEffect(style-&gt;textDecoration());
</del><ins>+        style.setTextDecorationsInEffect(style.textDecoration());
</ins><span class="cx">     else
</span><del>-        style-&gt;addToTextDecorationsInEffect(style-&gt;textDecoration());
</del><ins>+        style.addToTextDecorationsInEffect(style.textDecoration());
</ins><span class="cx"> 
</span><span class="cx">     // If either overflow value is not visible, change to auto.
</span><del>-    if (style-&gt;overflowX() == OMARQUEE &amp;&amp; style-&gt;overflowY() != OMARQUEE)
-        style-&gt;setOverflowY(OMARQUEE);
-    else if (style-&gt;overflowY() == OMARQUEE &amp;&amp; style-&gt;overflowX() != OMARQUEE)
-        style-&gt;setOverflowX(OMARQUEE);
-    else if (style-&gt;overflowX() == OVISIBLE &amp;&amp; style-&gt;overflowY() != OVISIBLE) {
</del><ins>+    if (style.overflowX() == OMARQUEE &amp;&amp; style.overflowY() != OMARQUEE)
+        style.setOverflowY(OMARQUEE);
+    else if (style.overflowY() == OMARQUEE &amp;&amp; style.overflowX() != OMARQUEE)
+        style.setOverflowX(OMARQUEE);
+    else if (style.overflowX() == OVISIBLE &amp;&amp; style.overflowY() != OVISIBLE) {
</ins><span class="cx">         // FIXME: Once we implement pagination controls, overflow-x should default to hidden
</span><span class="cx">         // if overflow-y is set to -webkit-paged-x or -webkit-page-y. For now, we'll let it
</span><span class="cx">         // default to auto so we can at least scroll through the pages.
</span><del>-        style-&gt;setOverflowX(OAUTO);
-    } else if (style-&gt;overflowY() == OVISIBLE &amp;&amp; style-&gt;overflowX() != OVISIBLE)
-        style-&gt;setOverflowY(OAUTO);
</del><ins>+        style.setOverflowX(OAUTO);
+    } else if (style.overflowY() == OVISIBLE &amp;&amp; style.overflowX() != OVISIBLE)
+        style.setOverflowY(OAUTO);
</ins><span class="cx"> 
</span><span class="cx">     // Call setStylesForPaginationMode() if a pagination mode is set for any non-root elements. If these
</span><span class="cx">     // styles are specified on a root element, then they will be incorporated in
</span><span class="cx">     // Style::createForDocument().
</span><del>-    if ((style-&gt;overflowY() == OPAGEDX || style-&gt;overflowY() == OPAGEDY) &amp;&amp; !(e &amp;&amp; (e-&gt;hasTagName(htmlTag) || e-&gt;hasTagName(bodyTag))))
-        style-&gt;setColumnStylesFromPaginationMode(WebCore::paginationModeForRenderStyle(style));
</del><ins>+    if ((style.overflowY() == OPAGEDX || style.overflowY() == OPAGEDY) &amp;&amp; !(e &amp;&amp; (e-&gt;hasTagName(htmlTag) || e-&gt;hasTagName(bodyTag))))
+        style.setColumnStylesFromPaginationMode(WebCore::paginationModeForRenderStyle(style));
</ins><span class="cx"> 
</span><span class="cx">     // Table rows, sections and the table itself will support overflow:hidden and will ignore scroll/auto.
</span><span class="cx">     // FIXME: Eventually table sections will support auto and scroll.
</span><del>-    if (style-&gt;display() == TABLE || style-&gt;display() == INLINE_TABLE
-        || style-&gt;display() == TABLE_ROW_GROUP || style-&gt;display() == TABLE_ROW) {
-        if (style-&gt;overflowX() != OVISIBLE &amp;&amp; style-&gt;overflowX() != OHIDDEN)
-            style-&gt;setOverflowX(OVISIBLE);
-        if (style-&gt;overflowY() != OVISIBLE &amp;&amp; style-&gt;overflowY() != OHIDDEN)
-            style-&gt;setOverflowY(OVISIBLE);
</del><ins>+    if (style.display() == TABLE || style.display() == INLINE_TABLE
+        || style.display() == TABLE_ROW_GROUP || style.display() == TABLE_ROW) {
+        if (style.overflowX() != OVISIBLE &amp;&amp; style.overflowX() != OHIDDEN)
+            style.setOverflowX(OVISIBLE);
+        if (style.overflowY() != OVISIBLE &amp;&amp; style.overflowY() != OHIDDEN)
+            style.setOverflowY(OVISIBLE);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // Menulists should have visible overflow
</span><del>-    if (style-&gt;appearance() == MenulistPart) {
-        style-&gt;setOverflowX(OVISIBLE);
-        style-&gt;setOverflowY(OVISIBLE);
</del><ins>+    if (style.appearance() == MenulistPart) {
+        style.setOverflowX(OVISIBLE);
+        style.setOverflowY(OVISIBLE);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(ACCELERATED_OVERFLOW_SCROLLING)
</span><span class="cx">     // Touch overflow scrolling creates a stacking context.
</span><del>-    if (style-&gt;hasAutoZIndex() &amp;&amp; style-&gt;useTouchOverflowScrolling() &amp;&amp; (isScrollableOverflow(style-&gt;overflowX()) || isScrollableOverflow(style-&gt;overflowY())))
-        style-&gt;setZIndex(0);
</del><ins>+    if (style.hasAutoZIndex() &amp;&amp; style.useTouchOverflowScrolling() &amp;&amp; (isScrollableOverflow(style.overflowX()) || isScrollableOverflow(style.overflowY())))
+        style.setZIndex(0);
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     // Cull out any useless layers and also repeat patterns into additional layers.
</span><del>-    style-&gt;adjustBackgroundLayers();
-    style-&gt;adjustMaskLayers();
</del><ins>+    style.adjustBackgroundLayers();
+    style.adjustMaskLayers();
</ins><span class="cx"> 
</span><span class="cx">     // Do the same for animations and transitions.
</span><del>-    style-&gt;adjustAnimations();
-    style-&gt;adjustTransitions();
</del><ins>+    style.adjustAnimations();
+    style.adjustTransitions();
</ins><span class="cx"> 
</span><span class="cx">     // Important: Intrinsic margins get added to controls before the theme has adjusted the style, since the theme will
</span><span class="cx">     // alter fonts and heights/widths.
</span><del>-    if (e &amp;&amp; e-&gt;isFormControlElement() &amp;&amp; style-&gt;fontSize() &gt;= 11) {
</del><ins>+    if (e &amp;&amp; e-&gt;isFormControlElement() &amp;&amp; style.fontSize() &gt;= 11) {
</ins><span class="cx">         // Don't apply intrinsic margins to image buttons. The designer knows how big the images are,
</span><span class="cx">         // so we have to treat all image buttons as though they were explicitly sized.
</span><span class="cx">         if (!isHTMLInputElement(e) || !toHTMLInputElement(e)-&gt;isImageButton())
</span><span class="lines">@@ -1339,74 +1337,74 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // Let the theme also have a crack at adjusting the style.
</span><del>-    if (style-&gt;hasAppearance())
-        RenderTheme::defaultTheme()-&gt;adjustStyle(this, style, e, m_state.hasUAAppearance(), m_state.borderData(), m_state.backgroundData(), m_state.backgroundColor());
</del><ins>+    if (style.hasAppearance())
+        RenderTheme::defaultTheme()-&gt;adjustStyle(*this, style, e, m_state.hasUAAppearance(), m_state.borderData(), m_state.backgroundData(), m_state.backgroundColor());
</ins><span class="cx"> 
</span><span class="cx">     // If we have first-letter pseudo style, do not share this style.
</span><del>-    if (style-&gt;hasPseudoStyle(FIRST_LETTER))
-        style-&gt;setUnique();
</del><ins>+    if (style.hasPseudoStyle(FIRST_LETTER))
+        style.setUnique();
</ins><span class="cx"> 
</span><span class="cx">     // FIXME: when dropping the -webkit prefix on transform-style, we should also have opacity &lt; 1 cause flattening.
</span><del>-    if (style-&gt;preserves3D() &amp;&amp; (style-&gt;overflowX() != OVISIBLE
-        || style-&gt;overflowY() != OVISIBLE
-        || style-&gt;hasFilter()))
-        style-&gt;setTransformStyle3D(TransformStyle3DFlat);
</del><ins>+    if (style.preserves3D() &amp;&amp; (style.overflowX() != OVISIBLE
+        || style.overflowY() != OVISIBLE
+        || style.hasFilter()))
+        style.setTransformStyle3D(TransformStyle3DFlat);
</ins><span class="cx"> 
</span><span class="cx">     // Seamless iframes behave like blocks. Map their display to inline-block when marked inline.
</span><del>-    if (e &amp;&amp; e-&gt;hasTagName(iframeTag) &amp;&amp; style-&gt;display() == INLINE &amp;&amp; toHTMLIFrameElement(e)-&gt;shouldDisplaySeamlessly())
-        style-&gt;setDisplay(INLINE_BLOCK);
</del><ins>+    if (e &amp;&amp; e-&gt;hasTagName(iframeTag) &amp;&amp; style.display() == INLINE &amp;&amp; toHTMLIFrameElement(e)-&gt;shouldDisplaySeamlessly())
+        style.setDisplay(INLINE_BLOCK);
</ins><span class="cx"> 
</span><span class="cx">     adjustGridItemPosition(style, parentStyle);
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(SVG)
</span><span class="cx">     if (e &amp;&amp; e-&gt;isSVGElement()) {
</span><span class="cx">         // Spec: http://www.w3.org/TR/SVG/masking.html#OverflowProperty
</span><del>-        if (style-&gt;overflowY() == OSCROLL)
-            style-&gt;setOverflowY(OHIDDEN);
-        else if (style-&gt;overflowY() == OAUTO)
-            style-&gt;setOverflowY(OVISIBLE);
</del><ins>+        if (style.overflowY() == OSCROLL)
+            style.setOverflowY(OHIDDEN);
+        else if (style.overflowY() == OAUTO)
+            style.setOverflowY(OVISIBLE);
</ins><span class="cx"> 
</span><del>-        if (style-&gt;overflowX() == OSCROLL)
-            style-&gt;setOverflowX(OHIDDEN);
-        else if (style-&gt;overflowX() == OAUTO)
-            style-&gt;setOverflowX(OVISIBLE);
</del><ins>+        if (style.overflowX() == OSCROLL)
+            style.setOverflowX(OHIDDEN);
+        else if (style.overflowX() == OAUTO)
+            style.setOverflowX(OVISIBLE);
</ins><span class="cx"> 
</span><span class="cx">         // Only the root &lt;svg&gt; element in an SVG document fragment tree honors css position
</span><span class="cx">         if (!(e-&gt;hasTagName(SVGNames::svgTag) &amp;&amp; e-&gt;parentNode() &amp;&amp; !e-&gt;parentNode()-&gt;isSVGElement()))
</span><del>-            style-&gt;setPosition(RenderStyle::initialPosition());
</del><ins>+            style.setPosition(RenderStyle::initialPosition());
</ins><span class="cx"> 
</span><span class="cx">         // RenderSVGRoot handles zooming for the whole SVG subtree, so foreignObject content should
</span><span class="cx">         // not be scaled again.
</span><span class="cx">         if (e-&gt;hasTagName(SVGNames::foreignObjectTag))
</span><del>-            style-&gt;setEffectiveZoom(RenderStyle::initialZoom());
</del><ins>+            style.setEffectiveZoom(RenderStyle::initialZoom());
</ins><span class="cx">     }
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void StyleResolver::adjustGridItemPosition(RenderStyle* style, RenderStyle* parentStyle) const
</del><ins>+void StyleResolver::adjustGridItemPosition(RenderStyle&amp; style, const RenderStyle&amp; parentStyle) const
</ins><span class="cx"> {
</span><del>-    const GridPosition&amp; columnStartPosition = style-&gt;gridItemColumnStart();
-    const GridPosition&amp; columnEndPosition = style-&gt;gridItemColumnEnd();
-    const GridPosition&amp; rowStartPosition = style-&gt;gridItemRowStart();
-    const GridPosition&amp; rowEndPosition = style-&gt;gridItemRowEnd();
</del><ins>+    const GridPosition&amp; columnStartPosition = style.gridItemColumnStart();
+    const GridPosition&amp; columnEndPosition = style.gridItemColumnEnd();
+    const GridPosition&amp; rowStartPosition = style.gridItemRowStart();
+    const GridPosition&amp; rowEndPosition = style.gridItemRowEnd();
</ins><span class="cx"> 
</span><span class="cx">     // If opposing grid-placement properties both specify a grid span, they both compute to ‘auto’.
</span><span class="cx">     if (columnStartPosition.isSpan() &amp;&amp; columnEndPosition.isSpan()) {
</span><del>-        style-&gt;setGridItemColumnStart(GridPosition());
-        style-&gt;setGridItemColumnEnd(GridPosition());
</del><ins>+        style.setGridItemColumnStart(GridPosition());
+        style.setGridItemColumnEnd(GridPosition());
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (rowStartPosition.isSpan() &amp;&amp; rowEndPosition.isSpan()) {
</span><del>-        style-&gt;setGridItemRowStart(GridPosition());
-        style-&gt;setGridItemRowEnd(GridPosition());
</del><ins>+        style.setGridItemRowStart(GridPosition());
+        style.setGridItemRowEnd(GridPosition());
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // Unknown named grid area compute to 'auto'.
</span><del>-    const NamedGridAreaMap&amp; map = parentStyle-&gt;namedGridArea();
</del><ins>+    const NamedGridAreaMap&amp; map = parentStyle.namedGridArea();
</ins><span class="cx"> 
</span><span class="cx"> #define CLEAR_UNKNOWN_NAMED_AREA(prop, Prop) \
</span><span class="cx">     if (prop.isNamedGridArea() &amp;&amp; !map.contains(prop.namedGridLine())) \
</span><del>-        style-&gt;setGridItem##Prop(GridPosition());
</del><ins>+        style.setGridItem##Prop(GridPosition());
</ins><span class="cx"> 
</span><span class="cx">     CLEAR_UNKNOWN_NAMED_AREA(columnStartPosition, ColumnStart);
</span><span class="cx">     CLEAR_UNKNOWN_NAMED_AREA(columnEndPosition, ColumnEnd);
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleResolverh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleResolver.h (160538 => 160539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleResolver.h        2013-12-13 09:41:16 UTC (rev 160538)
+++ trunk/Source/WebCore/css/StyleResolver.h        2013-12-13 09:56:26 UTC (rev 160539)
</span><span class="lines">@@ -345,8 +345,8 @@
</span><span class="cx">     void checkForTextSizeAdjust(RenderStyle*);
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    void adjustRenderStyle(RenderStyle* styleToAdjust, RenderStyle* parentStyle, Element*);
-    void adjustGridItemPosition(RenderStyle* styleToAdjust, RenderStyle* parentStyle) const;
</del><ins>+    void adjustRenderStyle(RenderStyle&amp; styleToAdjust, const RenderStyle&amp; parentStyle, Element*);
+    void adjustGridItemPosition(RenderStyle&amp; styleToAdjust, const RenderStyle&amp; parentStyle) const;
</ins><span class="cx"> 
</span><span class="cx">     bool fastRejectSelector(const RuleData&amp;) const;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorepageFrameViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/FrameView.cpp (160538 => 160539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/FrameView.cpp        2013-12-13 09:41:16 UTC (rev 160538)
+++ trunk/Source/WebCore/page/FrameView.cpp        2013-12-13 09:56:26 UTC (rev 160539)
</span><span class="lines">@@ -141,15 +141,15 @@
</span><span class="cx">     return flags;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Pagination::Mode paginationModeForRenderStyle(RenderStyle* style)
</del><ins>+Pagination::Mode paginationModeForRenderStyle(const RenderStyle&amp; style)
</ins><span class="cx"> {
</span><del>-    EOverflow overflow = style-&gt;overflowY();
</del><ins>+    EOverflow overflow = style.overflowY();
</ins><span class="cx">     if (overflow != OPAGEDX &amp;&amp; overflow != OPAGEDY)
</span><span class="cx">         return Pagination::Unpaginated;
</span><span class="cx"> 
</span><del>-    bool isHorizontalWritingMode = style-&gt;isHorizontalWritingMode();
-    TextDirection textDirection = style-&gt;direction();
-    WritingMode writingMode = style-&gt;writingMode();
</del><ins>+    bool isHorizontalWritingMode = style.isHorizontalWritingMode();
+    TextDirection textDirection = style.direction();
+    WritingMode writingMode = style.writingMode();
</ins><span class="cx"> 
</span><span class="cx">     // paged-x always corresponds to LeftToRightPaginated or RightToLeftPaginated. If the WritingMode
</span><span class="cx">     // is horizontal, then we use TextDirection to choose between those options. If the WritingMode
</span><span class="lines">@@ -673,7 +673,7 @@
</span><span class="cx"> 
</span><span class="cx">     EOverflow overflowY = documentOrBodyRenderer-&gt;style().overflowY();
</span><span class="cx">     if (overflowY == OPAGEDX || overflowY == OPAGEDY) {
</span><del>-        pagination.mode = WebCore::paginationModeForRenderStyle(&amp;documentOrBodyRenderer-&gt;style());
</del><ins>+        pagination.mode = WebCore::paginationModeForRenderStyle(documentOrBodyRenderer-&gt;style());
</ins><span class="cx">         pagination.gap = static_cast&lt;unsigned&gt;(documentOrBodyRenderer-&gt;style().columnGap());
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorepageFrameViewh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/FrameView.h (160538 => 160539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/FrameView.h        2013-12-13 09:41:16 UTC (rev 160538)
+++ trunk/Source/WebCore/page/FrameView.h        2013-12-13 09:56:26 UTC (rev 160539)
</span><span class="lines">@@ -58,7 +58,7 @@
</span><span class="cx"> class RenderView;
</span><span class="cx"> class RenderWidget;
</span><span class="cx"> 
</span><del>-Pagination::Mode paginationModeForRenderStyle(RenderStyle*);
</del><ins>+Pagination::Mode paginationModeForRenderStyle(const RenderStyle&amp;);
</ins><span class="cx"> 
</span><span class="cx"> typedef unsigned long long DOMTimeStamp;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderThemecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderTheme.cpp (160538 => 160539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderTheme.cpp        2013-12-13 09:41:16 UTC (rev 160538)
+++ trunk/Source/WebCore/rendering/RenderTheme.cpp        2013-12-13 09:56:26 UTC (rev 160539)
</span><span class="lines">@@ -80,31 +80,31 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RenderTheme::adjustStyle(StyleResolver* styleResolver, RenderStyle* style, Element* e, bool UAHasAppearance, const BorderData&amp; border, const FillLayer&amp; background, const Color&amp; backgroundColor)
</del><ins>+void RenderTheme::adjustStyle(StyleResolver&amp; styleResolver, RenderStyle&amp; style, Element* e, bool UAHasAppearance, const BorderData&amp; border, const FillLayer&amp; background, const Color&amp; backgroundColor)
</ins><span class="cx"> {
</span><span class="cx">     // Force inline and table display styles to be inline-block (except for table- which is block)
</span><del>-    ControlPart part = style-&gt;appearance();
-    if (style-&gt;display() == INLINE || style-&gt;display() == INLINE_TABLE || style-&gt;display() == TABLE_ROW_GROUP
-        || style-&gt;display() == TABLE_HEADER_GROUP || style-&gt;display() == TABLE_FOOTER_GROUP
-        || style-&gt;display() == TABLE_ROW || style-&gt;display() == TABLE_COLUMN_GROUP || style-&gt;display() == TABLE_COLUMN
-        || style-&gt;display() == TABLE_CELL || style-&gt;display() == TABLE_CAPTION)
-        style-&gt;setDisplay(INLINE_BLOCK);
-    else if (style-&gt;display() == COMPACT || style-&gt;display() == RUN_IN || style-&gt;display() == LIST_ITEM || style-&gt;display() == TABLE)
-        style-&gt;setDisplay(BLOCK);
</del><ins>+    ControlPart part = style.appearance();
+    if (style.display() == INLINE || style.display() == INLINE_TABLE || style.display() == TABLE_ROW_GROUP
+        || style.display() == TABLE_HEADER_GROUP || style.display() == TABLE_FOOTER_GROUP
+        || style.display() == TABLE_ROW || style.display() == TABLE_COLUMN_GROUP || style.display() == TABLE_COLUMN
+        || style.display() == TABLE_CELL || style.display() == TABLE_CAPTION)
+        style.setDisplay(INLINE_BLOCK);
+    else if (style.display() == COMPACT || style.display() == RUN_IN || style.display() == LIST_ITEM || style.display() == TABLE)
+        style.setDisplay(BLOCK);
</ins><span class="cx"> 
</span><del>-    if (UAHasAppearance &amp;&amp; isControlStyled(style, border, background, backgroundColor)) {
</del><ins>+    if (UAHasAppearance &amp;&amp; isControlStyled(&amp;style, border, background, backgroundColor)) {
</ins><span class="cx">         if (part == MenulistPart) {
</span><del>-            style-&gt;setAppearance(MenulistButtonPart);
</del><ins>+            style.setAppearance(MenulistButtonPart);
</ins><span class="cx">             part = MenulistButtonPart;
</span><span class="cx">         } else
</span><del>-            style-&gt;setAppearance(NoControlPart);
</del><ins>+            style.setAppearance(NoControlPart);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (!style-&gt;hasAppearance())
</del><ins>+    if (!style.hasAppearance())
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     // Never support box-shadow on native controls.
</span><del>-    style-&gt;setBoxShadow(nullptr);
</del><ins>+    style.setBoxShadow(nullptr);
</ins><span class="cx">     
</span><span class="cx"> #if USE(NEW_THEME)
</span><span class="cx">     switch (part) {
</span><span class="lines">@@ -116,69 +116,69 @@
</span><span class="cx">     case DefaultButtonPart:
</span><span class="cx">     case ButtonPart: {
</span><span class="cx">         // Border
</span><del>-        LengthBox borderBox(style-&gt;borderTopWidth(), style-&gt;borderRightWidth(), style-&gt;borderBottomWidth(), style-&gt;borderLeftWidth());
-        borderBox = m_theme-&gt;controlBorder(part, style-&gt;font(), borderBox, style-&gt;effectiveZoom());
-        if (borderBox.top().value() != static_cast&lt;int&gt;(style-&gt;borderTopWidth())) {
</del><ins>+        LengthBox borderBox(style.borderTopWidth(), style.borderRightWidth(), style.borderBottomWidth(), style.borderLeftWidth());
+        borderBox = m_theme-&gt;controlBorder(part, style.font(), borderBox, style.effectiveZoom());
+        if (borderBox.top().value() != static_cast&lt;int&gt;(style.borderTopWidth())) {
</ins><span class="cx">             if (borderBox.top().value())
</span><del>-                style-&gt;setBorderTopWidth(borderBox.top().value());
</del><ins>+                style.setBorderTopWidth(borderBox.top().value());
</ins><span class="cx">             else
</span><del>-                style-&gt;resetBorderTop();
</del><ins>+                style.resetBorderTop();
</ins><span class="cx">         }
</span><del>-        if (borderBox.right().value() != static_cast&lt;int&gt;(style-&gt;borderRightWidth())) {
</del><ins>+        if (borderBox.right().value() != static_cast&lt;int&gt;(style.borderRightWidth())) {
</ins><span class="cx">             if (borderBox.right().value())
</span><del>-                style-&gt;setBorderRightWidth(borderBox.right().value());
</del><ins>+                style.setBorderRightWidth(borderBox.right().value());
</ins><span class="cx">             else
</span><del>-                style-&gt;resetBorderRight();
</del><ins>+                style.resetBorderRight();
</ins><span class="cx">         }
</span><del>-        if (borderBox.bottom().value() != static_cast&lt;int&gt;(style-&gt;borderBottomWidth())) {
-            style-&gt;setBorderBottomWidth(borderBox.bottom().value());
</del><ins>+        if (borderBox.bottom().value() != static_cast&lt;int&gt;(style.borderBottomWidth())) {
+            style.setBorderBottomWidth(borderBox.bottom().value());
</ins><span class="cx">             if (borderBox.bottom().value())
</span><del>-                style-&gt;setBorderBottomWidth(borderBox.bottom().value());
</del><ins>+                style.setBorderBottomWidth(borderBox.bottom().value());
</ins><span class="cx">             else
</span><del>-                style-&gt;resetBorderBottom();
</del><ins>+                style.resetBorderBottom();
</ins><span class="cx">         }
</span><del>-        if (borderBox.left().value() != static_cast&lt;int&gt;(style-&gt;borderLeftWidth())) {
-            style-&gt;setBorderLeftWidth(borderBox.left().value());
</del><ins>+        if (borderBox.left().value() != static_cast&lt;int&gt;(style.borderLeftWidth())) {
+            style.setBorderLeftWidth(borderBox.left().value());
</ins><span class="cx">             if (borderBox.left().value())
</span><del>-                style-&gt;setBorderLeftWidth(borderBox.left().value());
</del><ins>+                style.setBorderLeftWidth(borderBox.left().value());
</ins><span class="cx">             else
</span><del>-                style-&gt;resetBorderLeft();
</del><ins>+                style.resetBorderLeft();
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         // Padding
</span><del>-        LengthBox paddingBox = m_theme-&gt;controlPadding(part, style-&gt;font(), style-&gt;paddingBox(), style-&gt;effectiveZoom());
-        if (paddingBox != style-&gt;paddingBox())
-            style-&gt;setPaddingBox(paddingBox);
</del><ins>+        LengthBox paddingBox = m_theme-&gt;controlPadding(part, style.font(), style.paddingBox(), style.effectiveZoom());
+        if (paddingBox != style.paddingBox())
+            style.setPaddingBox(paddingBox);
</ins><span class="cx"> 
</span><span class="cx">         // Whitespace
</span><span class="cx">         if (m_theme-&gt;controlRequiresPreWhiteSpace(part))
</span><del>-            style-&gt;setWhiteSpace(PRE);
</del><ins>+            style.setWhiteSpace(PRE);
</ins><span class="cx">             
</span><span class="cx">         // Width / Height
</span><span class="cx">         // The width and height here are affected by the zoom.
</span><span class="cx">         // FIXME: Check is flawed, since it doesn't take min-width/max-width into account.
</span><del>-        LengthSize controlSize = m_theme-&gt;controlSize(part, style-&gt;font(), LengthSize(style-&gt;width(), style-&gt;height()), style-&gt;effectiveZoom());
-        if (controlSize.width() != style-&gt;width())
-            style-&gt;setWidth(controlSize.width());
-        if (controlSize.height() != style-&gt;height())
-            style-&gt;setHeight(controlSize.height());
</del><ins>+        LengthSize controlSize = m_theme-&gt;controlSize(part, style.font(), LengthSize(style.width(), style.height()), style.effectiveZoom());
+        if (controlSize.width() != style.width())
+            style.setWidth(controlSize.width());
+        if (controlSize.height() != style.height())
+            style.setHeight(controlSize.height());
</ins><span class="cx">                 
</span><span class="cx">         // Min-Width / Min-Height
</span><del>-        LengthSize minControlSize = m_theme-&gt;minimumControlSize(part, style-&gt;font(), style-&gt;effectiveZoom());
-        if (minControlSize.width() != style-&gt;minWidth())
-            style-&gt;setMinWidth(minControlSize.width());
-        if (minControlSize.height() != style-&gt;minHeight())
-            style-&gt;setMinHeight(minControlSize.height());
</del><ins>+        LengthSize minControlSize = m_theme-&gt;minimumControlSize(part, style.font(), style.effectiveZoom());
+        if (minControlSize.width() != style.minWidth())
+            style.setMinWidth(minControlSize.width());
+        if (minControlSize.height() != style.minHeight())
+            style.setMinHeight(minControlSize.height());
</ins><span class="cx">                 
</span><span class="cx">         // Font
</span><del>-        FontDescription controlFont = m_theme-&gt;controlFont(part, style-&gt;font(), style-&gt;effectiveZoom());
-        if (controlFont != style-&gt;font().fontDescription()) {
</del><ins>+        FontDescription controlFont = m_theme-&gt;controlFont(part, style.font(), style.effectiveZoom());
+        if (controlFont != style.font().fontDescription()) {
</ins><span class="cx">             // Reset our line-height
</span><del>-            style-&gt;setLineHeight(RenderStyle::initialLineHeight());
</del><ins>+            style.setLineHeight(RenderStyle::initialLineHeight());
</ins><span class="cx"> 
</span><span class="cx">             // Now update our font.
</span><del>-            if (style-&gt;setFontDescription(controlFont))
-                style-&gt;font().update(0);
</del><ins>+            if (style.setFontDescription(controlFont))
+                style.font().update(0);
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx">     default:
</span><span class="lines">@@ -187,28 +187,28 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     // Call the appropriate style adjustment method based off the appearance value.
</span><del>-    switch (style-&gt;appearance()) {
</del><ins>+    switch (style.appearance()) {
</ins><span class="cx"> #if !USE(NEW_THEME)
</span><span class="cx">     case CheckboxPart:
</span><del>-        return adjustCheckboxStyle(styleResolver, style, e);
</del><ins>+        return adjustCheckboxStyle(&amp;styleResolver, &amp;style, e);
</ins><span class="cx">     case RadioPart:
</span><del>-        return adjustRadioStyle(styleResolver, style, e);
</del><ins>+        return adjustRadioStyle(&amp;styleResolver, &amp;style, e);
</ins><span class="cx">     case PushButtonPart:
</span><span class="cx">     case SquareButtonPart:
</span><span class="cx">     case DefaultButtonPart:
</span><span class="cx">     case ButtonPart:
</span><del>-        return adjustButtonStyle(styleResolver, style, e);
</del><ins>+        return adjustButtonStyle(&amp;styleResolver, &amp;style, e);
</ins><span class="cx">     case InnerSpinButtonPart:
</span><del>-        return adjustInnerSpinButtonStyle(styleResolver, style, e);
</del><ins>+        return adjustInnerSpinButtonStyle(&amp;styleResolver, &amp;style, e);
</ins><span class="cx"> #endif
</span><span class="cx">     case TextFieldPart:
</span><del>-        return adjustTextFieldStyle(styleResolver, style, e);
</del><ins>+        return adjustTextFieldStyle(&amp;styleResolver, &amp;style, e);
</ins><span class="cx">     case TextAreaPart:
</span><del>-        return adjustTextAreaStyle(styleResolver, style, e);
</del><ins>+        return adjustTextAreaStyle(&amp;styleResolver, &amp;style, e);
</ins><span class="cx">     case MenulistPart:
</span><del>-        return adjustMenuListStyle(styleResolver, style, e);
</del><ins>+        return adjustMenuListStyle(&amp;styleResolver, &amp;style, e);
</ins><span class="cx">     case MenulistButtonPart:
</span><del>-        return adjustMenuListButtonStyle(styleResolver, style, e);
</del><ins>+        return adjustMenuListButtonStyle(&amp;styleResolver, &amp;style, e);
</ins><span class="cx">     case MediaPlayButtonPart:
</span><span class="cx">     case MediaCurrentTimePart:
</span><span class="cx">     case MediaTimeRemainingPart:
</span><span class="lines">@@ -216,29 +216,29 @@
</span><span class="cx">     case MediaExitFullscreenButtonPart:
</span><span class="cx">     case MediaMuteButtonPart:
</span><span class="cx">     case MediaVolumeSliderContainerPart:
</span><del>-        return adjustMediaControlStyle(styleResolver, style, e);
</del><ins>+        return adjustMediaControlStyle(&amp;styleResolver, &amp;style, e);
</ins><span class="cx">     case MediaSliderPart:
</span><span class="cx">     case MediaVolumeSliderPart:
</span><span class="cx">     case MediaFullScreenVolumeSliderPart:
</span><span class="cx">     case SliderHorizontalPart:
</span><span class="cx">     case SliderVerticalPart:
</span><del>-        return adjustSliderTrackStyle(styleResolver, style, e);
</del><ins>+        return adjustSliderTrackStyle(&amp;styleResolver, &amp;style, e);
</ins><span class="cx">     case SliderThumbHorizontalPart:
</span><span class="cx">     case SliderThumbVerticalPart:
</span><del>-        return adjustSliderThumbStyle(styleResolver, style, e);
</del><ins>+        return adjustSliderThumbStyle(&amp;styleResolver, &amp;style, e);
</ins><span class="cx">     case SearchFieldPart:
</span><del>-        return adjustSearchFieldStyle(styleResolver, style, e);
</del><ins>+        return adjustSearchFieldStyle(&amp;styleResolver, &amp;style, e);
</ins><span class="cx">     case SearchFieldCancelButtonPart:
</span><del>-        return adjustSearchFieldCancelButtonStyle(styleResolver, style, e);
</del><ins>+        return adjustSearchFieldCancelButtonStyle(&amp;styleResolver, &amp;style, e);
</ins><span class="cx">     case SearchFieldDecorationPart:
</span><del>-        return adjustSearchFieldDecorationPartStyle(styleResolver, style, e);
</del><ins>+        return adjustSearchFieldDecorationPartStyle(&amp;styleResolver, &amp;style, e);
</ins><span class="cx">     case SearchFieldResultsDecorationPart:
</span><del>-        return adjustSearchFieldResultsDecorationPartStyle(styleResolver, style, e);
</del><ins>+        return adjustSearchFieldResultsDecorationPartStyle(&amp;styleResolver, &amp;style, e);
</ins><span class="cx">     case SearchFieldResultsButtonPart:
</span><del>-        return adjustSearchFieldResultsButtonStyle(styleResolver, style, e);
</del><ins>+        return adjustSearchFieldResultsButtonStyle(&amp;styleResolver, &amp;style, e);
</ins><span class="cx"> #if ENABLE(PROGRESS_ELEMENT)
</span><span class="cx">     case ProgressBarPart:
</span><del>-        return adjustProgressBarStyle(styleResolver, style, e);
</del><ins>+        return adjustProgressBarStyle(&amp;styleResolver, &amp;style, e);
</ins><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(METER_ELEMENT)
</span><span class="cx">     case MeterPart:
</span><span class="lines">@@ -246,11 +246,11 @@
</span><span class="cx">     case ContinuousCapacityLevelIndicatorPart:
</span><span class="cx">     case DiscreteCapacityLevelIndicatorPart:
</span><span class="cx">     case RatingLevelIndicatorPart:
</span><del>-        return adjustMeterStyle(styleResolver, style, e);
</del><ins>+        return adjustMeterStyle(&amp;styleResolver, &amp;style, e);
</ins><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(INPUT_SPEECH)
</span><span class="cx">     case InputSpeechButtonPart:
</span><del>-        return adjustInputFieldSpeechButtonStyle(styleResolver, style, e);
</del><ins>+        return adjustInputFieldSpeechButtonStyle(&amp;styleResolver, &amp;style, e);
</ins><span class="cx"> #endif
</span><span class="cx">     default:
</span><span class="cx">         break;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderThemeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderTheme.h (160538 => 160539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderTheme.h        2013-12-13 09:41:16 UTC (rev 160538)
+++ trunk/Source/WebCore/rendering/RenderTheme.h        2013-12-13 09:56:26 UTC (rev 160539)
</span><span class="lines">@@ -73,8 +73,7 @@
</span><span class="cx">     // metrics and defaults given the contents of the style.  This includes sophisticated operations like
</span><span class="cx">     // selection of control size based off the font, the disabling of appearance when certain other properties like
</span><span class="cx">     // &quot;border&quot; are set, or if the appearance is not supported by the theme.
</span><del>-    void adjustStyle(StyleResolver*, RenderStyle*, Element*,  bool UAHasAppearance,
-                     const BorderData&amp;, const FillLayer&amp;, const Color&amp; backgroundColor);
</del><ins>+    void adjustStyle(StyleResolver&amp;, RenderStyle&amp;, Element*,  bool UAHasAppearance, const BorderData&amp;, const FillLayer&amp;, const Color&amp; backgroundColor);
</ins><span class="cx"> 
</span><span class="cx">     // This method is called to paint the widget as a background of the RenderObject.  A widget's foreground, e.g., the
</span><span class="cx">     // text of a button, is always rendered by the engine itself.  The boolean return value indicates
</span></span></pre>
</div>
</div>

</body>
</html>