<!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.
<https://webkit.org/b/125623>
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 <akling@apple.com>
+
+ StyleResolver::adjustRenderStyle() should take RenderStyle references.
+ <https://webkit.org/b/125623>
+
+ 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 <darin@apple.com>
</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& style)
</ins><span class="cx"> {
</span><span class="cx"> // Intrinsic margin value.
</span><del>- const int intrinsicMargin = 2 * style->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 "quirk" to decide the margin wasn't set is kind of lame.
</span><del>- if (style->width().isIntrinsicOrAuto()) {
- if (style->marginLeft().quirk())
- style->setMarginLeft(Length(intrinsicMargin, Fixed));
- if (style->marginRight().quirk())
- style->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->height().isAuto()) {
- if (style->marginTop().quirk())
- style->setMarginTop(Length(intrinsicMargin, Fixed));
- if (style->marginBottom().quirk())
- style->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& style, Element* e)
</ins><span class="cx"> {
</span><del>- 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();
</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& style, const RenderStyle& parentStyle, Element *e)
</ins><span class="cx"> {
</span><del>- ASSERT(parentStyle);
-
</del><span class="cx"> // Cache our original display.
</span><del>- style->setOriginalDisplay(style->display());
</del><ins>+ style.setOriginalDisplay(style.display());
</ins><span class="cx">
</span><del>- if (style->display() != NONE) {
</del><ins>+ if (style.display() != NONE) {
</ins><span class="cx"> // If we have a <td> 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 <td>s and <table>s. In quirks mode we force
</span><span class="cx"> // these tags to retain their display types.
</span><span class="cx"> if (document().inQuirksMode() && e) {
</span><span class="cx"> if (e->hasTagName(tdTag)) {
</span><del>- style->setDisplay(TABLE_CELL);
- style->setFloating(NoFloat);
</del><ins>+ style.setDisplay(TABLE_CELL);
+ style.setFloating(NoFloat);
</ins><span class="cx"> } else if (isHTMLTableElement(e))
</span><del>- style->setDisplay(style->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 && (e->hasTagName(tdTag) || e->hasTagName(thTag))) {
</span><del>- if (style->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->width().isFixed())
- style->setWhiteSpace(NORMAL);
</del><ins>+ if (style.width().isFixed())
+ style.setWhiteSpace(NORMAL);
</ins><span class="cx"> else
</span><del>- style->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 && isHTMLTableElement(e) && (style->textAlign() == WEBKIT_LEFT || style->textAlign() == WEBKIT_CENTER || style->textAlign() == WEBKIT_RIGHT))
- style->setTextAlign(TASTART);
</del><ins>+ if (e && isHTMLTableElement(e) && (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 && (e->hasTagName(frameTag) || e->hasTagName(framesetTag))) {
</span><del>- style->setPosition(StaticPosition);
- style->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 && e->hasTagName(rtTag)) {
</span><del>- style->setPosition(StaticPosition);
- style->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 && e->hasTagName(thTag) && style->textAlign() == TASTART)
- style->setTextAlign(CENTER);
</del><ins>+ if (e && e->hasTagName(thTag) && style.textAlign() == TASTART)
+ style.setTextAlign(CENTER);
</ins><span class="cx">
</span><span class="cx"> if (e && e->hasTagName(legendTag))
</span><del>- style->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->hasOutOfFlowPosition() || style->isFloating() || (e && e->document().documentElement() == e))
- style->setDisplay(equivalentBlockDisplay(style->display(), style->isFloating(), !document().inQuirksMode()));
</del><ins>+ if (style.hasOutOfFlowPosition() || style.isFloating() || (e && e->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->display() == INLINE && style->styleType() == NOPSEUDO && style->writingMode() != parentStyle->writingMode())
- style->setDisplay(INLINE_BLOCK);
</del><ins>+ if (style.display() == INLINE && style.styleType() == NOPSEUDO && 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->display() == TABLE_HEADER_GROUP || style->display() == TABLE_ROW_GROUP
- || style->display() == TABLE_FOOTER_GROUP || style->display() == TABLE_ROW)
- && style->hasInFlowPosition())
- style->setPosition(StaticPosition);
</del><ins>+ if ((style.display() == TABLE_HEADER_GROUP || style.display() == TABLE_ROW_GROUP
+ || style.display() == TABLE_FOOTER_GROUP || style.display() == TABLE_ROW)
+ && 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->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());
</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->writingMode() != TopToBottomWritingMode && (style->display() == BOX || style->display() == INLINE_BOX))
- style->setWritingMode(TopToBottomWritingMode);
</del><ins>+ if (style.writingMode() != TopToBottomWritingMode && (style.display() == BOX || style.display() == INLINE_BOX))
+ style.setWritingMode(TopToBottomWritingMode);
</ins><span class="cx">
</span><del>- if (isDisplayFlexibleBox(parentStyle->display())) {
- style->setFloating(NoFloat);
- style->setDisplay(equivalentBlockDisplay(style->display(), style->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->position() == StaticPosition && !isDisplayFlexibleBox(parentStyle->display()))
- style->setHasAutoZIndex();
</del><ins>+ if (style.position() == StaticPosition && !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->hasAutoZIndex() && ((e && e->document().documentElement() == e)
- || style->opacity() < 1.0f
- || style->hasTransformRelatedProperty()
- || style->hasMask()
- || style->clipPath()
- || style->boxReflect()
- || style->hasFilter()
- || style->hasBlendMode()
- || style->position() == StickyPosition
- || (style->position() == FixedPosition && e && e->document().page() && e->document().page()->settings().fixedPositionCreatesStackingContext())
- || style->hasFlowFrom()
</del><ins>+ if (style.hasAutoZIndex() && ((e && e->document().documentElement() == e)
+ || style.opacity() < 1.0f
+ || style.hasTransformRelatedProperty()
+ || style.hasMask()
+ || style.clipPath()
+ || style.boxReflect()
+ || style.hasFilter()
+ || style.hasBlendMode()
+ || style.position() == StickyPosition
+ || (style.position() == FixedPosition && e && e->document().page() && e->document().page()->settings().fixedPositionCreatesStackingContext())
+ || style.hasFlowFrom()
</ins><span class="cx"> ))
</span><del>- style->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 && isHTMLTextAreaElement(e)) {
</span><del>- style->setOverflowX(style->overflowX() == OVISIBLE ? OAUTO : style->overflowX());
- style->setOverflowY(style->overflowY() == OVISIBLE ? OAUTO : style->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->setTextDecorationsInEffect(style->textDecoration());
</del><ins>+ style.setTextDecorationsInEffect(style.textDecoration());
</ins><span class="cx"> else
</span><del>- style->addToTextDecorationsInEffect(style->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->overflowX() == OMARQUEE && style->overflowY() != OMARQUEE)
- style->setOverflowY(OMARQUEE);
- else if (style->overflowY() == OMARQUEE && style->overflowX() != OMARQUEE)
- style->setOverflowX(OMARQUEE);
- else if (style->overflowX() == OVISIBLE && style->overflowY() != OVISIBLE) {
</del><ins>+ if (style.overflowX() == OMARQUEE && style.overflowY() != OMARQUEE)
+ style.setOverflowY(OMARQUEE);
+ else if (style.overflowY() == OMARQUEE && style.overflowX() != OMARQUEE)
+ style.setOverflowX(OMARQUEE);
+ else if (style.overflowX() == OVISIBLE && 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->setOverflowX(OAUTO);
- } else if (style->overflowY() == OVISIBLE && style->overflowX() != OVISIBLE)
- style->setOverflowY(OAUTO);
</del><ins>+ style.setOverflowX(OAUTO);
+ } else if (style.overflowY() == OVISIBLE && 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->overflowY() == OPAGEDX || style->overflowY() == OPAGEDY) && !(e && (e->hasTagName(htmlTag) || e->hasTagName(bodyTag))))
- style->setColumnStylesFromPaginationMode(WebCore::paginationModeForRenderStyle(style));
</del><ins>+ if ((style.overflowY() == OPAGEDX || style.overflowY() == OPAGEDY) && !(e && (e->hasTagName(htmlTag) || e->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->display() == TABLE || style->display() == INLINE_TABLE
- || style->display() == TABLE_ROW_GROUP || style->display() == TABLE_ROW) {
- if (style->overflowX() != OVISIBLE && style->overflowX() != OHIDDEN)
- style->setOverflowX(OVISIBLE);
- if (style->overflowY() != OVISIBLE && style->overflowY() != OHIDDEN)
- style->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 && style.overflowX() != OHIDDEN)
+ style.setOverflowX(OVISIBLE);
+ if (style.overflowY() != OVISIBLE && 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->appearance() == MenulistPart) {
- style->setOverflowX(OVISIBLE);
- style->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->hasAutoZIndex() && style->useTouchOverflowScrolling() && (isScrollableOverflow(style->overflowX()) || isScrollableOverflow(style->overflowY())))
- style->setZIndex(0);
</del><ins>+ if (style.hasAutoZIndex() && style.useTouchOverflowScrolling() && (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->adjustBackgroundLayers();
- style->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->adjustAnimations();
- style->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 && e->isFormControlElement() && style->fontSize() >= 11) {
</del><ins>+ if (e && e->isFormControlElement() && style.fontSize() >= 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)->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->hasAppearance())
- RenderTheme::defaultTheme()->adjustStyle(this, style, e, m_state.hasUAAppearance(), m_state.borderData(), m_state.backgroundData(), m_state.backgroundColor());
</del><ins>+ if (style.hasAppearance())
+ RenderTheme::defaultTheme()->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->hasPseudoStyle(FIRST_LETTER))
- style->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 < 1 cause flattening.
</span><del>- if (style->preserves3D() && (style->overflowX() != OVISIBLE
- || style->overflowY() != OVISIBLE
- || style->hasFilter()))
- style->setTransformStyle3D(TransformStyle3DFlat);
</del><ins>+ if (style.preserves3D() && (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 && e->hasTagName(iframeTag) && style->display() == INLINE && toHTMLIFrameElement(e)->shouldDisplaySeamlessly())
- style->setDisplay(INLINE_BLOCK);
</del><ins>+ if (e && e->hasTagName(iframeTag) && style.display() == INLINE && toHTMLIFrameElement(e)->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 && e->isSVGElement()) {
</span><span class="cx"> // Spec: http://www.w3.org/TR/SVG/masking.html#OverflowProperty
</span><del>- if (style->overflowY() == OSCROLL)
- style->setOverflowY(OHIDDEN);
- else if (style->overflowY() == OAUTO)
- style->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->overflowX() == OSCROLL)
- style->setOverflowX(OHIDDEN);
- else if (style->overflowX() == OAUTO)
- style->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 <svg> element in an SVG document fragment tree honors css position
</span><span class="cx"> if (!(e->hasTagName(SVGNames::svgTag) && e->parentNode() && !e->parentNode()->isSVGElement()))
</span><del>- style->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->hasTagName(SVGNames::foreignObjectTag))
</span><del>- style->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& style, const RenderStyle& parentStyle) const
</ins><span class="cx"> {
</span><del>- const GridPosition& columnStartPosition = style->gridItemColumnStart();
- const GridPosition& columnEndPosition = style->gridItemColumnEnd();
- const GridPosition& rowStartPosition = style->gridItemRowStart();
- const GridPosition& rowEndPosition = style->gridItemRowEnd();
</del><ins>+ const GridPosition& columnStartPosition = style.gridItemColumnStart();
+ const GridPosition& columnEndPosition = style.gridItemColumnEnd();
+ const GridPosition& rowStartPosition = style.gridItemRowStart();
+ const GridPosition& 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() && columnEndPosition.isSpan()) {
</span><del>- style->setGridItemColumnStart(GridPosition());
- style->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() && rowEndPosition.isSpan()) {
</span><del>- style->setGridItemRowStart(GridPosition());
- style->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& map = parentStyle->namedGridArea();
</del><ins>+ const NamedGridAreaMap& 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() && !map.contains(prop.namedGridLine())) \
</span><del>- style->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& styleToAdjust, const RenderStyle& parentStyle, Element*);
+ void adjustGridItemPosition(RenderStyle& styleToAdjust, const RenderStyle& parentStyle) const;
</ins><span class="cx">
</span><span class="cx"> bool fastRejectSelector(const RuleData&) 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& style)
</ins><span class="cx"> {
</span><del>- EOverflow overflow = style->overflowY();
</del><ins>+ EOverflow overflow = style.overflowY();
</ins><span class="cx"> if (overflow != OPAGEDX && overflow != OPAGEDY)
</span><span class="cx"> return Pagination::Unpaginated;
</span><span class="cx">
</span><del>- bool isHorizontalWritingMode = style->isHorizontalWritingMode();
- TextDirection textDirection = style->direction();
- WritingMode writingMode = style->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->style().overflowY();
</span><span class="cx"> if (overflowY == OPAGEDX || overflowY == OPAGEDY) {
</span><del>- pagination.mode = WebCore::paginationModeForRenderStyle(&documentOrBodyRenderer->style());
</del><ins>+ pagination.mode = WebCore::paginationModeForRenderStyle(documentOrBodyRenderer->style());
</ins><span class="cx"> pagination.gap = static_cast<unsigned>(documentOrBodyRenderer->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&);
</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& border, const FillLayer& background, const Color& backgroundColor)
</del><ins>+void RenderTheme::adjustStyle(StyleResolver& styleResolver, RenderStyle& style, Element* e, bool UAHasAppearance, const BorderData& border, const FillLayer& background, const Color& 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->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);
</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 && isControlStyled(style, border, background, backgroundColor)) {
</del><ins>+ if (UAHasAppearance && isControlStyled(&style, border, background, backgroundColor)) {
</ins><span class="cx"> if (part == MenulistPart) {
</span><del>- style->setAppearance(MenulistButtonPart);
</del><ins>+ style.setAppearance(MenulistButtonPart);
</ins><span class="cx"> part = MenulistButtonPart;
</span><span class="cx"> } else
</span><del>- style->setAppearance(NoControlPart);
</del><ins>+ style.setAppearance(NoControlPart);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- if (!style->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->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->borderTopWidth(), style->borderRightWidth(), style->borderBottomWidth(), style->borderLeftWidth());
- borderBox = m_theme->controlBorder(part, style->font(), borderBox, style->effectiveZoom());
- if (borderBox.top().value() != static_cast<int>(style->borderTopWidth())) {
</del><ins>+ LengthBox borderBox(style.borderTopWidth(), style.borderRightWidth(), style.borderBottomWidth(), style.borderLeftWidth());
+ borderBox = m_theme->controlBorder(part, style.font(), borderBox, style.effectiveZoom());
+ if (borderBox.top().value() != static_cast<int>(style.borderTopWidth())) {
</ins><span class="cx"> if (borderBox.top().value())
</span><del>- style->setBorderTopWidth(borderBox.top().value());
</del><ins>+ style.setBorderTopWidth(borderBox.top().value());
</ins><span class="cx"> else
</span><del>- style->resetBorderTop();
</del><ins>+ style.resetBorderTop();
</ins><span class="cx"> }
</span><del>- if (borderBox.right().value() != static_cast<int>(style->borderRightWidth())) {
</del><ins>+ if (borderBox.right().value() != static_cast<int>(style.borderRightWidth())) {
</ins><span class="cx"> if (borderBox.right().value())
</span><del>- style->setBorderRightWidth(borderBox.right().value());
</del><ins>+ style.setBorderRightWidth(borderBox.right().value());
</ins><span class="cx"> else
</span><del>- style->resetBorderRight();
</del><ins>+ style.resetBorderRight();
</ins><span class="cx"> }
</span><del>- if (borderBox.bottom().value() != static_cast<int>(style->borderBottomWidth())) {
- style->setBorderBottomWidth(borderBox.bottom().value());
</del><ins>+ if (borderBox.bottom().value() != static_cast<int>(style.borderBottomWidth())) {
+ style.setBorderBottomWidth(borderBox.bottom().value());
</ins><span class="cx"> if (borderBox.bottom().value())
</span><del>- style->setBorderBottomWidth(borderBox.bottom().value());
</del><ins>+ style.setBorderBottomWidth(borderBox.bottom().value());
</ins><span class="cx"> else
</span><del>- style->resetBorderBottom();
</del><ins>+ style.resetBorderBottom();
</ins><span class="cx"> }
</span><del>- if (borderBox.left().value() != static_cast<int>(style->borderLeftWidth())) {
- style->setBorderLeftWidth(borderBox.left().value());
</del><ins>+ if (borderBox.left().value() != static_cast<int>(style.borderLeftWidth())) {
+ style.setBorderLeftWidth(borderBox.left().value());
</ins><span class="cx"> if (borderBox.left().value())
</span><del>- style->setBorderLeftWidth(borderBox.left().value());
</del><ins>+ style.setBorderLeftWidth(borderBox.left().value());
</ins><span class="cx"> else
</span><del>- style->resetBorderLeft();
</del><ins>+ style.resetBorderLeft();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Padding
</span><del>- LengthBox paddingBox = m_theme->controlPadding(part, style->font(), style->paddingBox(), style->effectiveZoom());
- if (paddingBox != style->paddingBox())
- style->setPaddingBox(paddingBox);
</del><ins>+ LengthBox paddingBox = m_theme->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->controlRequiresPreWhiteSpace(part))
</span><del>- style->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->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());
</del><ins>+ LengthSize controlSize = m_theme->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->minimumControlSize(part, style->font(), style->effectiveZoom());
- if (minControlSize.width() != style->minWidth())
- style->setMinWidth(minControlSize.width());
- if (minControlSize.height() != style->minHeight())
- style->setMinHeight(minControlSize.height());
</del><ins>+ LengthSize minControlSize = m_theme->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->controlFont(part, style->font(), style->effectiveZoom());
- if (controlFont != style->font().fontDescription()) {
</del><ins>+ FontDescription controlFont = m_theme->controlFont(part, style.font(), style.effectiveZoom());
+ if (controlFont != style.font().fontDescription()) {
</ins><span class="cx"> // Reset our line-height
</span><del>- style->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->setFontDescription(controlFont))
- style->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->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(&styleResolver, &style, e);
</ins><span class="cx"> case RadioPart:
</span><del>- return adjustRadioStyle(styleResolver, style, e);
</del><ins>+ return adjustRadioStyle(&styleResolver, &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(&styleResolver, &style, e);
</ins><span class="cx"> case InnerSpinButtonPart:
</span><del>- return adjustInnerSpinButtonStyle(styleResolver, style, e);
</del><ins>+ return adjustInnerSpinButtonStyle(&styleResolver, &style, e);
</ins><span class="cx"> #endif
</span><span class="cx"> case TextFieldPart:
</span><del>- return adjustTextFieldStyle(styleResolver, style, e);
</del><ins>+ return adjustTextFieldStyle(&styleResolver, &style, e);
</ins><span class="cx"> case TextAreaPart:
</span><del>- return adjustTextAreaStyle(styleResolver, style, e);
</del><ins>+ return adjustTextAreaStyle(&styleResolver, &style, e);
</ins><span class="cx"> case MenulistPart:
</span><del>- return adjustMenuListStyle(styleResolver, style, e);
</del><ins>+ return adjustMenuListStyle(&styleResolver, &style, e);
</ins><span class="cx"> case MenulistButtonPart:
</span><del>- return adjustMenuListButtonStyle(styleResolver, style, e);
</del><ins>+ return adjustMenuListButtonStyle(&styleResolver, &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(&styleResolver, &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(&styleResolver, &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(&styleResolver, &style, e);
</ins><span class="cx"> case SearchFieldPart:
</span><del>- return adjustSearchFieldStyle(styleResolver, style, e);
</del><ins>+ return adjustSearchFieldStyle(&styleResolver, &style, e);
</ins><span class="cx"> case SearchFieldCancelButtonPart:
</span><del>- return adjustSearchFieldCancelButtonStyle(styleResolver, style, e);
</del><ins>+ return adjustSearchFieldCancelButtonStyle(&styleResolver, &style, e);
</ins><span class="cx"> case SearchFieldDecorationPart:
</span><del>- return adjustSearchFieldDecorationPartStyle(styleResolver, style, e);
</del><ins>+ return adjustSearchFieldDecorationPartStyle(&styleResolver, &style, e);
</ins><span class="cx"> case SearchFieldResultsDecorationPart:
</span><del>- return adjustSearchFieldResultsDecorationPartStyle(styleResolver, style, e);
</del><ins>+ return adjustSearchFieldResultsDecorationPartStyle(&styleResolver, &style, e);
</ins><span class="cx"> case SearchFieldResultsButtonPart:
</span><del>- return adjustSearchFieldResultsButtonStyle(styleResolver, style, e);
</del><ins>+ return adjustSearchFieldResultsButtonStyle(&styleResolver, &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(&styleResolver, &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(&styleResolver, &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(&styleResolver, &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"> // "border" are set, or if the appearance is not supported by the theme.
</span><del>- void adjustStyle(StyleResolver*, RenderStyle*, Element*, bool UAHasAppearance,
- const BorderData&, const FillLayer&, const Color& backgroundColor);
</del><ins>+ void adjustStyle(StyleResolver&, RenderStyle&, Element*, bool UAHasAppearance, const BorderData&, const FillLayer&, const Color& 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>