<!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>[187741] 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/187741">187741</a></dd>
<dt>Author</dt> <dd>zalan@apple.com</dd>
<dt>Date</dt> <dd>2015-08-03 10:14:52 -0700 (Mon, 03 Aug 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Pass ControlStates& to RenderTheme methods instead of ControlStates*
https://bugs.webkit.org/show_bug.cgi?id=147521
Reviewed by Andreas Kling.
No change in functionality.
* platform/Theme.h:
(WebCore::Theme::selectionColor):
(WebCore::Theme::paint):
(WebCore::Theme::inflateControlPaintRect):
* platform/mac/ThemeMac.h:
* platform/mac/ThemeMac.mm:
(WebCore::updateStates):
(WebCore::convertControlStatesToThemeDrawState):
(WebCore::configureToggleButton):
(WebCore::sharedRadioCell):
(WebCore::sharedCheckboxCell):
(WebCore::paintToggleButton):
(WebCore::setUpButtonCell):
(WebCore::button):
(WebCore::paintButton):
(WebCore::paintStepper):
(WebCore::ThemeMac::ensuredView):
(WebCore::ThemeMac::inflateControlPaintRect):
(WebCore::ThemeMac::paint):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::paintBoxDecorations):
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::paint):
(WebCore::RenderTheme::adjustRepaintRect):
(WebCore::RenderTheme::updateControlStatesForRenderer):
* rendering/RenderTheme.h:
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::documentViewFor):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreplatformThemeh">trunk/Source/WebCore/platform/Theme.h</a></li>
<li><a href="#trunkSourceWebCoreplatformmacThemeMach">trunk/Source/WebCore/platform/mac/ThemeMac.h</a></li>
<li><a href="#trunkSourceWebCoreplatformmacThemeMacmm">trunk/Source/WebCore/platform/mac/ThemeMac.mm</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBoxcpp">trunk/Source/WebCore/rendering/RenderBox.cpp</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>
<li><a href="#trunkSourceWebCorerenderingRenderThemeMacmm">trunk/Source/WebCore/rendering/RenderThemeMac.mm</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (187740 => 187741)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-08-03 17:06:38 UTC (rev 187740)
+++ trunk/Source/WebCore/ChangeLog        2015-08-03 17:14:52 UTC (rev 187741)
</span><span class="lines">@@ -1,3 +1,41 @@
</span><ins>+2015-08-03 Zalan Bujtas <zalan@apple.com>
+
+ Pass ControlStates& to RenderTheme methods instead of ControlStates*
+ https://bugs.webkit.org/show_bug.cgi?id=147521
+
+ Reviewed by Andreas Kling.
+
+ No change in functionality.
+
+ * platform/Theme.h:
+ (WebCore::Theme::selectionColor):
+ (WebCore::Theme::paint):
+ (WebCore::Theme::inflateControlPaintRect):
+ * platform/mac/ThemeMac.h:
+ * platform/mac/ThemeMac.mm:
+ (WebCore::updateStates):
+ (WebCore::convertControlStatesToThemeDrawState):
+ (WebCore::configureToggleButton):
+ (WebCore::sharedRadioCell):
+ (WebCore::sharedCheckboxCell):
+ (WebCore::paintToggleButton):
+ (WebCore::setUpButtonCell):
+ (WebCore::button):
+ (WebCore::paintButton):
+ (WebCore::paintStepper):
+ (WebCore::ThemeMac::ensuredView):
+ (WebCore::ThemeMac::inflateControlPaintRect):
+ (WebCore::ThemeMac::paint):
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::paintBoxDecorations):
+ * rendering/RenderTheme.cpp:
+ (WebCore::RenderTheme::paint):
+ (WebCore::RenderTheme::adjustRepaintRect):
+ (WebCore::RenderTheme::updateControlStatesForRenderer):
+ * rendering/RenderTheme.h:
+ * rendering/RenderThemeMac.mm:
+ (WebCore::RenderThemeMac::documentViewFor):
+
</ins><span class="cx"> 2015-08-03 Brady Eidson <beidson@apple.com>
</span><span class="cx">
</span><span class="cx"> Crash when signing into twitter calling WebCore::DocumentLoader::responseReceived(WebCore::CachedResource*, WebCore::ResourceResponse const&).
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformThemeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/Theme.h (187740 => 187741)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/Theme.h        2015-08-03 17:06:38 UTC (rev 187740)
+++ trunk/Source/WebCore/platform/Theme.h        2015-08-03 17:14:52 UTC (rev 187741)
</span><span class="lines">@@ -68,7 +68,7 @@
</span><span class="cx"> virtual bool controlDrawsFocusOutline(ControlPart) const { return true; }
</span><span class="cx">
</span><span class="cx"> // Methods for obtaining platform-specific colors.
</span><del>- virtual Color selectionColor(ControlPart, const ControlStates*, SelectionPart) const { return Color(); }
</del><ins>+ virtual Color selectionColor(ControlPart, const ControlStates&, SelectionPart) const { return Color(); }
</ins><span class="cx"> virtual Color textSearchHighlightColor() const { return Color(); }
</span><span class="cx">
</span><span class="cx"> // CSS system colors and fonts
</span><span class="lines">@@ -100,13 +100,13 @@
</span><span class="cx"> virtual bool controlRequiresPreWhiteSpace(ControlPart) const { return false; }
</span><span class="cx">
</span><span class="cx"> // Method for painting a control. The rect is in zoomed coordinates.
</span><del>- virtual void paint(ControlPart, ControlStates*, GraphicsContext*, const FloatRect& /*zoomedRect*/, float /*zoomFactor*/, ScrollView*, float /*deviceScaleFactor*/, float /*pageScaleFactor*/) { }
</del><ins>+ virtual void paint(ControlPart, ControlStates&, GraphicsContext*, const FloatRect& /*zoomedRect*/, float /*zoomFactor*/, ScrollView*, float /*deviceScaleFactor*/, float /*pageScaleFactor*/) { }
</ins><span class="cx">
</span><span class="cx"> // Some controls may spill out of their containers (e.g., the check on an OS X checkbox). When these controls repaint,
</span><span class="cx"> // the theme needs to communicate this inflated rect to the engine so that it can invalidate the whole control.
</span><span class="cx"> // The rect passed in is in zoomed coordinates, so the inflation should take that into account and make sure the inflation
</span><span class="cx"> // amount is also scaled by the zoomFactor.
</span><del>- virtual void inflateControlPaintRect(ControlPart, const ControlStates*, FloatRect& /*zoomedRect*/, float /*zoomFactor*/) const { }
</del><ins>+ virtual void inflateControlPaintRect(ControlPart, const ControlStates&, FloatRect& /*zoomedRect*/, float /*zoomFactor*/) const { }
</ins><span class="cx">
</span><span class="cx"> virtual void drawNamedImage(const String&, GraphicsContext*, const FloatRect&) const;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmacThemeMach"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mac/ThemeMac.h (187740 => 187741)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mac/ThemeMac.h        2015-08-03 17:06:38 UTC (rev 187740)
+++ trunk/Source/WebCore/platform/mac/ThemeMac.h        2015-08-03 17:14:52 UTC (rev 187741)
</span><span class="lines">@@ -52,11 +52,11 @@
</span><span class="cx">
</span><span class="cx"> virtual bool controlRequiresPreWhiteSpace(ControlPart part) const override { return part == PushButtonPart; }
</span><span class="cx">
</span><del>- virtual void paint(ControlPart, ControlStates*, GraphicsContext*, const FloatRect&, float zoomFactor, ScrollView*, float deviceScaleFactor, float pageScaleFactor) override;
- virtual void inflateControlPaintRect(ControlPart, const ControlStates*, FloatRect&, float zoomFactor) const override;
</del><ins>+ virtual void paint(ControlPart, ControlStates&, GraphicsContext*, const FloatRect&, float zoomFactor, ScrollView*, float deviceScaleFactor, float pageScaleFactor) override;
+ virtual void inflateControlPaintRect(ControlPart, const ControlStates&, FloatRect&, float zoomFactor) const override;
</ins><span class="cx">
</span><span class="cx"> // FIXME: Once RenderThemeMac is converted over to use Theme then this can be internal to ThemeMac.
</span><del>- static NSView* ensuredView(ScrollView*, const ControlStates*, bool useUnparentedView = false);
</del><ins>+ static NSView* ensuredView(ScrollView*, const ControlStates&, bool useUnparentedView = false);
</ins><span class="cx"> static void setFocusRingClipRect(const FloatRect&);
</span><span class="cx"> };
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmacThemeMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mac/ThemeMac.mm (187740 => 187741)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mac/ThemeMac.mm        2015-08-03 17:06:38 UTC (rev 187740)
+++ trunk/Source/WebCore/platform/mac/ThemeMac.mm        2015-08-03 17:14:52 UTC (rev 187741)
</span><span class="lines">@@ -184,7 +184,7 @@
</span><span class="cx"> [cell setControlSize:(NSControlSize)size];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static void updateStates(NSCell* cell, const ControlStates* controlStates, bool useAnimation = false)
</del><ins>+static void updateStates(NSCell* cell, const ControlStates& controlStates, bool useAnimation = false)
</ins><span class="cx"> {
</span><span class="cx"> #if __MAC_OS_X_VERSION_MIN_REQUIRED < 101000
</span><span class="cx"> UNUSED_PARAM(useAnimation);
</span><span class="lines">@@ -195,7 +195,7 @@
</span><span class="cx"> if (AXObjectCache::accessibilityEnhancedUserInterfaceEnabled())
</span><span class="cx"> useAnimation = false;
</span><span class="cx">
</span><del>- ControlStates::States states = controlStates->states();
</del><ins>+ ControlStates::States states = controlStates.states();
</ins><span class="cx">
</span><span class="cx"> // Hover state is not supported by Aqua.
</span><span class="cx">
</span><span class="lines">@@ -234,9 +234,9 @@
</span><span class="cx"> // a view in a window whose key state can be detected.
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static ThemeDrawState convertControlStatesToThemeDrawState(ThemeButtonKind kind, const ControlStates* controlStates)
</del><ins>+static ThemeDrawState convertControlStatesToThemeDrawState(ThemeButtonKind kind, const ControlStates& controlStates)
</ins><span class="cx"> {
</span><del>- ControlStates::States states = controlStates->states();
</del><ins>+ ControlStates::States states = controlStates.states();
</ins><span class="cx">
</span><span class="cx"> if (!(states & ControlStates::EnabledState))
</span><span class="cx"> return kThemeStateUnavailableInactive;
</span><span class="lines">@@ -328,7 +328,7 @@
</span><span class="cx"> return sizeFromFont(font, zoomedSize, zoomFactor, radioSizes());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static void configureToggleButton(NSCell* cell, ControlPart buttonType, const ControlStates* states, const IntSize& zoomedSize, float zoomFactor, bool isStateChange)
</del><ins>+static void configureToggleButton(NSCell* cell, ControlPart buttonType, const ControlStates& states, const IntSize& zoomedSize, float zoomFactor, bool isStateChange)
</ins><span class="cx"> {
</span><span class="cx"> // Set the control size based off the rectangle we're painting into.
</span><span class="cx"> setControlSize(cell, buttonType == CheckboxPart ? checkboxSizes() : radioSizes(), zoomedSize, zoomFactor);
</span><span class="lines">@@ -354,7 +354,7 @@
</span><span class="cx"> return toggleButtonCell;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static NSButtonCell *sharedRadioCell(const ControlStates* states, const IntSize& zoomedSize, float zoomFactor)
</del><ins>+static NSButtonCell *sharedRadioCell(const ControlStates& states, const IntSize& zoomedSize, float zoomFactor)
</ins><span class="cx"> {
</span><span class="cx"> static NSButtonCell *radioCell = createToggleButtonCell(RadioPart).leakRef();
</span><span class="cx">
</span><span class="lines">@@ -362,7 +362,7 @@
</span><span class="cx"> return radioCell;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static NSButtonCell *sharedCheckboxCell(const ControlStates* states, const IntSize& zoomedSize, float zoomFactor)
</del><ins>+static NSButtonCell *sharedCheckboxCell(const ControlStates& states, const IntSize& zoomedSize, float zoomFactor)
</ins><span class="cx"> {
</span><span class="cx"> static NSButtonCell *checkboxCell = createToggleButtonCell(CheckboxPart).leakRef();
</span><span class="cx">
</span><span class="lines">@@ -376,14 +376,14 @@
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static void paintToggleButton(ControlPart buttonType, ControlStates* controlStates, GraphicsContext* context, const FloatRect& zoomedRect, float zoomFactor, ScrollView* scrollView)
</del><ins>+static void paintToggleButton(ControlPart buttonType, ControlStates& controlStates, GraphicsContext* context, const FloatRect& zoomedRect, float zoomFactor, ScrollView* scrollView)
</ins><span class="cx"> {
</span><span class="cx"> BEGIN_BLOCK_OBJC_EXCEPTIONS
</span><span class="cx">
</span><del>- RetainPtr<NSButtonCell> toggleButtonCell = static_cast<NSButtonCell *>(controlStates->platformControl());
</del><ins>+ RetainPtr<NSButtonCell> toggleButtonCell = static_cast<NSButtonCell *>(controlStates.platformControl());
</ins><span class="cx"> IntSize zoomedRectSize = IntSize(zoomedRect.size());
</span><span class="cx">
</span><del>- if (controlStates->isDirty()) {
</del><ins>+ if (controlStates.isDirty()) {
</ins><span class="cx"> if (!toggleButtonCell)
</span><span class="cx"> toggleButtonCell = createToggleButtonCell(buttonType);
</span><span class="cx"> configureToggleButton(toggleButtonCell.get(), buttonType, controlStates, zoomedRectSize, zoomFactor, true);
</span><span class="lines">@@ -398,7 +398,7 @@
</span><span class="cx"> }
</span><span class="cx"> configureToggleButton(toggleButtonCell.get(), buttonType, controlStates, zoomedRectSize, zoomFactor, false);
</span><span class="cx"> }
</span><del>- controlStates->setDirty(false);
</del><ins>+ controlStates.setDirty(false);
</ins><span class="cx">
</span><span class="cx"> GraphicsContextStateSaver stateSaver(*context);
</span><span class="cx">
</span><span class="lines">@@ -442,16 +442,16 @@
</span><span class="cx"> [toggleButtonCell drawWithFrame:NSRect(inflatedRect) inView:view];
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>- if (!isAnimating && (controlStates->states() & ControlStates::FocusState))
</del><ins>+ if (!isAnimating && (controlStates.states() & ControlStates::FocusState))
</ins><span class="cx"> needsRepaint = drawCellFocusRing(toggleButtonCell.get(), inflatedRect, view);
</span><span class="cx"> [toggleButtonCell setControlView:nil];
</span><span class="cx">
</span><span class="cx"> #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
</span><span class="cx"> needsRepaint |= [toggleButtonCell _stateAnimationRunning];
</span><span class="cx"> #endif
</span><del>- controlStates->setNeedsRepaint(needsRepaint);
</del><ins>+ controlStates.setNeedsRepaint(needsRepaint);
</ins><span class="cx"> if (needsRepaint)
</span><del>- controlStates->setPlatformControl(toggleButtonCell.get());
</del><ins>+ controlStates.setPlatformControl(toggleButtonCell.get());
</ins><span class="cx">
</span><span class="cx"> END_BLOCK_OBJC_EXCEPTIONS
</span><span class="cx"> }
</span><span class="lines">@@ -488,7 +488,7 @@
</span><span class="cx"> return cell;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static void setUpButtonCell(NSButtonCell *cell, ControlPart part, const ControlStates* states, const IntSize& zoomedSize, float zoomFactor)
</del><ins>+static void setUpButtonCell(NSButtonCell *cell, ControlPart part, const ControlStates& states, const IntSize& zoomedSize, float zoomFactor)
</ins><span class="cx"> {
</span><span class="cx"> // Set the control size based off the rectangle we're painting into.
</span><span class="cx"> const std::array<IntSize, 3>& sizes = buttonSizes();
</span><span class="lines">@@ -505,9 +505,9 @@
</span><span class="cx"> updateStates(cell, states);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static NSButtonCell *button(ControlPart part, const ControlStates* controlStates, const IntSize& zoomedSize, float zoomFactor)
</del><ins>+static NSButtonCell *button(ControlPart part, const ControlStates& controlStates, const IntSize& zoomedSize, float zoomFactor)
</ins><span class="cx"> {
</span><del>- ControlStates::States states = controlStates->states();
</del><ins>+ ControlStates::States states = controlStates.states();
</ins><span class="cx"> NSButtonCell *cell;
</span><span class="cx"> if (states & ControlStates::DefaultState) {
</span><span class="cx"> static NSButtonCell *defaultCell = leakButtonCell(DefaultButtonCell);
</span><span class="lines">@@ -525,12 +525,12 @@
</span><span class="cx"> return 3.0f;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static void paintButton(ControlPart part, ControlStates* controlStates, GraphicsContext* context, const FloatRect& zoomedRect, float zoomFactor, ScrollView* scrollView, float deviceScaleFactor, float pageScaleFactor)
</del><ins>+static void paintButton(ControlPart part, ControlStates& controlStates, GraphicsContext* context, const FloatRect& zoomedRect, float zoomFactor, ScrollView* scrollView, float deviceScaleFactor, float pageScaleFactor)
</ins><span class="cx"> {
</span><span class="cx"> BEGIN_BLOCK_OBJC_EXCEPTIONS
</span><span class="cx">
</span><span class="cx"> // Determine the width and height needed for the control and prepare the cell for painting.
</span><del>- ControlStates::States states = controlStates->states();
</del><ins>+ ControlStates::States states = controlStates.states();
</ins><span class="cx"> NSButtonCell *buttonCell = button(part, controlStates, IntSize(zoomedRect.size()), zoomFactor);
</span><span class="cx"> GraphicsContextStateSaver stateSaver(*context);
</span><span class="cx">
</span><span class="lines">@@ -597,7 +597,7 @@
</span><span class="cx"> drawCellFocusRing(buttonCell, NSRect(inflatedRect), view);
</span><span class="cx"> }
</span><span class="cx">
</span><del>- controlStates->setNeedsRepaint(false);
</del><ins>+ controlStates.setNeedsRepaint(false);
</ins><span class="cx">
</span><span class="cx"> [buttonCell setControlView:nil];
</span><span class="cx">
</span><span class="lines">@@ -627,7 +627,7 @@
</span><span class="cx"> return NSMiniControlSize;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static void paintStepper(ControlStates* states, GraphicsContext* context, const FloatRect& zoomedRect, float zoomFactor, ScrollView*)
</del><ins>+static void paintStepper(ControlStates& states, GraphicsContext* context, const FloatRect& zoomedRect, float zoomFactor, ScrollView*)
</ins><span class="cx"> {
</span><span class="cx"> // We don't use NSStepperCell because there are no ways to draw an
</span><span class="cx"> // NSStepperCell with the up button highlighted.
</span><span class="lines">@@ -669,7 +669,7 @@
</span><span class="cx">
</span><span class="cx"> // This will ensure that we always return a valid NSView, even if ScrollView doesn't have an associated document NSView.
</span><span class="cx"> // If the ScrollView doesn't have an NSView, we will return a fake NSView set up in the way AppKit expects.
</span><del>-NSView *ThemeMac::ensuredView(ScrollView* scrollView, const ControlStates* controlStates, bool useUnparentedView)
</del><ins>+NSView *ThemeMac::ensuredView(ScrollView* scrollView, const ControlStates& controlStates, bool useUnparentedView)
</ins><span class="cx"> {
</span><span class="cx"> if (!useUnparentedView) {
</span><span class="cx"> if (NSView *documentView = scrollView->documentView())
</span><span class="lines">@@ -680,7 +680,7 @@
</span><span class="cx"> static WebCoreThemeView *themeView = [[WebCoreThemeView alloc] init];
</span><span class="cx"> [themeView setFrameSize:NSSizeFromCGSize(scrollView->totalContentsSize())];
</span><span class="cx">
</span><del>- themeWindowHasKeyAppearance = !(controlStates->states() & ControlStates::WindowInactiveState);
</del><ins>+ themeWindowHasKeyAppearance = !(controlStates.states() & ControlStates::WindowInactiveState);
</ins><span class="cx">
</span><span class="cx"> return themeView;
</span><span class="cx"> }
</span><span class="lines">@@ -782,7 +782,7 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void ThemeMac::inflateControlPaintRect(ControlPart part, const ControlStates* states, FloatRect& zoomedRect, float zoomFactor) const
</del><ins>+void ThemeMac::inflateControlPaintRect(ControlPart part, const ControlStates& states, FloatRect& zoomedRect, float zoomFactor) const
</ins><span class="cx"> {
</span><span class="cx"> BEGIN_BLOCK_OBJC_EXCEPTIONS
</span><span class="cx"> IntSize zoomRectSize = IntSize(zoomedRect.size());
</span><span class="lines">@@ -839,7 +839,7 @@
</span><span class="cx"> END_BLOCK_OBJC_EXCEPTIONS
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void ThemeMac::paint(ControlPart part, ControlStates* states, GraphicsContext* context, const FloatRect& zoomedRect, float zoomFactor, ScrollView* scrollView, float deviceScaleFactor, float pageScaleFactor)
</del><ins>+void ThemeMac::paint(ControlPart part, ControlStates& states, GraphicsContext* context, const FloatRect& zoomedRect, float zoomFactor, ScrollView* scrollView, float deviceScaleFactor, float pageScaleFactor)
</ins><span class="cx"> {
</span><span class="cx"> switch (part) {
</span><span class="cx"> case CheckboxPart:
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (187740 => 187741)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBox.cpp        2015-08-03 17:06:38 UTC (rev 187740)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp        2015-08-03 17:14:52 UTC (rev 187741)
</span><span class="lines">@@ -1331,12 +1331,11 @@
</span><span class="cx"> controlStates = new ControlStates();
</span><span class="cx"> addControlStatesForRenderer(this, controlStates);
</span><span class="cx"> }
</span><del>- borderOrBackgroundPaintingIsNeeded = theme().paint(*this, controlStates, paintInfo, paintRect);
</del><ins>+ borderOrBackgroundPaintingIsNeeded = theme().paint(*this, *controlStates, paintInfo, paintRect);
+ if (controlStates->needsRepaint())
+ view().scheduleLazyRepaint(*this);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- if (controlStates && controlStates->needsRepaint())
- view().scheduleLazyRepaint(*this);
-
</del><span class="cx"> if (borderOrBackgroundPaintingIsNeeded) {
</span><span class="cx"> if (bleedAvoidance == BackgroundBleedBackgroundOverBorder)
</span><span class="cx"> paintBorder(paintInfo, paintRect, style(), bleedAvoidance);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderThemecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderTheme.cpp (187740 => 187741)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderTheme.cpp        2015-08-03 17:06:38 UTC (rev 187740)
+++ trunk/Source/WebCore/rendering/RenderTheme.cpp        2015-08-03 17:14:52 UTC (rev 187741)
</span><span class="lines">@@ -262,7 +262,7 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool RenderTheme::paint(const RenderObject& o, ControlStates* controlStates, const PaintInfo& paintInfo, const LayoutRect& r)
</del><ins>+bool RenderTheme::paint(const RenderObject& o, ControlStates& controlStates, const PaintInfo& paintInfo, const LayoutRect& r)
</ins><span class="cx"> {
</span><span class="cx"> // If painting is disabled, but we aren't updating control tints, then just bail.
</span><span class="cx"> // If we are updating control tints, just schedule a repaint if the theme supports tinting
</span><span class="lines">@@ -716,7 +716,7 @@
</span><span class="cx"> {
</span><span class="cx"> #if USE(NEW_THEME)
</span><span class="cx"> ControlStates states(extractControlStatesForRenderer(renderer));
</span><del>- m_theme->inflateControlPaintRect(renderer.style().appearance(), &states, rect, renderer.style().effectiveZoom());
</del><ins>+ m_theme->inflateControlPaintRect(renderer.style().appearance(), states, rect, renderer.style().effectiveZoom());
</ins><span class="cx"> #else
</span><span class="cx"> UNUSED_PARAM(renderer);
</span><span class="cx"> UNUSED_PARAM(rect);
</span><span class="lines">@@ -743,12 +743,12 @@
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void RenderTheme::updateControlStatesForRenderer(const RenderObject& o, ControlStates* controlStates) const
</del><ins>+void RenderTheme::updateControlStatesForRenderer(const RenderObject& o, ControlStates& controlStates) const
</ins><span class="cx"> {
</span><span class="cx"> ControlStates newStates = extractControlStatesForRenderer(o);
</span><del>- controlStates->setStates(newStates.states());
</del><ins>+ controlStates.setStates(newStates.states());
</ins><span class="cx"> if (isFocused(o))
</span><del>- controlStates->setTimeSinceControlWasFocused(o.document().page()->focusController().timeSinceFocusWasSet());
</del><ins>+ controlStates.setTimeSinceControlWasFocused(o.document().page()->focusController().timeSinceFocusWasSet());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> ControlStates::States RenderTheme::extractControlStatesForRenderer(const RenderObject& o) const
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderThemeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderTheme.h (187740 => 187741)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderTheme.h        2015-08-03 17:06:38 UTC (rev 187740)
+++ trunk/Source/WebCore/rendering/RenderTheme.h        2015-08-03 17:14:52 UTC (rev 187741)
</span><span class="lines">@@ -79,7 +79,7 @@
</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 class="cx"> // whether the CSS border/background should also be painted.
</span><del>- bool paint(const RenderObject&, ControlStates*, const PaintInfo&, const LayoutRect&);
</del><ins>+ bool paint(const RenderObject&, ControlStates&, const PaintInfo&, const LayoutRect&);
</ins><span class="cx"> bool paintBorderOnly(const RenderBox&, const PaintInfo&, const LayoutRect&);
</span><span class="cx"> bool paintDecorations(const RenderBox&, const PaintInfo&, const LayoutRect&);
</span><span class="cx">
</span><span class="lines">@@ -379,7 +379,7 @@
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> public:
</span><del>- void updateControlStatesForRenderer(const RenderObject&, ControlStates*) const;
</del><ins>+ void updateControlStatesForRenderer(const RenderObject&, ControlStates&) const;
</ins><span class="cx"> ControlStates::States extractControlStatesForRenderer(const RenderObject&) const;
</span><span class="cx"> bool isActive(const RenderObject&) const;
</span><span class="cx"> bool isChecked(const RenderObject&) const;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderThemeMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderThemeMac.mm (187740 => 187741)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderThemeMac.mm        2015-08-03 17:06:38 UTC (rev 187740)
+++ trunk/Source/WebCore/rendering/RenderThemeMac.mm        2015-08-03 17:14:52 UTC (rev 187741)
</span><span class="lines">@@ -230,7 +230,7 @@
</span><span class="cx"> NSView* RenderThemeMac::documentViewFor(const RenderObject& o) const
</span><span class="cx"> {
</span><span class="cx"> ControlStates states(extractControlStatesForRenderer(o));
</span><del>- return ThemeMac::ensuredView(&o.view().frameView(), &states);
</del><ins>+ return ThemeMac::ensuredView(&o.view().frameView(), states);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if ENABLE(VIDEO)
</span></span></pre>
</div>
</div>
</body>
</html>