<!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>[167771] trunk</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/167771">167771</a></dd>
<dt>Author</dt> <dd>zalan@apple.com</dd>
<dt>Date</dt> <dd>2014-04-24 13:46:26 -0700 (Thu, 24 Apr 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Subpixel rendering: Clipping on text areas when shifted by one device pixel.
https://bugs.webkit.org/show_bug.cgi?id=132008
Reviewed by Darin Adler.
Make RenderTheme paint* functions LayoutRect aware. Textarea is device pixel snapped, while
other theme controls are still on integral size/positions.
Source/WebCore:
Test: fast/forms/hidpi-textarea-on-subpixel-position.html
* rendering/RenderBox.cpp:
(WebCore::RenderBox::paintBoxDecorations):
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::paint):
(WebCore::RenderTheme::paintBorderOnly):
(WebCore::RenderTheme::paintDecorations):
* rendering/RenderTheme.h:
(WebCore::RenderTheme::paintTextField):
(WebCore::RenderTheme::paintTextFieldDecorations):
(WebCore::RenderTheme::paintTextArea):
(WebCore::RenderTheme::paintTextAreaDecorations):
* rendering/RenderThemeIOS.h:
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::paintTextFieldDecorations):
(WebCore::RenderThemeIOS::paintTextAreaDecorations):
* rendering/RenderThemeMac.h:
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintTextField):
(WebCore::RenderThemeMac::paintTextArea):
LayoutTests:
* fast/forms/hidpi-textarea-on-subpixel-position-expected.html: Added.
* fast/forms/hidpi-textarea-on-subpixel-position.html: Added.
* platform/mac-wk2/TestExpectations: Due to defective RenderLayer cliprect calculation (WK2 only): webkit.org/b/132100</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk2TestExpectations">trunk/LayoutTests/platform/mac-wk2/TestExpectations</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBoxcpp">trunk/Source/WebCore/rendering/RenderBox.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderThemecpp">trunk/Source/WebCore/rendering/RenderTheme.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderThemeh">trunk/Source/WebCore/rendering/RenderTheme.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderThemeIOSh">trunk/Source/WebCore/rendering/RenderThemeIOS.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderThemeIOSmm">trunk/Source/WebCore/rendering/RenderThemeIOS.mm</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderThemeMach">trunk/Source/WebCore/rendering/RenderThemeMac.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderThemeMacmm">trunk/Source/WebCore/rendering/RenderThemeMac.mm</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastformshidpitextareaonsubpixelpositionexpectedhtml">trunk/LayoutTests/fast/forms/hidpi-textarea-on-subpixel-position-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastformshidpitextareaonsubpixelpositionhtml">trunk/LayoutTests/fast/forms/hidpi-textarea-on-subpixel-position.html</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (167770 => 167771)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-04-24 20:24:13 UTC (rev 167770)
+++ trunk/LayoutTests/ChangeLog        2014-04-24 20:46:26 UTC (rev 167771)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2014-04-24 Zalan Bujtas <zalan@apple.com>
+
+ Subpixel rendering: Clipping on text areas when shifted by one device pixel.
+ https://bugs.webkit.org/show_bug.cgi?id=132008
+
+ Reviewed by Darin Adler.
+
+ Make RenderTheme paint* functions LayoutRect aware. Textarea is device pixel snapped, while
+ other theme controls are still on integral size/positions.
+
+ * fast/forms/hidpi-textarea-on-subpixel-position-expected.html: Added.
+ * fast/forms/hidpi-textarea-on-subpixel-position.html: Added.
+ * platform/mac-wk2/TestExpectations: Due to defective RenderLayer cliprect calculation (WK2 only): webkit.org/b/132100
+
</ins><span class="cx"> 2014-04-24 Eduardo Lima Mitev <elima@igalia.com>
</span><span class="cx">
</span><span class="cx"> Unreviewed GTK gardening
</span></span></pre></div>
<a id="trunkLayoutTestsfastformshidpitextareaonsubpixelpositionexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/forms/hidpi-textarea-on-subpixel-position-expected.html (0 => 167771)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/forms/hidpi-textarea-on-subpixel-position-expected.html         (rev 0)
+++ trunk/LayoutTests/fast/forms/hidpi-textarea-on-subpixel-position-expected.html        2014-04-24 20:46:26 UTC (rev 167771)
</span><span class="lines">@@ -0,0 +1,55 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+<title>This tests that we can subpixel position textareas properly.</title>
+<style>
+ div {
+ position: fixed;
+ }
+
+ .outer {
+ border: 0.5px solid black;
+ }
+
+ .cover {
+ width: 5px;
+ height: 5px;
+ position: fixed;
+ background: green;
+ }
+</style>
+</head>
+<body>
+<p id="container"></p>
+<script>
+ var container = document.getElementById("container");
+ adjustment = 0.2;
+ w=20; h=20;
+ for (i = 0; i < 15; ++i) {
+ adjustment+=0.1;
+ for (j = 0; j < 15; ++j) {
+ var e = document.createElement("div");
+ var topLeftY = ((w + 10) * i + j * adjustment);
+ var topLeftX = ((w + 10) * j + i * adjustment);
+ e.style.top = topLeftY + "px";
+ e.style.left = topLeftX + "px";
+ e.style.width = w + "px";
+ e.style.height = h + "px";
+ e.className = "outer";
+ container.appendChild(e);
+
+ var cover = document.createElement("div");
+ cover.style.top = (topLeftY + h - h/2 + 1) + "px";
+ cover.style.left = (topLeftX + w - w/2 + 1) + "px";
+ cover.style.width = w/2 + "px";
+ cover.style.height = h/2 + "px";
+ cover.className = "cover";
+ container.appendChild(cover);
+
+ w+=0.1;
+ h+=0.1;
+ }
+ }
+</script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsfastformshidpitextareaonsubpixelpositionhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/forms/hidpi-textarea-on-subpixel-position.html (0 => 167771)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/forms/hidpi-textarea-on-subpixel-position.html         (rev 0)
+++ trunk/LayoutTests/fast/forms/hidpi-textarea-on-subpixel-position.html        2014-04-24 20:46:26 UTC (rev 167771)
</span><span class="lines">@@ -0,0 +1,54 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+<title>This tests that we can subpixel position textareas properly.</title>
+<style>
+ textarea {
+ width: 9px;
+ height: 9px;
+ position: fixed;
+ margin: 0px;
+ padding: 0px;
+ border: 0.5px solid black;
+ }
+
+ div {
+ width: 5px;
+ height: 5px;
+ position: fixed;
+ background: green;
+ }
+</style>
+</head>
+<body>
+<p id="container"></p>
+<script>
+ var container = document.getElementById("container");
+ adjustment = 0.2;
+ w=20; h=20;
+ for (i = 0; i < 15; ++i) {
+ adjustment+=0.1;
+ for (j = 0; j < 15; ++j) {
+ var e = document.createElement("textarea");
+ var topLeftY = ((w + 10) * i + j * adjustment);
+ var topLeftX = ((w + 10) * j + i * adjustment);
+ e.style.top = topLeftY + "px";
+ e.style.left = topLeftX + "px";
+ e.style.width = w + "px";
+ e.style.height = h + "px";
+ container.appendChild(e);
+
+ var cover = document.createElement("div");
+ cover.style.top = (topLeftY + h - h/2 + 1) + "px";
+ cover.style.left = (topLeftX + w - w/2 + 1) + "px";
+ cover.style.width = w/2 + "px";
+ cover.style.height = h/2 + "px";
+ container.appendChild(cover);
+
+ w+=0.1;
+ h+=0.1;
+ }
+ }
+</script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2TestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-wk2/TestExpectations (167770 => 167771)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/TestExpectations        2014-04-24 20:24:13 UTC (rev 167770)
+++ trunk/LayoutTests/platform/mac-wk2/TestExpectations        2014-04-24 20:46:26 UTC (rev 167771)
</span><span class="lines">@@ -349,6 +349,9 @@
</span><span class="cx">
</span><span class="cx"> webkit.org/b/131477 fast/repaint/obscured-background-no-repaint.html [ Pass Failure ]
</span><span class="cx">
</span><ins>+# Subpixel wrong cliprect on WK2
+webkit.org/b/132100 fast/forms/hidpi-textarea-on-subpixel-position.html [ ImageOnlyFailure ]
+
</ins><span class="cx"> ### END OF (1) Classified failures with bug reports
</span><span class="cx"> ########################################
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (167770 => 167771)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-04-24 20:24:13 UTC (rev 167770)
+++ trunk/Source/WebCore/ChangeLog        2014-04-24 20:46:26 UTC (rev 167771)
</span><span class="lines">@@ -1,3 +1,35 @@
</span><ins>+2014-04-24 Zalan Bujtas <zalan@apple.com>
+
+ Subpixel rendering: Clipping on text areas when shifted by one device pixel.
+ https://bugs.webkit.org/show_bug.cgi?id=132008
+
+ Reviewed by Darin Adler.
+
+ Make RenderTheme paint* functions LayoutRect aware. Textarea is device pixel snapped, while
+ other theme controls are still on integral size/positions.
+
+ Test: fast/forms/hidpi-textarea-on-subpixel-position.html
+
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::paintBoxDecorations):
+ * rendering/RenderTheme.cpp:
+ (WebCore::RenderTheme::paint):
+ (WebCore::RenderTheme::paintBorderOnly):
+ (WebCore::RenderTheme::paintDecorations):
+ * rendering/RenderTheme.h:
+ (WebCore::RenderTheme::paintTextField):
+ (WebCore::RenderTheme::paintTextFieldDecorations):
+ (WebCore::RenderTheme::paintTextArea):
+ (WebCore::RenderTheme::paintTextAreaDecorations):
+ * rendering/RenderThemeIOS.h:
+ * rendering/RenderThemeIOS.mm:
+ (WebCore::RenderThemeIOS::paintTextFieldDecorations):
+ (WebCore::RenderThemeIOS::paintTextAreaDecorations):
+ * rendering/RenderThemeMac.h:
+ * rendering/RenderThemeMac.mm:
+ (WebCore::RenderThemeMac::paintTextField):
+ (WebCore::RenderThemeMac::paintTextArea):
+
</ins><span class="cx"> 2014-04-24 Myles C. Maxfield <mmaxfield@apple.com>
</span><span class="cx">
</span><span class="cx"> FontCache::fontCache() never returns nullptr so it can be made to return a reference instead
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (167770 => 167771)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBox.cpp        2014-04-24 20:24:13 UTC (rev 167770)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp        2014-04-24 20:46:26 UTC (rev 167771)
</span><span class="lines">@@ -1215,8 +1215,6 @@
</span><span class="cx">
</span><span class="cx"> // If we have a native theme appearance, paint that before painting our background.
</span><span class="cx"> // The theme will tell us whether or not we should also paint the CSS background.
</span><del>- IntRect snappedPaintRect(pixelSnappedIntRect(paintRect));
-
</del><span class="cx"> ControlStates* controlStates = nullptr;
</span><span class="cx"> if (style().hasAppearance()) {
</span><span class="cx"> if (hasControlStatesForRenderer(this))
</span><span class="lines">@@ -1227,7 +1225,7 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>- bool themePainted = style().hasAppearance() && !theme().paint(*this, controlStates, paintInfo, snappedPaintRect);
</del><ins>+ bool themePainted = style().hasAppearance() && !theme().paint(*this, controlStates, paintInfo, paintRect);
</ins><span class="cx">
</span><span class="cx"> if (controlStates && controlStates->needsRepaint())
</span><span class="cx"> m_repaintTimer.startOneShot(0);
</span><span class="lines">@@ -1239,12 +1237,12 @@
</span><span class="cx"> paintBackground(paintInfo, paintRect, bleedAvoidance);
</span><span class="cx">
</span><span class="cx"> if (style().hasAppearance())
</span><del>- theme().paintDecorations(*this, paintInfo, snappedPaintRect);
</del><ins>+ theme().paintDecorations(*this, paintInfo, paintRect);
</ins><span class="cx"> }
</span><span class="cx"> paintBoxShadow(paintInfo, paintRect, style(), Inset);
</span><span class="cx">
</span><span class="cx"> // The theme will tell us whether or not we should also paint the CSS border.
</span><del>- if (bleedAvoidance != BackgroundBleedBackgroundOverBorder && (!style().hasAppearance() || (!themePainted && theme().paintBorderOnly(*this, paintInfo, snappedPaintRect))) && style().hasBorder())
</del><ins>+ if (bleedAvoidance != BackgroundBleedBackgroundOverBorder && (!style().hasAppearance() || (!themePainted && theme().paintBorderOnly(*this, paintInfo, paintRect))) && style().hasBorder())
</ins><span class="cx"> paintBorder(paintInfo, paintRect, style(), bleedAvoidance);
</span><span class="cx">
</span><span class="cx"> if (bleedAvoidance == BackgroundBleedUseTransparencyLayer)
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderThemecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderTheme.cpp (167770 => 167771)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderTheme.cpp        2014-04-24 20:24:13 UTC (rev 167770)
+++ trunk/Source/WebCore/rendering/RenderTheme.cpp        2014-04-24 20:46:26 UTC (rev 167771)
</span><span class="lines">@@ -263,7 +263,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 IntRect& 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">@@ -277,6 +277,7 @@
</span><span class="cx"> return false;
</span><span class="cx">
</span><span class="cx"> ControlPart part = o.style().appearance();
</span><ins>+ IntRect integralSnappedRect = pixelSnappedIntRect(r);
</ins><span class="cx">
</span><span class="cx"> #if USE(NEW_THEME)
</span><span class="cx"> switch (part) {
</span><span class="lines">@@ -288,7 +289,7 @@
</span><span class="cx"> case ButtonPart:
</span><span class="cx"> case InnerSpinButtonPart:
</span><span class="cx"> updateControlStatesForRenderer(o, controlStates);
</span><del>- m_theme->paint(part, controlStates, const_cast<GraphicsContext*>(paintInfo.context), r, o.style().effectiveZoom(), &o.view().frameView());
</del><ins>+ m_theme->paint(part, controlStates, const_cast<GraphicsContext*>(paintInfo.context), integralSnappedRect, o.style().effectiveZoom(), &o.view().frameView());
</ins><span class="cx"> return false;
</span><span class="cx"> default:
</span><span class="cx"> break;
</span><span class="lines">@@ -301,102 +302,102 @@
</span><span class="cx"> switch (part) {
</span><span class="cx"> #if !USE(NEW_THEME)
</span><span class="cx"> case CheckboxPart:
</span><del>- return paintCheckbox(o, paintInfo, r);
</del><ins>+ return paintCheckbox(o, paintInfo, integralSnappedRect);
</ins><span class="cx"> case RadioPart:
</span><del>- return paintRadio(o, paintInfo, r);
</del><ins>+ return paintRadio(o, paintInfo, integralSnappedRect);
</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 paintButton(o, paintInfo, r);
</del><ins>+ return paintButton(o, paintInfo, integralSnappedRect);
</ins><span class="cx"> case InnerSpinButtonPart:
</span><del>- return paintInnerSpinButton(o, paintInfo, r);
</del><ins>+ return paintInnerSpinButton(o, paintInfo, integralSnappedRect);
</ins><span class="cx"> #endif
</span><span class="cx"> case MenulistPart:
</span><del>- return paintMenuList(o, paintInfo, r);
</del><ins>+ return paintMenuList(o, paintInfo, integralSnappedRect);
</ins><span class="cx"> #if ENABLE(METER_ELEMENT)
</span><span class="cx"> case MeterPart:
</span><span class="cx"> case RelevancyLevelIndicatorPart:
</span><span class="cx"> case ContinuousCapacityLevelIndicatorPart:
</span><span class="cx"> case DiscreteCapacityLevelIndicatorPart:
</span><span class="cx"> case RatingLevelIndicatorPart:
</span><del>- return paintMeter(o, paintInfo, r);
</del><ins>+ return paintMeter(o, paintInfo, integralSnappedRect);
</ins><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(PROGRESS_ELEMENT)
</span><span class="cx"> case ProgressBarPart:
</span><del>- return paintProgressBar(o, paintInfo, r);
</del><ins>+ return paintProgressBar(o, paintInfo, integralSnappedRect);
</ins><span class="cx"> #endif
</span><span class="cx"> case SliderHorizontalPart:
</span><span class="cx"> case SliderVerticalPart:
</span><del>- return paintSliderTrack(o, paintInfo, r);
</del><ins>+ return paintSliderTrack(o, paintInfo, integralSnappedRect);
</ins><span class="cx"> case SliderThumbHorizontalPart:
</span><span class="cx"> case SliderThumbVerticalPart:
</span><del>- return paintSliderThumb(o, paintInfo, r);
</del><ins>+ return paintSliderThumb(o, paintInfo, integralSnappedRect);
</ins><span class="cx"> case MediaEnterFullscreenButtonPart:
</span><span class="cx"> case MediaExitFullscreenButtonPart:
</span><del>- return paintMediaFullscreenButton(o, paintInfo, r);
</del><ins>+ return paintMediaFullscreenButton(o, paintInfo, integralSnappedRect);
</ins><span class="cx"> case MediaPlayButtonPart:
</span><del>- return paintMediaPlayButton(o, paintInfo, r);
</del><ins>+ return paintMediaPlayButton(o, paintInfo, integralSnappedRect);
</ins><span class="cx"> case MediaOverlayPlayButtonPart:
</span><del>- return paintMediaOverlayPlayButton(o, paintInfo, r);
</del><ins>+ return paintMediaOverlayPlayButton(o, paintInfo, integralSnappedRect);
</ins><span class="cx"> case MediaMuteButtonPart:
</span><del>- return paintMediaMuteButton(o, paintInfo, r);
</del><ins>+ return paintMediaMuteButton(o, paintInfo, integralSnappedRect);
</ins><span class="cx"> case MediaSeekBackButtonPart:
</span><del>- return paintMediaSeekBackButton(o, paintInfo, r);
</del><ins>+ return paintMediaSeekBackButton(o, paintInfo, integralSnappedRect);
</ins><span class="cx"> case MediaSeekForwardButtonPart:
</span><del>- return paintMediaSeekForwardButton(o, paintInfo, r);
</del><ins>+ return paintMediaSeekForwardButton(o, paintInfo, integralSnappedRect);
</ins><span class="cx"> case MediaRewindButtonPart:
</span><del>- return paintMediaRewindButton(o, paintInfo, r);
</del><ins>+ return paintMediaRewindButton(o, paintInfo, integralSnappedRect);
</ins><span class="cx"> case MediaReturnToRealtimeButtonPart:
</span><del>- return paintMediaReturnToRealtimeButton(o, paintInfo, r);
</del><ins>+ return paintMediaReturnToRealtimeButton(o, paintInfo, integralSnappedRect);
</ins><span class="cx"> case MediaToggleClosedCaptionsButtonPart:
</span><del>- return paintMediaToggleClosedCaptionsButton(o, paintInfo, r);
</del><ins>+ return paintMediaToggleClosedCaptionsButton(o, paintInfo, integralSnappedRect);
</ins><span class="cx"> case MediaSliderPart:
</span><del>- return paintMediaSliderTrack(o, paintInfo, r);
</del><ins>+ return paintMediaSliderTrack(o, paintInfo, integralSnappedRect);
</ins><span class="cx"> case MediaSliderThumbPart:
</span><del>- return paintMediaSliderThumb(o, paintInfo, r);
</del><ins>+ return paintMediaSliderThumb(o, paintInfo, integralSnappedRect);
</ins><span class="cx"> case MediaVolumeSliderMuteButtonPart:
</span><del>- return paintMediaMuteButton(o, paintInfo, r);
</del><ins>+ return paintMediaMuteButton(o, paintInfo, integralSnappedRect);
</ins><span class="cx"> case MediaVolumeSliderContainerPart:
</span><del>- return paintMediaVolumeSliderContainer(o, paintInfo, r);
</del><ins>+ return paintMediaVolumeSliderContainer(o, paintInfo, integralSnappedRect);
</ins><span class="cx"> case MediaVolumeSliderPart:
</span><del>- return paintMediaVolumeSliderTrack(o, paintInfo, r);
</del><ins>+ return paintMediaVolumeSliderTrack(o, paintInfo, integralSnappedRect);
</ins><span class="cx"> case MediaVolumeSliderThumbPart:
</span><del>- return paintMediaVolumeSliderThumb(o, paintInfo, r);
</del><ins>+ return paintMediaVolumeSliderThumb(o, paintInfo, integralSnappedRect);
</ins><span class="cx"> case MediaFullScreenVolumeSliderPart:
</span><del>- return paintMediaFullScreenVolumeSliderTrack(o, paintInfo, r);
</del><ins>+ return paintMediaFullScreenVolumeSliderTrack(o, paintInfo, integralSnappedRect);
</ins><span class="cx"> case MediaFullScreenVolumeSliderThumbPart:
</span><del>- return paintMediaFullScreenVolumeSliderThumb(o, paintInfo, r);
</del><ins>+ return paintMediaFullScreenVolumeSliderThumb(o, paintInfo, integralSnappedRect);
</ins><span class="cx"> case MediaTimeRemainingPart:
</span><del>- return paintMediaTimeRemaining(o, paintInfo, r);
</del><ins>+ return paintMediaTimeRemaining(o, paintInfo, integralSnappedRect);
</ins><span class="cx"> case MediaCurrentTimePart:
</span><del>- return paintMediaCurrentTime(o, paintInfo, r);
</del><ins>+ return paintMediaCurrentTime(o, paintInfo, integralSnappedRect);
</ins><span class="cx"> case MediaControlsBackgroundPart:
</span><del>- return paintMediaControlsBackground(o, paintInfo, r);
</del><ins>+ return paintMediaControlsBackground(o, paintInfo, integralSnappedRect);
</ins><span class="cx"> case MenulistButtonPart:
</span><span class="cx"> case TextFieldPart:
</span><span class="cx"> case TextAreaPart:
</span><span class="cx"> case ListboxPart:
</span><span class="cx"> return true;
</span><span class="cx"> case SearchFieldPart:
</span><del>- return paintSearchField(o, paintInfo, r);
</del><ins>+ return paintSearchField(o, paintInfo, integralSnappedRect);
</ins><span class="cx"> case SearchFieldCancelButtonPart:
</span><del>- return paintSearchFieldCancelButton(o, paintInfo, r);
</del><ins>+ return paintSearchFieldCancelButton(o, paintInfo, integralSnappedRect);
</ins><span class="cx"> case SearchFieldDecorationPart:
</span><del>- return paintSearchFieldDecorationPart(o, paintInfo, r);
</del><ins>+ return paintSearchFieldDecorationPart(o, paintInfo, integralSnappedRect);
</ins><span class="cx"> case SearchFieldResultsDecorationPart:
</span><del>- return paintSearchFieldResultsDecorationPart(o, paintInfo, r);
</del><ins>+ return paintSearchFieldResultsDecorationPart(o, paintInfo, integralSnappedRect);
</ins><span class="cx"> case SearchFieldResultsButtonPart:
</span><del>- return paintSearchFieldResultsButton(o, paintInfo, r);
</del><ins>+ return paintSearchFieldResultsButton(o, paintInfo, integralSnappedRect);
</ins><span class="cx"> case SnapshottedPluginOverlayPart:
</span><del>- return paintSnapshottedPluginOverlay(o, paintInfo, r);
</del><ins>+ return paintSnapshottedPluginOverlay(o, paintInfo, integralSnappedRect);
</ins><span class="cx"> #if ENABLE(INPUT_SPEECH)
</span><span class="cx"> case InputSpeechButtonPart:
</span><del>- return paintInputFieldSpeechButton(o, paintInfo, r);
</del><ins>+ return paintInputFieldSpeechButton(o, paintInfo, integralSnappedRect);
</ins><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(IMAGE_CONTROLS)
</span><span class="cx"> case ImageControlsButtonPart:
</span><del>- return paintImageControlsButton(o, paintInfo, r);
</del><ins>+ return paintImageControlsButton(o, paintInfo, integralSnappedRect);
</ins><span class="cx"> #endif
</span><span class="cx"> default:
</span><span class="cx"> break;
</span><span class="lines">@@ -405,7 +406,7 @@
</span><span class="cx"> return true; // We don't support the appearance, so let the normal background/border paint.
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool RenderTheme::paintBorderOnly(const RenderObject& o, const PaintInfo& paintInfo, const IntRect& r)
</del><ins>+bool RenderTheme::paintBorderOnly(const RenderObject& o, const PaintInfo& paintInfo, const LayoutRect& r)
</ins><span class="cx"> {
</span><span class="cx"> if (paintInfo.context->paintingDisabled())
</span><span class="cx"> return false;
</span><span class="lines">@@ -414,13 +415,14 @@
</span><span class="cx"> UNUSED_PARAM(r);
</span><span class="cx"> return o.style().appearance() != NoControlPart;
</span><span class="cx"> #else
</span><ins>+ FloatRect devicePixelSnappedRect = pixelSnappedForPainting(r, o.document().deviceScaleFactor());
</ins><span class="cx"> // Call the appropriate paint method based off the appearance value.
</span><span class="cx"> switch (o.style().appearance()) {
</span><span class="cx"> case TextFieldPart:
</span><del>- return paintTextField(o, paintInfo, r);
</del><ins>+ return paintTextField(o, paintInfo, devicePixelSnappedRect);
</ins><span class="cx"> case ListboxPart:
</span><span class="cx"> case TextAreaPart:
</span><del>- return paintTextArea(o, paintInfo, r);
</del><ins>+ return paintTextArea(o, paintInfo, devicePixelSnappedRect);
</ins><span class="cx"> case MenulistButtonPart:
</span><span class="cx"> case SearchFieldPart:
</span><span class="cx"> return true;
</span><span class="lines">@@ -463,36 +465,39 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool RenderTheme::paintDecorations(const RenderObject& renderer, const PaintInfo& paintInfo, const IntRect& rect)
</del><ins>+bool RenderTheme::paintDecorations(const RenderObject& renderer, const PaintInfo& paintInfo, const LayoutRect& rect)
</ins><span class="cx"> {
</span><span class="cx"> if (paintInfo.context->paintingDisabled())
</span><span class="cx"> return false;
</span><span class="cx">
</span><ins>+ IntRect integralSnappedRect = pixelSnappedIntRect(rect);
+ FloatRect devicePixelSnappedRect = pixelSnappedForPainting(rect, renderer.document().deviceScaleFactor());
+
</ins><span class="cx"> // Call the appropriate paint method based off the appearance value.
</span><span class="cx"> switch (renderer.style().appearance()) {
</span><span class="cx"> case MenulistButtonPart:
</span><del>- return paintMenuListButtonDecorations(renderer, paintInfo, rect);
</del><ins>+ return paintMenuListButtonDecorations(renderer, paintInfo, integralSnappedRect);
</ins><span class="cx"> case TextFieldPart:
</span><del>- return paintTextFieldDecorations(renderer, paintInfo, rect);
</del><ins>+ return paintTextFieldDecorations(renderer, paintInfo, devicePixelSnappedRect);
</ins><span class="cx"> case TextAreaPart:
</span><del>- return paintTextAreaDecorations(renderer, paintInfo, rect);
</del><ins>+ return paintTextAreaDecorations(renderer, paintInfo, devicePixelSnappedRect);
</ins><span class="cx"> case CheckboxPart:
</span><del>- return paintCheckboxDecorations(renderer, paintInfo, rect);
</del><ins>+ return paintCheckboxDecorations(renderer, paintInfo, integralSnappedRect);
</ins><span class="cx"> case RadioPart:
</span><del>- return paintRadioDecorations(renderer, paintInfo, rect);
</del><ins>+ return paintRadioDecorations(renderer, paintInfo, integralSnappedRect);
</ins><span class="cx"> case PushButtonPart:
</span><del>- return paintPushButtonDecorations(renderer, paintInfo, rect);
</del><ins>+ return paintPushButtonDecorations(renderer, paintInfo, integralSnappedRect);
</ins><span class="cx"> case SquareButtonPart:
</span><del>- return paintSquareButtonDecorations(renderer, paintInfo, rect);
</del><ins>+ return paintSquareButtonDecorations(renderer, paintInfo, integralSnappedRect);
</ins><span class="cx"> case ButtonPart:
</span><del>- return paintButtonDecorations(renderer, paintInfo, rect);
</del><ins>+ return paintButtonDecorations(renderer, paintInfo, integralSnappedRect);
</ins><span class="cx"> case MenulistPart:
</span><del>- return paintMenuListDecorations(renderer, paintInfo, rect);
</del><ins>+ return paintMenuListDecorations(renderer, paintInfo, integralSnappedRect);
</ins><span class="cx"> case SliderThumbHorizontalPart:
</span><span class="cx"> case SliderThumbVerticalPart:
</span><del>- return paintSliderThumbDecorations(renderer, paintInfo, rect);
</del><ins>+ return paintSliderThumbDecorations(renderer, paintInfo, integralSnappedRect);
</ins><span class="cx"> case SearchFieldPart:
</span><del>- return paintSearchFieldDecorations(renderer, paintInfo, rect);
</del><ins>+ return paintSearchFieldDecorations(renderer, paintInfo, integralSnappedRect);
</ins><span class="cx"> #if ENABLE(METER_ELEMENT)
</span><span class="cx"> case MeterPart:
</span><span class="cx"> case RelevancyLevelIndicatorPart:
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderThemeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderTheme.h (167770 => 167771)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderTheme.h        2014-04-24 20:24:13 UTC (rev 167770)
+++ trunk/Source/WebCore/rendering/RenderTheme.h        2014-04-24 20:46:26 UTC (rev 167771)
</span><span class="lines">@@ -79,9 +79,9 @@
</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 IntRect&);
- bool paintBorderOnly(const RenderObject&, const PaintInfo&, const IntRect&);
- bool paintDecorations(const RenderObject&, const PaintInfo&, const IntRect&);
</del><ins>+ bool paint(const RenderObject&, ControlStates*, const PaintInfo&, const LayoutRect&);
+ bool paintBorderOnly(const RenderObject&, const PaintInfo&, const LayoutRect&);
+ bool paintDecorations(const RenderObject&, const PaintInfo&, const LayoutRect&);
</ins><span class="cx">
</span><span class="cx"> // The remaining methods should be implemented by the platform-specific portion of the theme, e.g.,
</span><span class="cx"> // RenderThemeMac.cpp for Mac OS X.
</span><span class="lines">@@ -287,12 +287,12 @@
</span><span class="cx"> virtual bool paintButtonDecorations(const RenderObject&, const PaintInfo&, const IntRect&) { return true; }
</span><span class="cx">
</span><span class="cx"> virtual void adjustTextFieldStyle(StyleResolver*, RenderStyle*, Element*) const;
</span><del>- virtual bool paintTextField(const RenderObject&, const PaintInfo&, const IntRect&) { return true; }
- virtual bool paintTextFieldDecorations(const RenderObject&, const PaintInfo&, const IntRect&) { return true; }
</del><ins>+ virtual bool paintTextField(const RenderObject&, const PaintInfo&, const FloatRect&) { return true; }
+ virtual bool paintTextFieldDecorations(const RenderObject&, const PaintInfo&, const FloatRect&) { return true; }
</ins><span class="cx">
</span><span class="cx"> virtual void adjustTextAreaStyle(StyleResolver*, RenderStyle*, Element*) const;
</span><del>- virtual bool paintTextArea(const RenderObject&, const PaintInfo&, const IntRect&) { return true; }
- virtual bool paintTextAreaDecorations(const RenderObject&, const PaintInfo&, const IntRect&) { return true; }
</del><ins>+ virtual bool paintTextArea(const RenderObject&, const PaintInfo&, const FloatRect&) { return true; }
+ virtual bool paintTextAreaDecorations(const RenderObject&, const PaintInfo&, const FloatRect&) { return true; }
</ins><span class="cx">
</span><span class="cx"> virtual void adjustMenuListStyle(StyleResolver*, RenderStyle*, Element*) const;
</span><span class="cx"> virtual bool paintMenuList(const RenderObject&, const PaintInfo&, const IntRect&) { return true; }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderThemeIOSh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderThemeIOS.h (167770 => 167771)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderThemeIOS.h        2014-04-24 20:24:13 UTC (rev 167770)
+++ trunk/Source/WebCore/rendering/RenderThemeIOS.h        2014-04-24 20:46:26 UTC (rev 167771)
</span><span class="lines">@@ -66,8 +66,8 @@
</span><span class="cx">
</span><span class="cx"> virtual bool paintFileUploadIconDecorations(const RenderObject& inputRenderer, const RenderObject& buttonRenderer, const PaintInfo&, const IntRect&, Icon*, FileUploadDecorations) override;
</span><span class="cx">
</span><del>- virtual bool paintTextFieldDecorations(const RenderObject&, const PaintInfo&, const IntRect&) override;
- virtual bool paintTextAreaDecorations(const RenderObject&, const PaintInfo&, const IntRect&) override;
</del><ins>+ virtual bool paintTextFieldDecorations(const RenderObject&, const PaintInfo&, const FloatRect&) override;
+ virtual bool paintTextAreaDecorations(const RenderObject&, const PaintInfo&, const FloatRect&) override;
</ins><span class="cx">
</span><span class="cx"> virtual void adjustMenuListButtonStyle(StyleResolver*, RenderStyle*, Element*) const override;
</span><span class="cx"> virtual bool paintMenuListButtonDecorations(const RenderObject&, const PaintInfo&, const IntRect&) override;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderThemeIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderThemeIOS.mm (167770 => 167771)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderThemeIOS.mm        2014-04-24 20:24:13 UTC (rev 167770)
+++ trunk/Source/WebCore/rendering/RenderThemeIOS.mm        2014-04-24 20:46:26 UTC (rev 167771)
</span><span class="lines">@@ -473,14 +473,14 @@
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool RenderThemeIOS::paintTextFieldDecorations(const RenderObject& box, const PaintInfo& paintInfo, const IntRect& rect)
</del><ins>+bool RenderThemeIOS::paintTextFieldDecorations(const RenderObject& box, const PaintInfo& paintInfo, const FloatRect& rect)
</ins><span class="cx"> {
</span><span class="cx"> RenderStyle& style = box.style();
</span><del>- IntPoint point(rect.x() + style.borderLeftWidth(), rect.y() + style.borderTopWidth());
</del><ins>+ FloatPoint point(rect.x() + style.borderLeftWidth(), rect.y() + style.borderTopWidth());
</ins><span class="cx">
</span><span class="cx"> GraphicsContextStateSaver stateSaver(*paintInfo.context);
</span><span class="cx">
</span><del>- paintInfo.context->clipRoundedRect(FloatRoundedRect(style.getRoundedBorderFor(rect)));
</del><ins>+ paintInfo.context->clipRoundedRect(FloatRoundedRect(style.getRoundedBorderFor(LayoutRect(rect))));
</ins><span class="cx">
</span><span class="cx"> // This gradient gets drawn black when printing.
</span><span class="cx"> // Do not draw the gradient if there is no visible top border.
</span><span class="lines">@@ -490,7 +490,7 @@
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool RenderThemeIOS::paintTextAreaDecorations(const RenderObject& box, const PaintInfo& paintInfo, const IntRect& rect)
</del><ins>+bool RenderThemeIOS::paintTextAreaDecorations(const RenderObject& box, const PaintInfo& paintInfo, const FloatRect& rect)
</ins><span class="cx"> {
</span><span class="cx"> return paintTextFieldDecorations(box, paintInfo, rect);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderThemeMach"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderThemeMac.h (167770 => 167771)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderThemeMac.h        2014-04-24 20:24:13 UTC (rev 167770)
+++ trunk/Source/WebCore/rendering/RenderThemeMac.h        2014-04-24 20:46:26 UTC (rev 167771)
</span><span class="lines">@@ -123,10 +123,10 @@
</span><span class="cx">
</span><span class="cx"> virtual bool supportsSelectionForegroundColors() const { return false; }
</span><span class="cx">
</span><del>- virtual bool paintTextField(const RenderObject&, const PaintInfo&, const IntRect&);
</del><ins>+ virtual bool paintTextField(const RenderObject&, const PaintInfo&, const FloatRect&);
</ins><span class="cx"> virtual void adjustTextFieldStyle(StyleResolver*, RenderStyle*, Element*) const;
</span><span class="cx">
</span><del>- virtual bool paintTextArea(const RenderObject&, const PaintInfo&, const IntRect&);
</del><ins>+ virtual bool paintTextArea(const RenderObject&, const PaintInfo&, const FloatRect&);
</ins><span class="cx"> virtual void adjustTextAreaStyle(StyleResolver*, RenderStyle*, Element*) const;
</span><span class="cx">
</span><span class="cx"> virtual bool paintMenuList(const RenderObject&, const PaintInfo&, const IntRect&);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderThemeMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderThemeMac.mm (167770 => 167771)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderThemeMac.mm        2014-04-24 20:24:13 UTC (rev 167770)
+++ trunk/Source/WebCore/rendering/RenderThemeMac.mm        2014-04-24 20:46:26 UTC (rev 167771)
</span><span class="lines">@@ -811,7 +811,7 @@
</span><span class="cx"> return NSMiniControlSize;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool RenderThemeMac::paintTextField(const RenderObject& o, const PaintInfo& paintInfo, const IntRect& r)
</del><ins>+bool RenderThemeMac::paintTextField(const RenderObject& o, const PaintInfo& paintInfo, const FloatRect& r)
</ins><span class="cx"> {
</span><span class="cx"> LocalCurrentGraphicsContext localContext(paintInfo.context);
</span><span class="cx">
</span><span class="lines">@@ -842,7 +842,7 @@
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool RenderThemeMac::paintTextArea(const RenderObject& o, const PaintInfo& paintInfo, const IntRect& r)
</del><ins>+bool RenderThemeMac::paintTextArea(const RenderObject& o, const PaintInfo& paintInfo, const FloatRect& r)
</ins><span class="cx"> {
</span><span class="cx"> LocalCurrentGraphicsContext localContext(paintInfo.context);
</span><span class="cx"> wkDrawBezeledTextArea(r, isEnabled(o) && !isReadOnlyControl(o));
</span></span></pre>
</div>
</div>
</body>
</html>