<!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>[165055] trunk/Source</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/165055">165055</a></dd>
<dt>Author</dt> <dd>zalan@apple.com</dd>
<dt>Date</dt> <dd>2014-03-04 09:06:50 -0800 (Tue, 04 Mar 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Subpixel rendering: Make GraphicsLayer::fillRect FloatRoundedRect based and cleanup dependencies.
https://bugs.webkit.org/show_bug.cgi?id=129557
Reviewed by Simon Fraser.
This is the preparation for snapping rounded rects to device pixel position. It enables
device pixel aware border-radius painting.
No change in functionality.
Source/WebCore:
* platform/efl/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::paintMediaSliderThumb):
* platform/graphics/FloatRoundedRect.cpp:
(WebCore::FloatRoundedRect::FloatRoundedRect):
(WebCore::FloatRoundedRect::isRenderable):
* platform/graphics/FloatRoundedRect.h:
* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::clipRoundedRect):
(WebCore::GraphicsContext::clipOutRoundedRect):
(WebCore::GraphicsContext::fillRoundedRect):
(WebCore::GraphicsContext::fillRectWithRoundedHole):
* platform/graphics/GraphicsContext.h:
* platform/graphics/Path.cpp:
(WebCore::Path::addRoundedRect):
* platform/graphics/Path.h:
* platform/graphics/RoundedRect.cpp:
(WebCore::RoundedRect::pixelSnappedRoundedRectForPainting):
* platform/graphics/RoundedRect.h:
* platform/graphics/ShadowBlur.cpp:
(WebCore::ShadowBlur::drawRectShadow):
(WebCore::ShadowBlur::drawInsetShadow):
(WebCore::ShadowBlur::drawRectShadowWithoutTiling):
(WebCore::ShadowBlur::drawInsetShadowWithoutTiling):
(WebCore::ShadowBlur::drawInsetShadowWithTiling):
(WebCore::ShadowBlur::drawRectShadowWithTiling):
* platform/graphics/ShadowBlur.h:
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::fillRect):
(WebCore::GraphicsContext::platformFillRoundedRect):
(WebCore::GraphicsContext::fillRectWithRoundedHole):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::fillRect):
(WebCore::GraphicsContext::platformFillRoundedRect):
(WebCore::GraphicsContext::fillRectWithRoundedHole):
* platform/graphics/wince/GraphicsContextWinCE.cpp:
(WebCore::GraphicsContext::fillRoundedRect):
* platform/gtk/RenderThemeGtk.cpp:
(WebCore::borderRadiiFromStyle):
(WebCore::RenderThemeGtk::paintMediaSliderTrack):
(WebCore::RenderThemeGtk::paintMediaSliderThumb):
(WebCore::RenderThemeGtk::paintMediaVolumeSliderTrack):
* platform/win/DragImageWin.cpp:
(WebCore::createDragImageForLink):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::paintBoxDecorations):
(WebCore::RenderBox::pushContentsClip):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::clipRoundedInnerRect):
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
(WebCore::RenderBoxModelObject::paintBorder):
(WebCore::RenderBoxModelObject::drawBoxSideFromPath):
(WebCore::RenderBoxModelObject::clipBorderSideForComplexInnerPath):
(WebCore::RenderBoxModelObject::paintBoxShadow):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::clipToRect):
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::paintRadioDecorations):
(WebCore::RenderThemeIOS::paintTextFieldDecorations):
(WebCore::RenderThemeIOS::paintMenuListButtonDecorations):
(WebCore::RenderThemeIOS::paintSliderTrack):
(WebCore::RenderThemeIOS::paintProgressBar):
(WebCore::RenderThemeIOS::paintFileUploadIconDecorations):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintMenuListButtonGradients):
(WebCore::RenderThemeMac::paintSliderTrack):
* rendering/RenderThemeSafari.cpp:
(WebCore::RenderThemeSafari::paintMenuListButtonGradients):
(WebCore::RenderThemeSafari::paintSliderTrack):
* rendering/shapes/BoxShape.cpp:
(WebCore::BoxShape::buildDisplayPaths):
* rendering/style/BasicShapes.cpp:
(WebCore::BasicShapeInset::path):
Source/WebKit/win:
* FullscreenVideoController.cpp:
(HUDSlider::draw):
(FullscreenVideoController::draw):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreplatformeflRenderThemeEflcpp">trunk/Source/WebCore/platform/efl/RenderThemeEfl.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsFloatRoundedRectcpp">trunk/Source/WebCore/platform/graphics/FloatRoundedRect.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsFloatRoundedRecth">trunk/Source/WebCore/platform/graphics/FloatRoundedRect.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsGraphicsContextcpp">trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsGraphicsContexth">trunk/Source/WebCore/platform/graphics/GraphicsContext.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsPathcpp">trunk/Source/WebCore/platform/graphics/Path.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsPathh">trunk/Source/WebCore/platform/graphics/Path.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsRoundedRectcpp">trunk/Source/WebCore/platform/graphics/RoundedRect.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsRoundedRecth">trunk/Source/WebCore/platform/graphics/RoundedRect.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsShadowBlurcpp">trunk/Source/WebCore/platform/graphics/ShadowBlur.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsShadowBlurh">trunk/Source/WebCore/platform/graphics/ShadowBlur.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscairoGraphicsContextCairocpp">trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscgGraphicsContextCGcpp">trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicswinceGraphicsContextWinCEcpp">trunk/Source/WebCore/platform/graphics/wince/GraphicsContextWinCE.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgtkRenderThemeGtkcpp">trunk/Source/WebCore/platform/gtk/RenderThemeGtk.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformwinDragImageWincpp">trunk/Source/WebCore/platform/win/DragImageWin.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBoxcpp">trunk/Source/WebCore/rendering/RenderBox.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBoxModelObjectcpp">trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderLayercpp">trunk/Source/WebCore/rendering/RenderLayer.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderThemeIOSmm">trunk/Source/WebCore/rendering/RenderThemeIOS.mm</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderThemeMacmm">trunk/Source/WebCore/rendering/RenderThemeMac.mm</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderThemeSafaricpp">trunk/Source/WebCore/rendering/RenderThemeSafari.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingshapesBoxShapecpp">trunk/Source/WebCore/rendering/shapes/BoxShape.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleBasicShapescpp">trunk/Source/WebCore/rendering/style/BasicShapes.cpp</a></li>
<li><a href="#trunkSourceWebKitwinChangeLog">trunk/Source/WebKit/win/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitwinFullscreenVideoControllercpp">trunk/Source/WebKit/win/FullscreenVideoController.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (165054 => 165055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-03-04 17:05:26 UTC (rev 165054)
+++ trunk/Source/WebCore/ChangeLog        2014-03-04 17:06:50 UTC (rev 165055)
</span><span class="lines">@@ -1,3 +1,88 @@
</span><ins>+2014-03-04 Zalan Bujtas <zalan@apple.com>
+
+ Subpixel rendering: Make GraphicsLayer::fillRect FloatRoundedRect based and cleanup dependencies.
+ https://bugs.webkit.org/show_bug.cgi?id=129557
+
+ Reviewed by Simon Fraser.
+
+ This is the preparation for snapping rounded rects to device pixel position. It enables
+ device pixel aware border-radius painting.
+
+ No change in functionality.
+
+ * platform/efl/RenderThemeEfl.cpp:
+ (WebCore::RenderThemeEfl::paintMediaSliderThumb):
+ * platform/graphics/FloatRoundedRect.cpp:
+ (WebCore::FloatRoundedRect::FloatRoundedRect):
+ (WebCore::FloatRoundedRect::isRenderable):
+ * platform/graphics/FloatRoundedRect.h:
+ * platform/graphics/GraphicsContext.cpp:
+ (WebCore::GraphicsContext::clipRoundedRect):
+ (WebCore::GraphicsContext::clipOutRoundedRect):
+ (WebCore::GraphicsContext::fillRoundedRect):
+ (WebCore::GraphicsContext::fillRectWithRoundedHole):
+ * platform/graphics/GraphicsContext.h:
+ * platform/graphics/Path.cpp:
+ (WebCore::Path::addRoundedRect):
+ * platform/graphics/Path.h:
+ * platform/graphics/RoundedRect.cpp:
+ (WebCore::RoundedRect::pixelSnappedRoundedRectForPainting):
+ * platform/graphics/RoundedRect.h:
+ * platform/graphics/ShadowBlur.cpp:
+ (WebCore::ShadowBlur::drawRectShadow):
+ (WebCore::ShadowBlur::drawInsetShadow):
+ (WebCore::ShadowBlur::drawRectShadowWithoutTiling):
+ (WebCore::ShadowBlur::drawInsetShadowWithoutTiling):
+ (WebCore::ShadowBlur::drawInsetShadowWithTiling):
+ (WebCore::ShadowBlur::drawRectShadowWithTiling):
+ * platform/graphics/ShadowBlur.h:
+ * platform/graphics/cairo/GraphicsContextCairo.cpp:
+ (WebCore::GraphicsContext::fillRect):
+ (WebCore::GraphicsContext::platformFillRoundedRect):
+ (WebCore::GraphicsContext::fillRectWithRoundedHole):
+ * platform/graphics/cg/GraphicsContextCG.cpp:
+ (WebCore::GraphicsContext::fillRect):
+ (WebCore::GraphicsContext::platformFillRoundedRect):
+ (WebCore::GraphicsContext::fillRectWithRoundedHole):
+ * platform/graphics/wince/GraphicsContextWinCE.cpp:
+ (WebCore::GraphicsContext::fillRoundedRect):
+ * platform/gtk/RenderThemeGtk.cpp:
+ (WebCore::borderRadiiFromStyle):
+ (WebCore::RenderThemeGtk::paintMediaSliderTrack):
+ (WebCore::RenderThemeGtk::paintMediaSliderThumb):
+ (WebCore::RenderThemeGtk::paintMediaVolumeSliderTrack):
+ * platform/win/DragImageWin.cpp:
+ (WebCore::createDragImageForLink):
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::paintBoxDecorations):
+ (WebCore::RenderBox::pushContentsClip):
+ * rendering/RenderBoxModelObject.cpp:
+ (WebCore::RenderBoxModelObject::clipRoundedInnerRect):
+ (WebCore::RenderBoxModelObject::paintFillLayerExtended):
+ (WebCore::RenderBoxModelObject::paintBorder):
+ (WebCore::RenderBoxModelObject::drawBoxSideFromPath):
+ (WebCore::RenderBoxModelObject::clipBorderSideForComplexInnerPath):
+ (WebCore::RenderBoxModelObject::paintBoxShadow):
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::clipToRect):
+ * rendering/RenderThemeIOS.mm:
+ (WebCore::RenderThemeIOS::paintRadioDecorations):
+ (WebCore::RenderThemeIOS::paintTextFieldDecorations):
+ (WebCore::RenderThemeIOS::paintMenuListButtonDecorations):
+ (WebCore::RenderThemeIOS::paintSliderTrack):
+ (WebCore::RenderThemeIOS::paintProgressBar):
+ (WebCore::RenderThemeIOS::paintFileUploadIconDecorations):
+ * rendering/RenderThemeMac.mm:
+ (WebCore::RenderThemeMac::paintMenuListButtonGradients):
+ (WebCore::RenderThemeMac::paintSliderTrack):
+ * rendering/RenderThemeSafari.cpp:
+ (WebCore::RenderThemeSafari::paintMenuListButtonGradients):
+ (WebCore::RenderThemeSafari::paintSliderTrack):
+ * rendering/shapes/BoxShape.cpp:
+ (WebCore::BoxShape::buildDisplayPaths):
+ * rendering/style/BasicShapes.cpp:
+ (WebCore::BasicShapeInset::path):
+
</ins><span class="cx"> 2014-03-04 Andreas Kling <akling@apple.com>
</span><span class="cx">
</span><span class="cx"> Micro-optimize Strings in JS bindings.
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformeflRenderThemeEflcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/efl/RenderThemeEfl.cpp (165054 => 165055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/efl/RenderThemeEfl.cpp        2014-03-04 17:05:26 UTC (rev 165054)
+++ trunk/Source/WebCore/platform/efl/RenderThemeEfl.cpp        2014-03-04 17:06:50 UTC (rev 165055)
</span><span class="lines">@@ -30,6 +30,7 @@
</span><span class="cx"> #include "CSSValueKeywords.h"
</span><span class="cx"> #include "CairoUtilitiesEfl.h"
</span><span class="cx"> #include "ExceptionCodePlaceholder.h"
</span><ins>+#include "FloatRoundedRect.h"
</ins><span class="cx"> #include "FontDescription.h"
</span><span class="cx"> #include "GraphicsContext.h"
</span><span class="cx"> #include "HTMLInputElement.h"
</span><span class="lines">@@ -1242,7 +1243,7 @@
</span><span class="cx"> bool RenderThemeEfl::paintMediaSliderThumb(RenderObject*, const PaintInfo& info, const IntRect& rect)
</span><span class="cx"> {
</span><span class="cx"> IntSize thumbRect(3, 3);
</span><del>- info.context->fillRoundedRect(rect, thumbRect, thumbRect, thumbRect, thumbRect, m_sliderThumbColor, ColorSpaceDeviceRGB);
</del><ins>+ info.context->fillRoundedRect(FloatRoundedRect(rect, thumbRect, thumbRect, thumbRect, thumbRect), m_sliderThumbColor, ColorSpaceDeviceRGB);
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsFloatRoundedRectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/FloatRoundedRect.cpp (165054 => 165055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/FloatRoundedRect.cpp        2014-03-04 17:05:26 UTC (rev 165054)
+++ trunk/Source/WebCore/platform/graphics/FloatRoundedRect.cpp        2014-03-04 17:06:50 UTC (rev 165055)
</span><span class="lines">@@ -34,6 +34,12 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><ins>+FloatRoundedRect::FloatRoundedRect(const RoundedRect& rect)
+ : m_rect(rect.rect())
+ , m_radii(rect.radii())
+{
+}
+
</ins><span class="cx"> FloatRoundedRect::FloatRoundedRect(float x, float y, float width, float height)
</span><span class="cx"> : m_rect(x, y, width, height)
</span><span class="cx"> {
</span><span class="lines">@@ -137,4 +143,12 @@
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+bool FloatRoundedRect::isRenderable() const
+{
+ return m_radii.topLeft().width() + m_radii.topRight().width() <= m_rect.width()
+ && m_radii.bottomLeft().width() + m_radii.bottomRight().width() <= m_rect.width()
+ && m_radii.topLeft().height() + m_radii.bottomLeft().height() <= m_rect.height()
+ && m_radii.topRight().height() + m_radii.bottomRight().height() <= m_rect.height();
+}
+
</ins><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsFloatRoundedRecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/FloatRoundedRect.h (165054 => 165055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/FloatRoundedRect.h        2014-03-04 17:05:26 UTC (rev 165054)
+++ trunk/Source/WebCore/platform/graphics/FloatRoundedRect.h        2014-03-04 17:06:50 UTC (rev 165055)
</span><span class="lines">@@ -82,6 +82,7 @@
</span><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> explicit FloatRoundedRect(const FloatRect&, const Radii& = Radii());
</span><ins>+ explicit FloatRoundedRect(const RoundedRect&);
</ins><span class="cx"> FloatRoundedRect(float x, float y, float width, float height);
</span><span class="cx"> FloatRoundedRect(const FloatRect&, const FloatSize& topLeft, const FloatSize& topRight, const FloatSize& bottomLeft, const FloatSize& bottomRight);
</span><span class="cx">
</span><span class="lines">@@ -115,6 +116,7 @@
</span><span class="cx"> return FloatRect(m_rect.maxX() - m_radii.bottomRight().width(), m_rect.maxY() - m_radii.bottomRight().height(), m_radii.bottomRight().width(), m_radii.bottomRight().height());
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ bool isRenderable() const;
</ins><span class="cx"> bool xInterceptsAtY(float y, float& minXIntercept, float& maxXIntercept) const;
</span><span class="cx">
</span><span class="cx"> private:
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsGraphicsContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp (165054 => 165055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp        2014-03-04 17:05:26 UTC (rev 165054)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp        2014-03-04 17:06:50 UTC (rev 165055)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx">
</span><span class="cx"> #include "BidiResolver.h"
</span><span class="cx"> #include "BitmapImage.h"
</span><ins>+#include "FloatRoundedRect.h"
</ins><span class="cx"> #include "Gradient.h"
</span><span class="cx"> #include "ImageBuffer.h"
</span><span class="cx"> #include "IntRect.h"
</span><span class="lines">@@ -681,38 +682,21 @@
</span><span class="cx"> clip(FloatRect(rect));
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void GraphicsContext::clipRoundedRect(const RoundedRect& rect)
</del><ins>+void GraphicsContext::clipRoundedRect(const FloatRoundedRect& rect)
</ins><span class="cx"> {
</span><span class="cx"> if (paintingDisabled())
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- if (!rect.isRounded()) {
- clip(rect.rect());
- return;
- }
-
</del><span class="cx"> Path path;
</span><span class="cx"> path.addRoundedRect(rect);
</span><span class="cx"> clip(path);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-// FIXME: Consider writing this in terms of a specialized RoundedRect that uses FloatRect and FloatSize radii.
-void GraphicsContext::clipRoundedRect(const FloatRect& rect, const FloatSize& topLeft, const FloatSize& topRight,
- const FloatSize& bottomLeft, const FloatSize& bottomRight)
</del><ins>+void GraphicsContext::clipOutRoundedRect(const FloatRoundedRect& rect)
</ins><span class="cx"> {
</span><span class="cx"> if (paintingDisabled())
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- Path path;
- path.addRoundedRect(rect, topLeft, topRight, bottomLeft, bottomRight);
- clip(path);
-}
-
-void GraphicsContext::clipOutRoundedRect(const RoundedRect& rect)
-{
- if (paintingDisabled())
- return;
-
</del><span class="cx"> if (!rect.isRounded()) {
</span><span class="cx"> clipOut(rect.rect());
</span><span class="cx"> return;
</span><span class="lines">@@ -769,18 +753,18 @@
</span><span class="cx"> setCompositeOperation(previousOperator);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void GraphicsContext::fillRoundedRect(const RoundedRect& rect, const Color& color, ColorSpace colorSpace, BlendMode blendMode)
</del><ins>+void GraphicsContext::fillRoundedRect(const FloatRoundedRect& rect, const Color& color, ColorSpace colorSpace, BlendMode blendMode)
</ins><span class="cx"> {
</span><span class="cx"> if (rect.isRounded()) {
</span><span class="cx"> setCompositeOperation(compositeOperation(), blendMode);
</span><del>- fillRoundedRect(rect.rect(), rect.radii().topLeft(), rect.radii().topRight(), rect.radii().bottomLeft(), rect.radii().bottomRight(), color, colorSpace);
</del><ins>+ platformFillRoundedRect(rect, color, colorSpace);
</ins><span class="cx"> setCompositeOperation(compositeOperation());
</span><span class="cx"> } else
</span><span class="cx"> fillRect(rect.rect(), color, colorSpace, compositeOperation(), blendMode);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if !USE(CG) && !USE(CAIRO)
</span><del>-void GraphicsContext::fillRectWithRoundedHole(const IntRect& rect, const RoundedRect& roundedHoleRect, const Color& color, ColorSpace colorSpace)
</del><ins>+void GraphicsContext::fillRectWithRoundedHole(const IntRect& rect, const FloatRoundedRect& roundedHoleRect, const Color& color, ColorSpace colorSpace)
</ins><span class="cx"> {
</span><span class="cx"> if (paintingDisabled())
</span><span class="cx"> return;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsGraphicsContexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/GraphicsContext.h (165054 => 165055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/GraphicsContext.h        2014-03-04 17:05:26 UTC (rev 165054)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContext.h        2014-03-04 17:06:50 UTC (rev 165055)
</span><span class="lines">@@ -75,6 +75,7 @@
</span><span class="cx">
</span><span class="cx"> class AffineTransform;
</span><span class="cx"> class DrawingBuffer;
</span><ins>+ class FloatRoundedRect;
</ins><span class="cx"> class Gradient;
</span><span class="cx"> class GraphicsContextPlatformPrivate;
</span><span class="cx"> class ImageBuffer;
</span><span class="lines">@@ -294,9 +295,8 @@
</span><span class="cx"> void fillRect(const FloatRect&, const Color&, ColorSpace);
</span><span class="cx"> void fillRect(const FloatRect&, Gradient&);
</span><span class="cx"> void fillRect(const FloatRect&, const Color&, ColorSpace, CompositeOperator, BlendMode = BlendModeNormal);
</span><del>- void fillRoundedRect(const FloatRect&, const FloatSize& topLeft, const FloatSize& topRight, const FloatSize& bottomLeft, const FloatSize& bottomRight, const Color&, ColorSpace);
- void fillRoundedRect(const RoundedRect&, const Color&, ColorSpace, BlendMode = BlendModeNormal);
- void fillRectWithRoundedHole(const FloatRect&, const RoundedRect& roundedHoleRect, const Color&, ColorSpace);
</del><ins>+ void fillRoundedRect(const FloatRoundedRect&, const Color&, ColorSpace, BlendMode = BlendModeNormal);
+ void fillRectWithRoundedHole(const FloatRect&, const FloatRoundedRect& roundedHoleRect, const Color&, ColorSpace);
</ins><span class="cx">
</span><span class="cx"> void clearRect(const FloatRect&);
</span><span class="cx">
</span><span class="lines">@@ -327,13 +327,10 @@
</span><span class="cx">
</span><span class="cx"> void clip(const IntRect&);
</span><span class="cx"> void clip(const FloatRect&);
</span><del>- void clipRoundedRect(const RoundedRect&);
</del><ins>+ void clipRoundedRect(const FloatRoundedRect&);
</ins><span class="cx">
</span><del>- // FIXME: Consider writing this in terms of a specialized RoundedRect that uses FloatRect and FloatSize radii.
- void clipRoundedRect(const FloatRect&, const FloatSize& topLeft, const FloatSize& topRight, const FloatSize& bottomLeft, const FloatSize& bottomRight);
-
</del><span class="cx"> void clipOut(const FloatRect&);
</span><del>- void clipOutRoundedRect(const RoundedRect&);
</del><ins>+ void clipOutRoundedRect(const FloatRoundedRect&);
</ins><span class="cx"> void clipPath(const Path&, WindRule);
</span><span class="cx"> void clipConvexPolygon(size_t numPoints, const FloatPoint*, bool antialias = true);
</span><span class="cx"> void clipToImageBuffer(ImageBuffer*, const FloatRect&);
</span><span class="lines">@@ -570,6 +567,8 @@
</span><span class="cx"> void platformFillEllipse(const FloatRect&);
</span><span class="cx"> void platformStrokeEllipse(const FloatRect&);
</span><span class="cx">
</span><ins>+ void platformFillRoundedRect(const FloatRoundedRect&, const Color&, ColorSpace);
+
</ins><span class="cx"> GraphicsContextPlatformPrivate* m_data;
</span><span class="cx">
</span><span class="cx"> GraphicsContextState m_state;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsPathcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/Path.cpp (165054 => 165055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/Path.cpp        2014-03-04 17:05:26 UTC (rev 165054)
+++ trunk/Source/WebCore/platform/graphics/Path.cpp        2014-03-04 17:06:50 UTC (rev 165055)
</span><span class="lines">@@ -31,6 +31,7 @@
</span><span class="cx">
</span><span class="cx"> #include "FloatPoint.h"
</span><span class="cx"> #include "FloatRect.h"
</span><ins>+#include "FloatRoundedRect.h"
</ins><span class="cx"> #include "PathTraversalState.h"
</span><span class="cx"> #include "RoundedRect.h"
</span><span class="cx"> #include <math.h>
</span><span class="lines">@@ -91,11 +92,6 @@
</span><span class="cx"> return traversalState.m_normalAngle;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void Path::addRoundedRect(const RoundedRect& r)
-{
- addRoundedRect(r.rect(), r.radii().topLeft(), r.radii().topRight(), r.radii().bottomLeft(), r.radii().bottomRight());
-}
-
</del><span class="cx"> void Path::addRoundedRect(const FloatRect& rect, const FloatSize& roundingRadii, RoundedRectStrategy strategy)
</span><span class="cx"> {
</span><span class="cx"> if (rect.isEmpty())
</span><span class="lines">@@ -105,7 +101,7 @@
</span><span class="cx"> FloatSize halfSize(rect.width() / 2, rect.height() / 2);
</span><span class="cx">
</span><span class="cx"> // Apply the SVG corner radius constraints, per the rect section of the SVG shapes spec: if
</span><del>- // one of rx,ry is negative, then the other corner radius value is used. If both values are
</del><ins>+ // one of rx,ry is negative, then the other corner radius value is used. If both values are
</ins><span class="cx"> // negative then rx = ry = 0. If rx is greater than half of the width of the rectangle
</span><span class="cx"> // then set rx to half of the width; ry is handled similarly.
</span><span class="cx">
</span><span class="lines">@@ -121,38 +117,38 @@
</span><span class="cx"> if (radius.height() > halfSize.height())
</span><span class="cx"> radius.setHeight(halfSize.height());
</span><span class="cx">
</span><del>- addPathForRoundedRect(rect, radius, radius, radius, radius, strategy);
</del><ins>+ addRoundedRect(FloatRoundedRect(rect, radius, radius, radius, radius), strategy);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-void Path::addRoundedRect(const FloatRect& rect, const FloatSize& topLeftRadius, const FloatSize& topRightRadius, const FloatSize& bottomLeftRadius, const FloatSize& bottomRightRadius, RoundedRectStrategy strategy)
</del><ins>+void Path::addRoundedRect(const FloatRoundedRect& r, RoundedRectStrategy strategy)
</ins><span class="cx"> {
</span><del>- if (rect.isEmpty())
</del><ins>+ if (r.isEmpty())
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- if (rect.width() < topLeftRadius.width() + topRightRadius.width()
- || rect.width() < bottomLeftRadius.width() + bottomRightRadius.width()
- || rect.height() < topLeftRadius.height() + bottomLeftRadius.height()
- || rect.height() < topRightRadius.height() + bottomRightRadius.height()) {
</del><ins>+ const FloatRoundedRect::Radii& radii = r.radii();
+ const FloatRect& rect = r.rect();
+
+ if (!r.isRenderable()) {
</ins><span class="cx"> // If all the radii cannot be accommodated, return a rect.
</span><span class="cx"> addRect(rect);
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- addPathForRoundedRect(rect, topLeftRadius, topRightRadius, bottomLeftRadius, bottomRightRadius, strategy);
-}
-
-void Path::addPathForRoundedRect(const FloatRect& rect, const FloatSize& topLeftRadius, const FloatSize& topRightRadius, const FloatSize& bottomLeftRadius, const FloatSize& bottomRightRadius, RoundedRectStrategy strategy)
-{
</del><span class="cx"> if (strategy == PreferNativeRoundedRect) {
</span><span class="cx"> #if USE(CG)
</span><del>- platformAddPathForRoundedRect(rect, topLeftRadius, topRightRadius, bottomLeftRadius, bottomRightRadius);
</del><ins>+ platformAddPathForRoundedRect(rect, radii.topLeft(), radii.topRight(), radii.bottomLeft(), radii.bottomRight());
</ins><span class="cx"> return;
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx">
</span><del>- addBeziersForRoundedRect(rect, topLeftRadius, topRightRadius, bottomLeftRadius, bottomRightRadius);
</del><ins>+ addBeziersForRoundedRect(rect, radii.topLeft(), radii.topRight(), radii.bottomLeft(), radii.bottomRight());
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+void Path::addRoundedRect(const RoundedRect& r)
+{
+ addRoundedRect(FloatRoundedRect(r));
+}
+
</ins><span class="cx"> // Approximation of control point positions on a bezier to simulate a quarter of a circle.
</span><span class="cx"> // This is 1-kappa, where kappa = 4 * (sqrt(2) - 1) / 3
</span><span class="cx"> static const float gCircleControlPoint = 0.447715f;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsPathh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/Path.h (165054 => 165055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/Path.h        2014-03-04 17:05:26 UTC (rev 165054)
+++ trunk/Source/WebCore/platform/graphics/Path.h        2014-03-04 17:06:50 UTC (rev 165055)
</span><span class="lines">@@ -57,6 +57,7 @@
</span><span class="cx"> class AffineTransform;
</span><span class="cx"> class FloatPoint;
</span><span class="cx"> class FloatRect;
</span><ins>+ class FloatRoundedRect;
</ins><span class="cx"> class FloatSize;
</span><span class="cx"> class GraphicsContext;
</span><span class="cx"> class RoundedRect;
</span><span class="lines">@@ -129,7 +130,7 @@
</span><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> void addRoundedRect(const FloatRect&, const FloatSize& roundingRadii, RoundedRectStrategy = PreferNativeRoundedRect);
</span><del>- void addRoundedRect(const FloatRect&, const FloatSize& topLeftRadius, const FloatSize& topRightRadius, const FloatSize& bottomLeftRadius, const FloatSize& bottomRightRadius, RoundedRectStrategy = PreferNativeRoundedRect);
</del><ins>+ void addRoundedRect(const FloatRoundedRect&, RoundedRectStrategy = PreferNativeRoundedRect);
</ins><span class="cx"> void addRoundedRect(const RoundedRect&);
</span><span class="cx">
</span><span class="cx"> void translate(const FloatSize&);
</span><span class="lines">@@ -143,7 +144,6 @@
</span><span class="cx"> void apply(void* info, PathApplierFunction) const;
</span><span class="cx"> void transform(const AffineTransform&);
</span><span class="cx">
</span><del>- void addPathForRoundedRect(const FloatRect&, const FloatSize& topLeftRadius, const FloatSize& topRightRadius, const FloatSize& bottomLeftRadius, const FloatSize& bottomRightRadius, RoundedRectStrategy = PreferNativeRoundedRect);
</del><span class="cx"> void addBeziersForRoundedRect(const FloatRect&, const FloatSize& topLeftRadius, const FloatSize& topRightRadius, const FloatSize& bottomLeftRadius, const FloatSize& bottomRightRadius);
</span><span class="cx">
</span><span class="cx"> #if USE(CG)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsRoundedRectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/RoundedRect.cpp (165054 => 165055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/RoundedRect.cpp        2014-03-04 17:05:26 UTC (rev 165054)
+++ trunk/Source/WebCore/platform/graphics/RoundedRect.cpp        2014-03-04 17:06:50 UTC (rev 165055)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "RoundedRect.h"
</span><span class="cx">
</span><ins>+#include "FloatRoundedRect.h"
</ins><span class="cx"> #include "LayoutRect.h"
</span><span class="cx"> #include "LayoutUnit.h"
</span><span class="cx">
</span><span class="lines">@@ -236,4 +237,9 @@
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+FloatRoundedRect RoundedRect::pixelSnappedRoundedRectForPainting(float deviceScaleFactor) const
+{
+ return FloatRoundedRect(pixelSnappedForPainting(rect(), deviceScaleFactor), radii());
+}
+
</ins><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsRoundedRecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/RoundedRect.h (165054 => 165055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/RoundedRect.h        2014-03-04 17:05:26 UTC (rev 165054)
+++ trunk/Source/WebCore/platform/graphics/RoundedRect.h        2014-03-04 17:06:50 UTC (rev 165055)
</span><span class="lines">@@ -33,6 +33,7 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><ins>+class FloatRoundedRect;
</ins><span class="cx"> class LayoutUnit;
</span><span class="cx">
</span><span class="cx"> class RoundedRect {
</span><span class="lines">@@ -103,6 +104,8 @@
</span><span class="cx"> // This only works for convex quads.
</span><span class="cx"> bool intersectsQuad(const FloatQuad&) const;
</span><span class="cx">
</span><ins>+ FloatRoundedRect pixelSnappedRoundedRectForPainting(float deviceScaleFactor) const;
+
</ins><span class="cx"> private:
</span><span class="cx"> LayoutRect m_rect;
</span><span class="cx"> Radii m_radii;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsShadowBlurcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/ShadowBlur.cpp (165054 => 165055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/ShadowBlur.cpp        2014-03-04 17:05:26 UTC (rev 165054)
+++ trunk/Source/WebCore/platform/graphics/ShadowBlur.cpp        2014-03-04 17:06:50 UTC (rev 165055)
</span><span class="lines">@@ -509,9 +509,9 @@
</span><span class="cx"> templateSideLength + topSlice + bottomSlice);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void ShadowBlur::drawRectShadow(GraphicsContext* graphicsContext, const FloatRect& shadowedRect, const FloatRoundedRect::Radii& radii)
</del><ins>+void ShadowBlur::drawRectShadow(GraphicsContext* graphicsContext, const FloatRoundedRect& shadowedRect)
</ins><span class="cx"> {
</span><del>- IntRect layerRect = calculateLayerBoundingRect(graphicsContext, shadowedRect, graphicsContext->clipBounds());
</del><ins>+ IntRect layerRect = calculateLayerBoundingRect(graphicsContext, shadowedRect.rect(), graphicsContext->clipBounds());
</ins><span class="cx"> if (layerRect.isEmpty())
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="lines">@@ -520,23 +520,24 @@
</span><span class="cx"> // drawRectShadowWithTiling does not work with rotations.
</span><span class="cx"> // https://bugs.webkit.org/show_bug.cgi?id=45042
</span><span class="cx"> if (!graphicsContext->getCTM().preservesAxisAlignment() || m_type != BlurShadow) {
</span><del>- drawRectShadowWithoutTiling(graphicsContext, shadowedRect, radii, layerRect);
</del><ins>+ drawRectShadowWithoutTiling(graphicsContext, shadowedRect, layerRect);
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> IntSize edgeSize = blurredEdgeSize();
</span><del>- IntSize templateSize = this->templateSize(edgeSize, radii);
</del><ins>+ IntSize templateSize = this->templateSize(edgeSize, shadowedRect.radii());
+ const FloatRect& rect = shadowedRect.rect();
</ins><span class="cx">
</span><del>- if (templateSize.width() > shadowedRect.width() || templateSize.height() > shadowedRect.height()
</del><ins>+ if (templateSize.width() > rect.width() || templateSize.height() > rect.height()
</ins><span class="cx"> || (templateSize.width() * templateSize.height() > m_sourceRect.width() * m_sourceRect.height())) {
</span><del>- drawRectShadowWithoutTiling(graphicsContext, shadowedRect, radii, layerRect);
</del><ins>+ drawRectShadowWithoutTiling(graphicsContext, shadowedRect, layerRect);
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- drawRectShadowWithTiling(graphicsContext, shadowedRect, radii, templateSize, edgeSize);
</del><ins>+ drawRectShadowWithTiling(graphicsContext, shadowedRect, templateSize, edgeSize);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-void ShadowBlur::drawInsetShadow(GraphicsContext* graphicsContext, const FloatRect& rect, const FloatRect& holeRect, const FloatRoundedRect::Radii& holeRadii)
</del><ins>+void ShadowBlur::drawInsetShadow(GraphicsContext* graphicsContext, const FloatRect& rect, const FloatRoundedRect& holeRect)
</ins><span class="cx"> {
</span><span class="cx"> IntRect layerRect = calculateLayerBoundingRect(graphicsContext, rect, graphicsContext->clipBounds());
</span><span class="cx"> if (layerRect.isEmpty())
</span><span class="lines">@@ -547,33 +548,34 @@
</span><span class="cx"> // drawInsetShadowWithTiling does not work with rotations.
</span><span class="cx"> // https://bugs.webkit.org/show_bug.cgi?id=45042
</span><span class="cx"> if (!graphicsContext->getCTM().preservesAxisAlignment() || m_type != BlurShadow) {
</span><del>- drawInsetShadowWithoutTiling(graphicsContext, rect, holeRect, holeRadii, layerRect);
</del><ins>+ drawInsetShadowWithoutTiling(graphicsContext, rect, holeRect, layerRect);
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> IntSize edgeSize = blurredEdgeSize();
</span><del>- IntSize templateSize = this->templateSize(edgeSize, holeRadii);
</del><ins>+ IntSize templateSize = this->templateSize(edgeSize, holeRect.radii());
+ const FloatRect& hRect = holeRect.rect();
</ins><span class="cx">
</span><del>- if (templateSize.width() > holeRect.width() || templateSize.height() > holeRect.height()
- || (templateSize.width() * templateSize.height() > holeRect.width() * holeRect.height())) {
- drawInsetShadowWithoutTiling(graphicsContext, rect, holeRect, holeRadii, layerRect);
</del><ins>+ if (templateSize.width() > hRect.width() || templateSize.height() > hRect.height()
+ || (templateSize.width() * templateSize.height() > hRect.width() * hRect.height())) {
+ drawInsetShadowWithoutTiling(graphicsContext, rect, holeRect, layerRect);
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- drawInsetShadowWithTiling(graphicsContext, rect, holeRect, holeRadii, templateSize, edgeSize);
</del><ins>+ drawInsetShadowWithTiling(graphicsContext, rect, holeRect, templateSize, edgeSize);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-void ShadowBlur::drawRectShadowWithoutTiling(GraphicsContext* graphicsContext, const FloatRect& shadowedRect, const FloatRoundedRect::Radii& radii, const IntRect& layerRect)
</del><ins>+void ShadowBlur::drawRectShadowWithoutTiling(GraphicsContext* graphicsContext, const FloatRoundedRect& shadowedRect, const IntRect& layerRect)
</ins><span class="cx"> {
</span><span class="cx"> m_layerImage = ScratchBuffer::shared().getScratchBuffer(layerRect.size());
</span><span class="cx"> if (!m_layerImage)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- FloatRect bufferRelativeShadowedRect = shadowedRect;
</del><ins>+ FloatRect bufferRelativeShadowedRect = shadowedRect.rect();
</ins><span class="cx"> bufferRelativeShadowedRect.move(m_layerContextTranslation);
</span><span class="cx">
</span><span class="cx"> // Only redraw in the scratch buffer if its cached contents don't match our needs
</span><del>- bool redrawNeeded = ScratchBuffer::shared().setCachedShadowValues(m_blurRadius, Color::black, ColorSpaceDeviceRGB, bufferRelativeShadowedRect, radii, m_layerSize);
</del><ins>+ bool redrawNeeded = ScratchBuffer::shared().setCachedShadowValues(m_blurRadius, Color::black, ColorSpaceDeviceRGB, bufferRelativeShadowedRect, shadowedRect.radii(), m_layerSize);
</ins><span class="cx"> if (redrawNeeded) {
</span><span class="cx"> GraphicsContext* shadowContext = m_layerImage->context();
</span><span class="cx"> GraphicsContextStateSaver stateSaver(*shadowContext);
</span><span class="lines">@@ -582,11 +584,11 @@
</span><span class="cx"> shadowContext->clearRect(FloatRect(0, 0, m_layerSize.width() + 1, m_layerSize.height() + 1));
</span><span class="cx"> shadowContext->translate(m_layerContextTranslation);
</span><span class="cx"> shadowContext->setFillColor(Color::black, ColorSpaceDeviceRGB);
</span><del>- if (radii.isZero())
- shadowContext->fillRect(shadowedRect);
</del><ins>+ if (shadowedRect.radii().isZero())
+ shadowContext->fillRect(shadowedRect.rect());
</ins><span class="cx"> else {
</span><span class="cx"> Path path;
</span><del>- path.addRoundedRect(shadowedRect, radii.topLeft(), radii.topRight(), radii.bottomLeft(), radii.bottomRight());
</del><ins>+ path.addRoundedRect(shadowedRect);
</ins><span class="cx"> shadowContext->fillPath(path);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -598,7 +600,7 @@
</span><span class="cx"> ScratchBuffer::shared().scheduleScratchBufferPurge();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void ShadowBlur::drawInsetShadowWithoutTiling(GraphicsContext* graphicsContext, const FloatRect& rect, const FloatRect& holeRect, const FloatRoundedRect::Radii& holeRadii, const IntRect& layerRect)
</del><ins>+void ShadowBlur::drawInsetShadowWithoutTiling(GraphicsContext* graphicsContext, const FloatRect& rect, const FloatRoundedRect& holeRect, const IntRect& layerRect)
</ins><span class="cx"> {
</span><span class="cx"> m_layerImage = ScratchBuffer::shared().getScratchBuffer(layerRect.size());
</span><span class="cx"> if (!m_layerImage)
</span><span class="lines">@@ -607,11 +609,11 @@
</span><span class="cx"> FloatRect bufferRelativeRect = rect;
</span><span class="cx"> bufferRelativeRect.move(m_layerContextTranslation);
</span><span class="cx">
</span><del>- FloatRect bufferRelativeHoleRect = holeRect;
</del><ins>+ FloatRect bufferRelativeHoleRect = holeRect.rect();
</ins><span class="cx"> bufferRelativeHoleRect.move(m_layerContextTranslation);
</span><span class="cx">
</span><span class="cx"> // Only redraw in the scratch buffer if its cached contents don't match our needs
</span><del>- bool redrawNeeded = ScratchBuffer::shared().setCachedInsetShadowValues(m_blurRadius, Color::black, ColorSpaceDeviceRGB, bufferRelativeRect, bufferRelativeHoleRect, holeRadii);
</del><ins>+ bool redrawNeeded = ScratchBuffer::shared().setCachedInsetShadowValues(m_blurRadius, Color::black, ColorSpaceDeviceRGB, bufferRelativeRect, bufferRelativeHoleRect, holeRect.radii());
</ins><span class="cx"> if (redrawNeeded) {
</span><span class="cx"> GraphicsContext* shadowContext = m_layerImage->context();
</span><span class="cx"> GraphicsContextStateSaver stateSaver(*shadowContext);
</span><span class="lines">@@ -622,10 +624,10 @@
</span><span class="cx">
</span><span class="cx"> Path path;
</span><span class="cx"> path.addRect(rect);
</span><del>- if (holeRadii.isZero())
- path.addRect(holeRect);
</del><ins>+ if (holeRect.radii().isZero())
+ path.addRect(holeRect.rect());
</ins><span class="cx"> else
</span><del>- path.addRoundedRect(holeRect, holeRadii.topLeft(), holeRadii.topRight(), holeRadii.bottomLeft(), holeRadii.bottomRight());
</del><ins>+ path.addRoundedRect(holeRect);
</ins><span class="cx">
</span><span class="cx"> shadowContext->setFillRule(RULE_EVENODD);
</span><span class="cx"> shadowContext->setFillColor(Color::black, ColorSpaceDeviceRGB);
</span><span class="lines">@@ -671,7 +673,7 @@
</span><span class="cx"> the shadow.
</span><span class="cx"> */
</span><span class="cx">
</span><del>-void ShadowBlur::drawInsetShadowWithTiling(GraphicsContext* graphicsContext, const FloatRect& rect, const FloatRect& holeRect, const FloatRoundedRect::Radii& radii, const IntSize& templateSize, const IntSize& edgeSize)
</del><ins>+void ShadowBlur::drawInsetShadowWithTiling(GraphicsContext* graphicsContext, const FloatRect& rect, const FloatRoundedRect& holeRect, const IntSize& templateSize, const IntSize& edgeSize)
</ins><span class="cx"> {
</span><span class="cx"> m_layerImage = ScratchBuffer::shared().getScratchBuffer(templateSize);
</span><span class="cx"> if (!m_layerImage)
</span><span class="lines">@@ -682,7 +684,7 @@
</span><span class="cx"> FloatRect templateHole = FloatRect(edgeSize.width(), edgeSize.height(), templateSize.width() - 2 * edgeSize.width(), templateSize.height() - 2 * edgeSize.height());
</span><span class="cx">
</span><span class="cx"> // Only redraw in the scratch buffer if its cached contents don't match our needs
</span><del>- bool redrawNeeded = ScratchBuffer::shared().setCachedInsetShadowValues(m_blurRadius, m_color, m_colorSpace, templateBounds, templateHole, radii);
</del><ins>+ bool redrawNeeded = ScratchBuffer::shared().setCachedInsetShadowValues(m_blurRadius, m_color, m_colorSpace, templateBounds, templateHole, holeRect.radii());
</ins><span class="cx"> if (redrawNeeded) {
</span><span class="cx"> // Draw shadow into a new ImageBuffer.
</span><span class="cx"> GraphicsContext* shadowContext = m_layerImage->context();
</span><span class="lines">@@ -693,10 +695,10 @@
</span><span class="cx">
</span><span class="cx"> Path path;
</span><span class="cx"> path.addRect(templateBounds);
</span><del>- if (radii.isZero())
</del><ins>+ if (holeRect.radii().isZero())
</ins><span class="cx"> path.addRect(templateHole);
</span><span class="cx"> else
</span><del>- path.addRoundedRect(templateHole, radii.topLeft(), radii.topRight(), radii.bottomLeft(), radii.bottomRight());
</del><ins>+ path.addRoundedRect(FloatRoundedRect(templateHole, holeRect.radii()));
</ins><span class="cx">
</span><span class="cx"> shadowContext->fillPath(path);
</span><span class="cx">
</span><span class="lines">@@ -711,7 +713,7 @@
</span><span class="cx"> FloatRect boundingRect = rect;
</span><span class="cx"> boundingRect.move(offset);
</span><span class="cx">
</span><del>- FloatRect destHoleRect = holeRect;
</del><ins>+ FloatRect destHoleRect = holeRect.rect();
</ins><span class="cx"> destHoleRect.move(offset);
</span><span class="cx"> FloatRect destHoleBounds = destHoleRect;
</span><span class="cx"> destHoleBounds.inflateX(edgeSize.width());
</span><span class="lines">@@ -730,13 +732,13 @@
</span><span class="cx"> graphicsContext->fillPath(exteriorPath);
</span><span class="cx"> }
</span><span class="cx">
</span><del>- drawLayerPieces(graphicsContext, destHoleBounds, radii, edgeSize, templateSize, InnerShadow);
</del><ins>+ drawLayerPieces(graphicsContext, destHoleBounds, holeRect.radii(), edgeSize, templateSize, InnerShadow);
</ins><span class="cx">
</span><span class="cx"> m_layerImage = 0;
</span><span class="cx"> ScratchBuffer::shared().scheduleScratchBufferPurge();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void ShadowBlur::drawRectShadowWithTiling(GraphicsContext* graphicsContext, const FloatRect& shadowedRect, const FloatRoundedRect::Radii& radii, const IntSize& templateSize, const IntSize& edgeSize)
</del><ins>+void ShadowBlur::drawRectShadowWithTiling(GraphicsContext* graphicsContext, const FloatRoundedRect& shadowedRect, const IntSize& templateSize, const IntSize& edgeSize)
</ins><span class="cx"> {
</span><span class="cx"> m_layerImage = ScratchBuffer::shared().getScratchBuffer(templateSize);
</span><span class="cx"> if (!m_layerImage)
</span><span class="lines">@@ -745,7 +747,7 @@
</span><span class="cx"> FloatRect templateShadow = FloatRect(edgeSize.width(), edgeSize.height(), templateSize.width() - 2 * edgeSize.width(), templateSize.height() - 2 * edgeSize.height());
</span><span class="cx">
</span><span class="cx"> // Only redraw in the scratch buffer if its cached contents don't match our needs
</span><del>- bool redrawNeeded = ScratchBuffer::shared().setCachedShadowValues(m_blurRadius, m_color, m_colorSpace, templateShadow, radii, m_layerSize);
</del><ins>+ bool redrawNeeded = ScratchBuffer::shared().setCachedShadowValues(m_blurRadius, m_color, m_colorSpace, templateShadow, shadowedRect.radii(), m_layerSize);
</ins><span class="cx"> if (redrawNeeded) {
</span><span class="cx"> // Draw shadow into the ImageBuffer.
</span><span class="cx"> GraphicsContext* shadowContext = m_layerImage->context();
</span><span class="lines">@@ -754,11 +756,11 @@
</span><span class="cx"> shadowContext->clearRect(FloatRect(0, 0, templateSize.width(), templateSize.height()));
</span><span class="cx"> shadowContext->setFillColor(Color::black, ColorSpaceDeviceRGB);
</span><span class="cx">
</span><del>- if (radii.isZero())
</del><ins>+ if (shadowedRect.radii().isZero())
</ins><span class="cx"> shadowContext->fillRect(templateShadow);
</span><span class="cx"> else {
</span><span class="cx"> Path path;
</span><del>- path.addRoundedRect(templateShadow, radii.topLeft(), radii.topRight(), radii.bottomLeft(), radii.bottomRight());
</del><ins>+ path.addRoundedRect(FloatRoundedRect(templateShadow, shadowedRect.radii()));
</ins><span class="cx"> shadowContext->fillPath(path);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -770,12 +772,12 @@
</span><span class="cx"> offset.scale(1 / transform.xScale(), 1 / transform.yScale());
</span><span class="cx"> }
</span><span class="cx">
</span><del>- FloatRect shadowBounds = shadowedRect;
</del><ins>+ FloatRect shadowBounds = shadowedRect.rect();
</ins><span class="cx"> shadowBounds.move(offset);
</span><span class="cx"> shadowBounds.inflateX(edgeSize.width());
</span><span class="cx"> shadowBounds.inflateY(edgeSize.height());
</span><span class="cx">
</span><del>- drawLayerPieces(graphicsContext, shadowBounds, radii, edgeSize, templateSize, OuterShadow);
</del><ins>+ drawLayerPieces(graphicsContext, shadowBounds, shadowedRect.radii(), edgeSize, templateSize, OuterShadow);
</ins><span class="cx">
</span><span class="cx"> m_layerImage = 0;
</span><span class="cx"> ScratchBuffer::shared().scheduleScratchBufferPurge();
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsShadowBlurh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/ShadowBlur.h (165054 => 165055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/ShadowBlur.h        2014-03-04 17:05:26 UTC (rev 165054)
+++ trunk/Source/WebCore/platform/graphics/ShadowBlur.h        2014-03-04 17:06:50 UTC (rev 165055)
</span><span class="lines">@@ -63,8 +63,8 @@
</span><span class="cx"> GraphicsContext* beginShadowLayer(GraphicsContext*, const FloatRect& layerArea);
</span><span class="cx"> void endShadowLayer(GraphicsContext*);
</span><span class="cx">
</span><del>- void drawRectShadow(GraphicsContext*, const FloatRect&, const FloatRoundedRect::Radii&);
- void drawInsetShadow(GraphicsContext*, const FloatRect&, const FloatRect& holeRect, const FloatRoundedRect::Radii& holeRadii);
</del><ins>+ void drawRectShadow(GraphicsContext*, const FloatRoundedRect&);
+ void drawInsetShadow(GraphicsContext*, const FloatRect&, const FloatRoundedRect& holeRect);
</ins><span class="cx">
</span><span class="cx"> void blurLayerImage(unsigned char*, const IntSize&, int stride);
</span><span class="cx">
</span><span class="lines">@@ -87,11 +87,11 @@
</span><span class="cx"> IntRect calculateLayerBoundingRect(GraphicsContext*, const FloatRect& layerArea, const IntRect& clipRect);
</span><span class="cx"> IntSize templateSize(const IntSize& blurredEdgeSize, const FloatRoundedRect::Radii&) const;
</span><span class="cx">
</span><del>- void drawRectShadowWithoutTiling(GraphicsContext*, const FloatRect&, const FloatRoundedRect::Radii&, const IntRect& layerRect);
- void drawRectShadowWithTiling(GraphicsContext*, const FloatRect&, const FloatRoundedRect::Radii&, const IntSize& shadowTemplateSize, const IntSize& blurredEdgeSize);
</del><ins>+ void drawRectShadowWithoutTiling(GraphicsContext*, const FloatRoundedRect&, const IntRect& layerRect);
+ void drawRectShadowWithTiling(GraphicsContext*, const FloatRoundedRect&, const IntSize& shadowTemplateSize, const IntSize& blurredEdgeSize);
</ins><span class="cx">
</span><del>- void drawInsetShadowWithoutTiling(GraphicsContext*, const FloatRect&, const FloatRect& holeRect, const FloatRoundedRect::Radii&, const IntRect& layerRect);
- void drawInsetShadowWithTiling(GraphicsContext*, const FloatRect&, const FloatRect& holeRect, const FloatRoundedRect::Radii&, const IntSize& shadowTemplateSize, const IntSize& blurredEdgeSize);
</del><ins>+ void drawInsetShadowWithoutTiling(GraphicsContext*, const FloatRect&, const FloatRoundedRect& holeRect, const IntRect& layerRect);
+ void drawInsetShadowWithTiling(GraphicsContext*, const FloatRect&, const FloatRoundedRect& holeRect, const IntSize& shadowTemplateSize, const IntSize& blurredEdgeSize);
</ins><span class="cx">
</span><span class="cx"> void drawLayerPieces(GraphicsContext*, const FloatRect& shadowBounds, const FloatRoundedRect::Radii&, const IntSize& roundedRadius, const IntSize& templateSize, ShadowDirection);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscairoGraphicsContextCairocpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp (165054 => 165055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp        2014-03-04 17:05:26 UTC (rev 165054)
+++ trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp        2014-03-04 17:06:50 UTC (rev 165055)
</span><span class="lines">@@ -40,7 +40,7 @@
</span><span class="cx"> #include "DrawErrorUnderline.h"
</span><span class="cx"> #include "FloatConversion.h"
</span><span class="cx"> #include "FloatRect.h"
</span><del>-#include "Font.h"
</del><ins>+#include "FloatRoundedRect.h"
</ins><span class="cx"> #include "GraphicsContextPlatformPrivateCairo.h"
</span><span class="cx"> #include "IntRect.h"
</span><span class="cx"> #include "NotImplemented.h"
</span><span class="lines">@@ -460,7 +460,7 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> if (hasShadow())
</span><del>- platformContext()->shadowBlur().drawRectShadow(this, rect, RoundedRect::Radii());
</del><ins>+ platformContext()->shadowBlur().drawRectShadow(this, FloatRoundedRect(rect));
</ins><span class="cx">
</span><span class="cx"> fillRectWithColor(platformContext()->cr(), rect, color);
</span><span class="cx"> }
</span><span class="lines">@@ -1032,31 +1032,31 @@
</span><span class="cx"> cairo_set_fill_rule(cr, savedFillRule);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void GraphicsContext::fillRoundedRect(const FloatRect& r, const FloatSize& topLeft, const FloatSize& topRight, const FloatSize& bottomLeft, const FloatSize& bottomRight, const Color& color, ColorSpace)
</del><ins>+void GraphicsContext::platformFillRoundedRect(const FloatRoundedRect& rect, const Color& color, ColorSpace)
</ins><span class="cx"> {
</span><span class="cx"> if (paintingDisabled())
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> if (hasShadow())
</span><del>- platformContext()->shadowBlur().drawRectShadow(this, r, FloatRoundedRect::Radii(topLeft, topRight, bottomLeft, bottomRight));
</del><ins>+ platformContext()->shadowBlur().drawRectShadow(this, rect);
</ins><span class="cx">
</span><span class="cx"> cairo_t* cr = platformContext()->cr();
</span><span class="cx"> cairo_save(cr);
</span><span class="cx"> Path path;
</span><del>- path.addRoundedRect(r, topLeft, topRight, bottomLeft, bottomRight);
</del><ins>+ path.addRoundedRect(rect);
</ins><span class="cx"> appendWebCorePathToCairoContext(cr, path);
</span><span class="cx"> setSourceRGBAFromColor(cr, color);
</span><span class="cx"> cairo_fill(cr);
</span><span class="cx"> cairo_restore(cr);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void GraphicsContext::fillRectWithRoundedHole(const FloatRect& rect, const RoundedRect& roundedHoleRect, const Color& color, ColorSpace)
</del><ins>+void GraphicsContext::fillRectWithRoundedHole(const FloatRect& rect, const FloatRoundedRect& roundedHoleRect, const Color& color, ColorSpace)
</ins><span class="cx"> {
</span><span class="cx"> if (paintingDisabled() || !color.isValid())
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> if (this->mustUseShadowBlur())
</span><del>- platformContext()->shadowBlur().drawInsetShadow(this, rect, roundedHoleRect.rect(), roundedHoleRect.radii());
</del><ins>+ platformContext()->shadowBlur().drawInsetShadow(this, rect, roundedHoleRect);
</ins><span class="cx">
</span><span class="cx"> Path path;
</span><span class="cx"> path.addRect(rect);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscgGraphicsContextCGcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp (165054 => 165055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp        2014-03-04 17:05:26 UTC (rev 165054)
+++ trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp        2014-03-04 17:06:50 UTC (rev 165055)
</span><span class="lines">@@ -806,7 +806,7 @@
</span><span class="cx"> CGContextSetShadowWithColor(platformContext(), CGSizeZero, 0, 0);
</span><span class="cx">
</span><span class="cx"> ShadowBlur contextShadow(m_state);
</span><del>- contextShadow.drawRectShadow(this, rect, RoundedRect::Radii());
</del><ins>+ contextShadow.drawRectShadow(this, FloatRoundedRect(rect));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> CGContextFillRect(context, rect);
</span><span class="lines">@@ -834,7 +834,7 @@
</span><span class="cx"> CGContextSetShadowWithColor(platformContext(), CGSizeZero, 0, 0);
</span><span class="cx">
</span><span class="cx"> ShadowBlur contextShadow(m_state);
</span><del>- contextShadow.drawRectShadow(this, rect, RoundedRect::Radii());
</del><ins>+ contextShadow.drawRectShadow(this, FloatRoundedRect(rect));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> CGContextFillRect(context, rect);
</span><span class="lines">@@ -846,7 +846,7 @@
</span><span class="cx"> setCGFillColor(context, oldFillColor, oldColorSpace);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void GraphicsContext::fillRoundedRect(const FloatRect& rect, const FloatSize& topLeft, const FloatSize& topRight, const FloatSize& bottomLeft, const FloatSize& bottomRight, const Color& color, ColorSpace colorSpace)
</del><ins>+void GraphicsContext::platformFillRoundedRect(const FloatRoundedRect& rect, const Color& color, ColorSpace colorSpace)
</ins><span class="cx"> {
</span><span class="cx"> if (paintingDisabled())
</span><span class="cx"> return;
</span><span class="lines">@@ -865,17 +865,19 @@
</span><span class="cx"> CGContextSetShadowWithColor(platformContext(), CGSizeZero, 0, 0);
</span><span class="cx">
</span><span class="cx"> ShadowBlur contextShadow(m_state);
</span><del>- contextShadow.drawRectShadow(this, rect, FloatRoundedRect::Radii(topLeft, topRight, bottomLeft, bottomRight));
</del><ins>+ contextShadow.drawRectShadow(this, rect);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- bool equalWidths = (topLeft.width() == topRight.width() && topRight.width() == bottomLeft.width() && bottomLeft.width() == bottomRight.width());
- bool equalHeights = (topLeft.height() == bottomLeft.height() && bottomLeft.height() == topRight.height() && topRight.height() == bottomRight.height());
</del><ins>+ const FloatRect& r = rect.rect();
+ const FloatRoundedRect::Radii& radii = rect.radii();
+ bool equalWidths = (radii.topLeft().width() == radii.topRight().width() && radii.topRight().width() == radii.bottomLeft().width() && radii.bottomLeft().width() == radii.bottomRight().width());
+ bool equalHeights = (radii.topLeft().height() == radii.bottomLeft().height() && radii.bottomLeft().height() == radii.topRight().height() && radii.topRight().height() == radii.bottomRight().height());
</ins><span class="cx"> bool hasCustomFill = m_state.fillGradient || m_state.fillPattern;
</span><del>- if (!hasCustomFill && equalWidths && equalHeights && topLeft.width() * 2 == rect.width() && topLeft.height() * 2 == rect.height())
- CGContextFillEllipseInRect(context, rect);
</del><ins>+ if (!hasCustomFill && equalWidths && equalHeights && radii.topLeft().width() * 2 == r.width() && radii.topLeft().height() * 2 == r.height())
+ CGContextFillEllipseInRect(context, r);
</ins><span class="cx"> else {
</span><span class="cx"> Path path;
</span><del>- path.addRoundedRect(rect, topLeft, topRight, bottomLeft, bottomRight);
</del><ins>+ path.addRoundedRect(rect);
</ins><span class="cx"> fillPath(path);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -886,7 +888,7 @@
</span><span class="cx"> setCGFillColor(context, oldFillColor, oldColorSpace);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void GraphicsContext::fillRectWithRoundedHole(const FloatRect& rect, const RoundedRect& roundedHoleRect, const Color& color, ColorSpace colorSpace)
</del><ins>+void GraphicsContext::fillRectWithRoundedHole(const FloatRect& rect, const FloatRoundedRect& roundedHoleRect, const Color& color, ColorSpace colorSpace)
</ins><span class="cx"> {
</span><span class="cx"> if (paintingDisabled())
</span><span class="cx"> return;
</span><span class="lines">@@ -916,7 +918,7 @@
</span><span class="cx"> CGContextSetShadowWithColor(platformContext(), CGSizeZero, 0, 0);
</span><span class="cx">
</span><span class="cx"> ShadowBlur contextShadow(m_state);
</span><del>- contextShadow.drawInsetShadow(this, rect, roundedHoleRect.rect(), roundedHoleRect.radii());
</del><ins>+ contextShadow.drawInsetShadow(this, rect, roundedHoleRect);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> fillPath(path);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicswinceGraphicsContextWinCEcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/wince/GraphicsContextWinCE.cpp (165054 => 165055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/wince/GraphicsContextWinCE.cpp        2014-03-04 17:05:26 UTC (rev 165054)
+++ trunk/Source/WebCore/platform/graphics/wince/GraphicsContextWinCE.cpp        2014-03-04 17:06:50 UTC (rev 165055)
</span><span class="lines">@@ -23,6 +23,7 @@
</span><span class="cx"> #include "GraphicsContext.h"
</span><span class="cx">
</span><span class="cx"> #include "AffineTransform.h"
</span><ins>+#include "FloatRoundedRect.h"
</ins><span class="cx"> #include "Font.h"
</span><span class="cx"> #include "GDIExtras.h"
</span><span class="cx"> #include "GlyphBuffer.h"
</span><span class="lines">@@ -1152,7 +1153,8 @@
</span><span class="cx"> {
</span><span class="cx"> return IntPoint(rect.left + (rect.right - rect.left) / 2, rect.top + (rect.bottom - rect.top) / 2);
</span><span class="cx"> }
</span><del>-void GraphicsContext::fillRoundedRect(const FloatRect& fillRect, const FloatSize& topLeft, const FloatSize& topRight, const FloatSize& bottomLeft, const FloatSize& bottomRight, const Color& c, ColorSpace colorSpace)
</del><ins>+
+void GraphicsContext::fillRoundedRect(const FloatRoundedRect& rect, const Color& c, ColorSpace colorSpace)
</ins><span class="cx"> {
</span><span class="cx"> ScopeDCProvider dcProvider(m_data);
</span><span class="cx"> if (!m_data->m_dc)
</span><span class="lines">@@ -1165,16 +1167,17 @@
</span><span class="cx">
</span><span class="cx"> getShadow(shadowOffset, shadowBlur, shadowColor, shadowColorSpace);
</span><span class="cx">
</span><ins>+ const FloatRect& fillRect = rect.rect();
</ins><span class="cx"> IntRect dstRect = fillRect;
</span><span class="cx">
</span><span class="cx"> dstRect.move(stableRound(shadowOffset.width()), stableRound(shadowOffset.height()));
</span><span class="cx"> dstRect.inflate(stableRound(shadowBlur));
</span><span class="cx"> dstRect = m_data->mapRect(dstRect);
</span><span class="cx">
</span><del>- FloatSize newTopLeft(m_data->mapSize(topLeft));
- FloatSize newTopRight(m_data->mapSize(topRight));
- FloatSize newBottomLeft(m_data->mapSize(bottomLeft));
- FloatSize newBottomRight(m_data->mapSize(bottomRight));
</del><ins>+ FloatSize newTopLeft(m_data->mapSize(rect.radii().topLeft()));
+ FloatSize newTopRight(m_data->mapSize(rect.radii().topRight()));
+ FloatSize newBottomLeft(m_data->mapSize(rect.radii().bottomLeft()));
+ FloatSize newBottomRight(m_data->mapSize(rect.radii().bottomRight()));
</ins><span class="cx">
</span><span class="cx"> TransparentLayerDC transparentDc(m_data, dstRect, &fillRect);
</span><span class="cx"> HDC dc = transparentDc.hdc();
</span><span class="lines">@@ -1225,7 +1228,6 @@
</span><span class="cx"> SelectObject(dc, oldBrush);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-
</del><span class="cx"> void GraphicsContext::drawRoundCorner(bool needsNewClip, RECT clipRect, RECT rectWin, HDC dc, int width, int height)
</span><span class="cx"> {
</span><span class="cx"> if (!dc)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgtkRenderThemeGtkcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/gtk/RenderThemeGtk.cpp (165054 => 165055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/gtk/RenderThemeGtk.cpp        2014-03-04 17:05:26 UTC (rev 165054)
+++ trunk/Source/WebCore/platform/gtk/RenderThemeGtk.cpp        2014-03-04 17:06:50 UTC (rev 165055)
</span><span class="lines">@@ -578,9 +578,9 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>-static RoundedRect::Radii borderRadiiFromStyle(RenderStyle* style)
</del><ins>+static FloatRoundedRect::Radii borderRadiiFromStyle(RenderStyle* style)
</ins><span class="cx"> {
</span><del>- return RoundedRect::Radii(
</del><ins>+ return FloatRoundedRect::Radii(
</ins><span class="cx"> IntSize(style->borderTopLeftRadius().width().intValue(), style->borderTopLeftRadius().height().intValue()),
</span><span class="cx"> IntSize(style->borderTopRightRadius().width().intValue(), style->borderTopRightRadius().height().intValue()),
</span><span class="cx"> IntSize(style->borderBottomLeftRadius().width().intValue(), style->borderBottomLeftRadius().height().intValue()),
</span><span class="lines">@@ -613,7 +613,7 @@
</span><span class="cx"> rangeRect.setWidth(lengthRatio * totalTrackWidth);
</span><span class="cx"> if (index)
</span><span class="cx"> rangeRect.move(startRatio * totalTrackWidth, 0);
</span><del>- context->fillRoundedRect(RoundedRect(rangeRect, borderRadiiFromStyle(style)), style->visitedDependentColor(CSSPropertyColor), style->colorSpace());
</del><ins>+ context->fillRoundedRect(FloatRoundedRect(rangeRect, borderRadiiFromStyle(style)), style->visitedDependentColor(CSSPropertyColor), style->colorSpace());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> context->restore();
</span><span class="lines">@@ -623,7 +623,7 @@
</span><span class="cx"> bool RenderThemeGtk::paintMediaSliderThumb(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
</span><span class="cx"> {
</span><span class="cx"> RenderStyle* style = &o->style();
</span><del>- paintInfo.context->fillRoundedRect(RoundedRect(r, borderRadiiFromStyle(style)), style->visitedDependentColor(CSSPropertyColor), style->colorSpace());
</del><ins>+ paintInfo.context->fillRoundedRect(FloatRoundedRect(r, borderRadiiFromStyle(style)), style->visitedDependentColor(CSSPropertyColor), style->colorSpace());
</ins><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -653,7 +653,7 @@
</span><span class="cx"> volumeRect.move(0, rectHeight - trackHeight);
</span><span class="cx"> volumeRect.setHeight(ceil(trackHeight));
</span><span class="cx">
</span><del>- context->fillRoundedRect(RoundedRect(volumeRect, borderRadiiFromStyle(style)),
</del><ins>+ context->fillRoundedRect(FloatRoundedRect(volumeRect, borderRadiiFromStyle(style)),
</ins><span class="cx"> style->visitedDependentColor(CSSPropertyColor), style->colorSpace());
</span><span class="cx"> context->restore();
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformwinDragImageWincpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/win/DragImageWin.cpp (165054 => 165055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/win/DragImageWin.cpp        2014-03-04 17:05:26 UTC (rev 165054)
+++ trunk/Source/WebCore/platform/win/DragImageWin.cpp        2014-03-04 17:06:50 UTC (rev 165055)
</span><span class="lines">@@ -26,6 +26,7 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "DragImage.h"
</span><span class="cx">
</span><ins>+#include "FloatRoundedRect.h"
</ins><span class="cx"> #include "Font.h"
</span><span class="cx"> #include "FontCache.h"
</span><span class="cx"> #include "FontDescription.h"
</span><span class="lines">@@ -195,7 +196,7 @@
</span><span class="cx"> static const Color backgroundColor(140, 140, 140);
</span><span class="cx"> static const IntSize radii(DragLabelRadius, DragLabelRadius);
</span><span class="cx"> IntRect rect(0, 0, imageSize.width(), imageSize.height());
</span><del>- context.fillRoundedRect(rect, radii, radii, radii, radii, backgroundColor, ColorSpaceDeviceRGB);
</del><ins>+ context.fillRoundedRect(FloatRoundedRect(rect, radii, radii, radii, radii), backgroundColor, ColorSpaceDeviceRGB);
</ins><span class="cx">
</span><span class="cx"> // Draw the text
</span><span class="cx"> static const Color topColor(0, 0, 0, 255); // original alpha = 0.75
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (165054 => 165055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBox.cpp        2014-03-04 17:05:26 UTC (rev 165054)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp        2014-03-04 17:06:50 UTC (rev 165055)
</span><span class="lines">@@ -30,6 +30,7 @@
</span><span class="cx"> #include "Document.h"
</span><span class="cx"> #include "EventHandler.h"
</span><span class="cx"> #include "FloatQuad.h"
</span><ins>+#include "FloatRoundedRect.h"
</ins><span class="cx"> #include "Frame.h"
</span><span class="cx"> #include "FrameView.h"
</span><span class="cx"> #include "GraphicsContext.h"
</span><span class="lines">@@ -1211,7 +1212,7 @@
</span><span class="cx"> // beginning the layer).
</span><span class="cx"> RoundedRect border = style().getRoundedBorderFor(paintRect, &view());
</span><span class="cx"> stateSaver.save();
</span><del>- paintInfo.context->clipRoundedRect(border);
</del><ins>+ paintInfo.context->clipRoundedRect(FloatRoundedRect(border));
</ins><span class="cx"> paintInfo.context->beginTransparencyLayer(1);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1648,7 +1649,7 @@
</span><span class="cx"> IntRect clipRect = pixelSnappedIntRect(isControlClip ? controlClipRect(accumulatedOffset) : overflowClipRect(accumulatedOffset, paintInfo.renderNamedFlowFragment, IgnoreOverlayScrollbarSize, paintInfo.phase));
</span><span class="cx"> paintInfo.context->save();
</span><span class="cx"> if (style().hasBorderRadius())
</span><del>- paintInfo.context->clipRoundedRect(style().getRoundedInnerBorderFor(LayoutRect(accumulatedOffset, size())));
</del><ins>+ paintInfo.context->clipRoundedRect(FloatRoundedRect(style().getRoundedInnerBorderFor(LayoutRect(accumulatedOffset, size()))));
</ins><span class="cx"> paintInfo.context->clip(clipRect);
</span><span class="cx"> return true;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBoxModelObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp (165054 => 165055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp        2014-03-04 17:05:26 UTC (rev 165054)
+++ trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp        2014-03-04 17:06:50 UTC (rev 165055)
</span><span class="lines">@@ -26,6 +26,7 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "RenderBoxModelObject.h"
</span><span class="cx">
</span><ins>+#include "FloatRoundedRect.h"
</ins><span class="cx"> #include "Frame.h"
</span><span class="cx"> #include "FrameView.h"
</span><span class="cx"> #include "GraphicsContext.h"
</span><span class="lines">@@ -500,31 +501,31 @@
</span><span class="cx"> void RenderBoxModelObject::clipRoundedInnerRect(GraphicsContext * context, const LayoutRect& rect, const RoundedRect& clipRect)
</span><span class="cx"> {
</span><span class="cx"> if (clipRect.isRenderable())
</span><del>- context->clipRoundedRect(clipRect);
</del><ins>+ context->clipRoundedRect(FloatRoundedRect(clipRect));
</ins><span class="cx"> else {
</span><span class="cx"> // We create a rounded rect for each of the corners and clip it, while making sure we clip opposing corners together.
</span><span class="cx"> if (!clipRect.radii().topLeft().isEmpty() || !clipRect.radii().bottomRight().isEmpty()) {
</span><del>- IntRect topCorner(clipRect.rect().x(), clipRect.rect().y(), rect.maxX() - clipRect.rect().x(), rect.maxY() - clipRect.rect().y());
- RoundedRect::Radii topCornerRadii;
</del><ins>+ FloatRect topCorner(clipRect.rect().x(), clipRect.rect().y(), rect.maxX() - clipRect.rect().x(), rect.maxY() - clipRect.rect().y());
+ FloatRoundedRect::Radii topCornerRadii;
</ins><span class="cx"> topCornerRadii.setTopLeft(clipRect.radii().topLeft());
</span><del>- context->clipRoundedRect(RoundedRect(topCorner, topCornerRadii));
</del><ins>+ context->clipRoundedRect(FloatRoundedRect(topCorner, topCornerRadii));
</ins><span class="cx">
</span><del>- IntRect bottomCorner(rect.x(), rect.y(), clipRect.rect().maxX() - rect.x(), clipRect.rect().maxY() - rect.y());
- RoundedRect::Radii bottomCornerRadii;
</del><ins>+ FloatRect bottomCorner(rect.x(), rect.y(), clipRect.rect().maxX() - rect.x(), clipRect.rect().maxY() - rect.y());
+ FloatRoundedRect::Radii bottomCornerRadii;
</ins><span class="cx"> bottomCornerRadii.setBottomRight(clipRect.radii().bottomRight());
</span><del>- context->clipRoundedRect(RoundedRect(bottomCorner, bottomCornerRadii));
</del><ins>+ context->clipRoundedRect(FloatRoundedRect(bottomCorner, bottomCornerRadii));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (!clipRect.radii().topRight().isEmpty() || !clipRect.radii().bottomLeft().isEmpty()) {
</span><del>- IntRect topCorner(rect.x(), clipRect.rect().y(), clipRect.rect().maxX() - rect.x(), rect.maxY() - clipRect.rect().y());
- RoundedRect::Radii topCornerRadii;
</del><ins>+ FloatRect topCorner(rect.x(), clipRect.rect().y(), clipRect.rect().maxX() - rect.x(), rect.maxY() - clipRect.rect().y());
+ FloatRoundedRect::Radii topCornerRadii;
</ins><span class="cx"> topCornerRadii.setTopRight(clipRect.radii().topRight());
</span><del>- context->clipRoundedRect(RoundedRect(topCorner, topCornerRadii));
</del><ins>+ context->clipRoundedRect(FloatRoundedRect(topCorner, topCornerRadii));
</ins><span class="cx">
</span><del>- IntRect bottomCorner(clipRect.rect().x(), rect.y(), rect.maxX() - clipRect.rect().x(), clipRect.rect().maxY() - rect.y());
- RoundedRect::Radii bottomCornerRadii;
</del><ins>+ FloatRect bottomCorner(clipRect.rect().x(), rect.y(), rect.maxX() - clipRect.rect().x(), clipRect.rect().maxY() - rect.y());
+ FloatRoundedRect::Radii bottomCornerRadii;
</ins><span class="cx"> bottomCornerRadii.setBottomLeft(clipRect.radii().bottomLeft());
</span><del>- context->clipRoundedRect(RoundedRect(bottomCorner, bottomCornerRadii));
</del><ins>+ context->clipRoundedRect(FloatRoundedRect(bottomCorner, bottomCornerRadii));
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -653,7 +654,7 @@
</span><span class="cx"> if (hasRoundedBorder && bleedAvoidance != BackgroundBleedUseTransparencyLayer) {
</span><span class="cx"> RoundedRect border = backgroundRoundedRectAdjustedForBleedAvoidance(*context, rect, bleedAvoidance, box, boxSize, includeLeftEdge, includeRightEdge);
</span><span class="cx"> if (border.isRenderable())
</span><del>- context->fillRoundedRect(border, bgColor, style().colorSpace());
</del><ins>+ context->fillRoundedRect(FloatRoundedRect(border), bgColor, style().colorSpace());
</ins><span class="cx"> else {
</span><span class="cx"> context->save();
</span><span class="cx"> clipRoundedInnerRect(context, rect, border);
</span><span class="lines">@@ -1956,11 +1957,11 @@
</span><span class="cx"> if (clipToOuterBorder) {
</span><span class="cx"> // Clip to the inner and outer radii rects.
</span><span class="cx"> if (bleedAvoidance != BackgroundBleedUseTransparencyLayer)
</span><del>- graphicsContext->clipRoundedRect(outerBorder);
</del><ins>+ graphicsContext->clipRoundedRect(FloatRoundedRect(outerBorder));
</ins><span class="cx"> // isRenderable() check avoids issue described in https://bugs.webkit.org/show_bug.cgi?id=38787
</span><span class="cx"> // The inside will be clipped out later (in clipBorderSideForComplexInnerPath)
</span><span class="cx"> if (innerBorder.isRenderable())
</span><del>- graphicsContext->clipOutRoundedRect(innerBorder);
</del><ins>+ graphicsContext->clipOutRoundedRect(FloatRoundedRect(innerBorder));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // If only one edge visible antialiasing doesn't create seams
</span><span class="lines">@@ -2053,7 +2054,7 @@
</span><span class="cx"> innerBorderTopWidth, innerBorderBottomWidth, innerBorderLeftWidth, innerBorderRightWidth,
</span><span class="cx"> includeLogicalLeftEdge, includeLogicalRightEdge);
</span><span class="cx">
</span><del>- graphicsContext->clipRoundedRect(innerClip);
</del><ins>+ graphicsContext->clipRoundedRect(FloatRoundedRect(innerClip));
</ins><span class="cx"> drawBoxSideFromPath(graphicsContext, borderRect, borderPath, edges, thickness, drawThickness, side, style, color, SOLID, bleedAvoidance, includeLogicalLeftEdge, includeLogicalRightEdge);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -2072,7 +2073,7 @@
</span><span class="cx"> RoundedRect outerClip = style->getRoundedInnerBorderFor(outerRect,
</span><span class="cx"> outerBorderTopWidth, outerBorderBottomWidth, outerBorderLeftWidth, outerBorderRightWidth,
</span><span class="cx"> includeLogicalLeftEdge, includeLogicalRightEdge);
</span><del>- graphicsContext->clipOutRoundedRect(outerClip);
</del><ins>+ graphicsContext->clipOutRoundedRect(FloatRoundedRect(outerClip));
</ins><span class="cx"> drawBoxSideFromPath(graphicsContext, borderRect, borderPath, edges, thickness, drawThickness, side, style, color, SOLID, bleedAvoidance, includeLogicalLeftEdge, includeLogicalRightEdge);
</span><span class="cx"> }
</span><span class="cx"> return;
</span><span class="lines">@@ -2104,7 +2105,7 @@
</span><span class="cx"> topWidth, bottomWidth, leftWidth, rightWidth,
</span><span class="cx"> includeLogicalLeftEdge, includeLogicalRightEdge);
</span><span class="cx">
</span><del>- graphicsContext->clipRoundedRect(clipRect);
</del><ins>+ graphicsContext->clipRoundedRect(FloatRoundedRect(clipRect));
</ins><span class="cx"> drawBoxSideFromPath(graphicsContext, borderRect, borderPath, edges, thickness, drawThickness, side, style, color, s2, bleedAvoidance, includeLogicalLeftEdge, includeLogicalRightEdge);
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="lines">@@ -2353,7 +2354,7 @@
</span><span class="cx"> BoxSide side, const class BorderEdge edges[])
</span><span class="cx"> {
</span><span class="cx"> graphicsContext->clip(calculateSideRectIncludingInner(outerBorder, edges, side));
</span><del>- graphicsContext->clipOutRoundedRect(calculateAdjustedInnerBorder(innerBorder, side));
</del><ins>+ graphicsContext->clipOutRoundedRect(FloatRoundedRect(calculateAdjustedInnerBorder(innerBorder, side)));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void RenderBoxModelObject::getBorderEdgeInfo(BorderEdge edges[], const RenderStyle* style, bool includeLogicalLeftEdge, bool includeLogicalRightEdge) const
</span><span class="lines">@@ -2552,7 +2553,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (!rectToClipOut.isEmpty())
</span><del>- context->clipOutRoundedRect(rectToClipOut);
</del><ins>+ context->clipOutRoundedRect(FloatRoundedRect(rectToClipOut));
</ins><span class="cx">
</span><span class="cx"> RoundedRect influenceRect(shadowRect, border.radii());
</span><span class="cx"> influenceRect.expandRadii(2 * shadowPaintingExtent + shadowSpread);
</span><span class="lines">@@ -2562,7 +2563,7 @@
</span><span class="cx"> fillRect.expandRadii(shadowSpread);
</span><span class="cx"> if (!fillRect.isRenderable())
</span><span class="cx"> fillRect.adjustRadii();
</span><del>- context->fillRoundedRect(fillRect, Color::black, s->colorSpace());
</del><ins>+ context->fillRoundedRect(FloatRoundedRect(fillRect), Color::black, s->colorSpace());
</ins><span class="cx"> }
</span><span class="cx"> } else {
</span><span class="cx"> LayoutRect rectToClipOut = border.rect();
</span><span class="lines">@@ -2590,7 +2591,7 @@
</span><span class="cx">
</span><span class="cx"> if (holeRect.isEmpty()) {
</span><span class="cx"> if (hasBorderRadius)
</span><del>- context->fillRoundedRect(border, shadowColor, s->colorSpace());
</del><ins>+ context->fillRoundedRect(FloatRoundedRect(border), shadowColor, s->colorSpace());
</ins><span class="cx"> else
</span><span class="cx"> context->fillRect(border.rect(), shadowColor, s->colorSpace());
</span><span class="cx"> continue;
</span><span class="lines">@@ -2635,7 +2636,7 @@
</span><span class="cx"> else
</span><span class="cx"> context->setShadow(shadowOffset, shadowRadius, shadowColor, s->colorSpace());
</span><span class="cx">
</span><del>- context->fillRectWithRoundedHole(outerRect, roundedHole, fillColor, s->colorSpace());
</del><ins>+ context->fillRectWithRoundedHole(outerRect, FloatRoundedRect(roundedHole), fillColor, s->colorSpace());
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (165054 => 165055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLayer.cpp        2014-03-04 17:05:26 UTC (rev 165054)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp        2014-03-04 17:06:50 UTC (rev 165055)
</span><span class="lines">@@ -55,6 +55,7 @@
</span><span class="cx"> #include "FloatConversion.h"
</span><span class="cx"> #include "FloatPoint3D.h"
</span><span class="cx"> #include "FloatRect.h"
</span><ins>+#include "FloatRoundedRect.h"
</ins><span class="cx"> #include "FlowThreadController.h"
</span><span class="cx"> #include "FocusController.h"
</span><span class="cx"> #include "Frame.h"
</span><span class="lines">@@ -3615,7 +3616,7 @@
</span><span class="cx"> if (layer->renderer().hasOverflowClip() && layer->renderer().style().hasBorderRadius() && inContainingBlockChain(this, layer)) {
</span><span class="cx"> LayoutPoint delta;
</span><span class="cx"> layer->convertToLayerCoords(rootLayer, delta);
</span><del>- context->clipRoundedRect(layer->renderer().style().getRoundedInnerBorderFor(LayoutRect(delta, layer->size())));
</del><ins>+ context->clipRoundedRect(FloatRoundedRect(layer->renderer().style().getRoundedInnerBorderFor(LayoutRect(delta, layer->size()))));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (layer == rootLayer)
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderThemeIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderThemeIOS.mm (165054 => 165055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderThemeIOS.mm        2014-03-04 17:05:26 UTC (rev 165054)
+++ trunk/Source/WebCore/rendering/RenderThemeIOS.mm        2014-03-04 17:06:50 UTC (rev 165055)
</span><span class="lines">@@ -31,6 +31,7 @@
</span><span class="cx"> #import "CSSValueKeywords.h"
</span><span class="cx"> #import "DateComponents.h"
</span><span class="cx"> #import "Document.h"
</span><ins>+#import "FloatRoundedRect.h"
</ins><span class="cx"> #import "Font.h"
</span><span class="cx"> #import "FontCache.h"
</span><span class="cx"> #import "Frame.h"
</span><span class="lines">@@ -450,7 +451,7 @@
</span><span class="cx"> paintInfo.context->drawRaisedEllipse(clip, Color::white, ColorSpaceDeviceRGB, shadowColor(), ColorSpaceDeviceRGB);
</span><span class="cx">
</span><span class="cx"> FloatSize radius(clip.width() / 2.0f, clip.height() / 2.0f);
</span><del>- paintInfo.context->clipRoundedRect(clip, radius, radius, radius, radius);
</del><ins>+ paintInfo.context->clipRoundedRect(FloatRoundedRect(clip, radius, radius, radius, radius));
</ins><span class="cx"> }
</span><span class="cx"> FloatPoint bottomCenter(clip.x() + clip.width() / 2.0, clip.maxY());
</span><span class="cx"> drawAxialGradient(cgContext, gradientWithName(ShadeGradient), clip.location(), FloatPoint(clip.x(), clip.maxY()), LinearInterpolation);
</span><span class="lines">@@ -465,7 +466,7 @@
</span><span class="cx">
</span><span class="cx"> GraphicsContextStateSaver stateSaver(*paintInfo.context);
</span><span class="cx">
</span><del>- paintInfo.context->clipRoundedRect(style.getRoundedBorderFor(rect));
</del><ins>+ paintInfo.context->clipRoundedRect(FloatRoundedRect(style.getRoundedBorderFor(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">@@ -585,9 +586,9 @@
</span><span class="cx">
</span><span class="cx"> GraphicsContextStateSaver stateSaver(*paintInfo.context);
</span><span class="cx">
</span><del>- paintInfo.context->clipRoundedRect(titleClip,
</del><ins>+ paintInfo.context->clipRoundedRect(FloatRoundedRect(titleClip,
</ins><span class="cx"> FloatSize(valueForLength(style.borderTopLeftRadius().width(), rect.width()) - style.borderLeftWidth(), valueForLength(style.borderTopLeftRadius().height(), rect.height()) - style.borderTopWidth()), FloatSize(0, 0),
</span><del>- FloatSize(valueForLength(style.borderBottomLeftRadius().width(), rect.width()) - style.borderLeftWidth(), valueForLength(style.borderBottomLeftRadius().height(), rect.height()) - style.borderBottomWidth()), FloatSize(0, 0));
</del><ins>+ FloatSize(valueForLength(style.borderBottomLeftRadius().width(), rect.width()) - style.borderLeftWidth(), valueForLength(style.borderBottomLeftRadius().height(), rect.height()) - style.borderBottomWidth()), FloatSize(0, 0)));
</ins><span class="cx">
</span><span class="cx"> drawAxialGradient(cgContext, gradientWithName(ShadeGradient), titleClip.location(), FloatPoint(titleClip.x(), titleClip.maxY()), LinearInterpolation);
</span><span class="cx"> drawAxialGradient(cgContext, gradientWithName(ShineGradient), FloatPoint(titleClip.x(), titleClip.maxY()), titleClip.location(), ExponentialInterpolation);
</span><span class="lines">@@ -605,9 +606,9 @@
</span><span class="cx"> {
</span><span class="cx"> GraphicsContextStateSaver stateSaver(*paintInfo.context);
</span><span class="cx">
</span><del>- paintInfo.context->clipRoundedRect(buttonClip,
</del><ins>+ paintInfo.context->clipRoundedRect(FloatRoundedRect(buttonClip,
</ins><span class="cx"> FloatSize(0, 0), FloatSize(valueForLength(style.borderTopRightRadius().width(), rect.width()) - style.borderRightWidth(), valueForLength(style.borderTopRightRadius().height(), rect.height()) - style.borderTopWidth()),
</span><del>- FloatSize(0, 0), FloatSize(valueForLength(style.borderBottomRightRadius().width(), rect.width()) - style.borderRightWidth(), valueForLength(style.borderBottomRightRadius().height(), rect.height()) - style.borderBottomWidth()));
</del><ins>+ FloatSize(0, 0), FloatSize(valueForLength(style.borderBottomRightRadius().width(), rect.width()) - style.borderRightWidth(), valueForLength(style.borderBottomRightRadius().height(), rect.height()) - style.borderBottomWidth())));
</ins><span class="cx">
</span><span class="cx"> paintInfo.context->fillRect(buttonClip, style.visitedDependentColor(CSSPropertyBorderTopColor), style.colorSpace());
</span><span class="cx">
</span><span class="lines">@@ -716,7 +717,7 @@
</span><span class="cx"> GraphicsContextStateSaver stateSaver(*paintInfo.context);
</span><span class="cx">
</span><span class="cx"> IntSize cornerSize(cornerWidth, cornerHeight);
</span><del>- RoundedRect innerBorder(trackClip, cornerSize, cornerSize, cornerSize, cornerSize);
</del><ins>+ FloatRoundedRect innerBorder(trackClip, cornerSize, cornerSize, cornerSize, cornerSize);
</ins><span class="cx"> paintInfo.context->clipRoundedRect(innerBorder);
</span><span class="cx">
</span><span class="cx"> CGContextRef cgContext = paintInfo.context->platformContext();
</span><span class="lines">@@ -832,7 +833,7 @@
</span><span class="cx">
</span><span class="cx"> // 1.2) Draw top gradient on the upper half. It is supposed to overlay the fill from the background and darker the stroked path.
</span><span class="cx"> FloatRect border(rect.x(), rect.y() + verticalOffset, rect.width(), progressBarHeight);
</span><del>- paintInfo.context->clipRoundedRect(border, roundedCornerRadius, roundedCornerRadius, roundedCornerRadius, roundedCornerRadius);
</del><ins>+ paintInfo.context->clipRoundedRect(FloatRoundedRect(border, roundedCornerRadius, roundedCornerRadius, roundedCornerRadius, roundedCornerRadius));
</ins><span class="cx">
</span><span class="cx"> float upperGradientHeight = progressBarHeight / 2.;
</span><span class="cx"> RefPtr<Gradient> upperGradient = Gradient::create(FloatPoint(rect.x(), verticalRenderingPosition + 0.5), FloatPoint(rect.x(), verticalRenderingPosition + upperGradientHeight - 1.5));
</span><span class="lines">@@ -986,7 +987,7 @@
</span><span class="cx">
</span><span class="cx"> // Background picture frame and simple background icon with a gradient matching the button.
</span><span class="cx"> Color backgroundImageColor = buttonRenderer ? Color(buttonRenderer->style().visitedDependentColor(CSSPropertyBackgroundColor).rgb()) : Color(206.0f, 206.0f, 206.0f);
</span><del>- paintInfo.context->fillRoundedRect(thumbnailPictureFrameRect, cornerSize, cornerSize, cornerSize, cornerSize, pictureFrameColor, ColorSpaceDeviceRGB);
</del><ins>+ paintInfo.context->fillRoundedRect(FloatRoundedRect(thumbnailPictureFrameRect, cornerSize, cornerSize, cornerSize, cornerSize), pictureFrameColor, ColorSpaceDeviceRGB);
</ins><span class="cx"> paintInfo.context->fillRect(thumbnailRect, backgroundImageColor, ColorSpaceDeviceRGB);
</span><span class="cx"> {
</span><span class="cx"> GraphicsContextStateSaver stateSaver2(*paintInfo.context);
</span><span class="lines">@@ -1007,7 +1008,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Foreground picture frame and icon.
</span><del>- paintInfo.context->fillRoundedRect(thumbnailPictureFrameRect, cornerSize, cornerSize, cornerSize, cornerSize, pictureFrameColor, ColorSpaceDeviceRGB);
</del><ins>+ paintInfo.context->fillRoundedRect(FloatRoundedRect(thumbnailPictureFrameRect, cornerSize, cornerSize, cornerSize), cornerSize, pictureFrameColor, ColorSpaceDeviceRGB);
</ins><span class="cx"> icon->paint(paintInfo.context, thumbnailRect);
</span><span class="cx">
</span><span class="cx"> return false;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderThemeMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderThemeMac.mm (165054 => 165055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderThemeMac.mm        2014-03-04 17:05:26 UTC (rev 165054)
+++ trunk/Source/WebCore/rendering/RenderThemeMac.mm        2014-03-04 17:06:50 UTC (rev 165055)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx"> #import "Element.h"
</span><span class="cx"> #import "ExceptionCodePlaceholder.h"
</span><span class="cx"> #import "FileList.h"
</span><ins>+#import "FloatRoundedRect.h"
</ins><span class="cx"> #import "Frame.h"
</span><span class="cx"> #import "FrameView.h"
</span><span class="cx"> #import "GraphicsContextCG.h"
</span><span class="lines">@@ -1143,7 +1144,7 @@
</span><span class="cx">
</span><span class="cx"> GraphicsContextStateSaver stateSaver(*paintInfo.context);
</span><span class="cx">
</span><del>- RoundedRect border = o->style().getRoundedBorderFor(r, &o->view());
</del><ins>+ FloatRoundedRect border = FloatRoundedRect(o->style().getRoundedBorderFor(r, &o->view()));
</ins><span class="cx"> int radius = border.radii().topLeft().width();
</span><span class="cx">
</span><span class="cx"> CGColorSpaceRef cspace = deviceRGBColorSpaceRef();
</span><span class="lines">@@ -1177,7 +1178,7 @@
</span><span class="cx"> {
</span><span class="cx"> GraphicsContextStateSaver stateSaver(*paintInfo.context);
</span><span class="cx"> CGContextClipToRect(context, topGradient);
</span><del>- paintInfo.context->clipRoundedRect(RoundedRect(enclosingIntRect(topGradient), border.radii().topLeft(), border.radii().topRight(), IntSize(), IntSize()));
</del><ins>+ paintInfo.context->clipRoundedRect(FloatRoundedRect(enclosingIntRect(topGradient), border.radii().topLeft(), border.radii().topRight(), IntSize(), IntSize()));
</ins><span class="cx"> context = cgContextContainer.context();
</span><span class="cx"> CGContextDrawShading(context, topShading.get());
</span><span class="cx"> }
</span><span class="lines">@@ -1185,7 +1186,7 @@
</span><span class="cx"> if (!bottomGradient.isEmpty()) {
</span><span class="cx"> GraphicsContextStateSaver stateSaver(*paintInfo.context);
</span><span class="cx"> CGContextClipToRect(context, bottomGradient);
</span><del>- paintInfo.context->clipRoundedRect(RoundedRect(enclosingIntRect(bottomGradient), IntSize(), IntSize(), border.radii().bottomLeft(), border.radii().bottomRight()));
</del><ins>+ paintInfo.context->clipRoundedRect(FloatRoundedRect(enclosingIntRect(bottomGradient), IntSize(), IntSize(), border.radii().bottomLeft(), border.radii().bottomRight()));
</ins><span class="cx"> context = cgContextContainer.context();
</span><span class="cx"> CGContextDrawShading(context, bottomShading.get());
</span><span class="cx"> }
</span><span class="lines">@@ -1414,7 +1415,7 @@
</span><span class="cx"> mainShading = adoptCF(CGShadingCreateAxial(cspace, CGPointMake(bounds.x(), bounds.y()), CGPointMake(bounds.x(), bounds.maxY()), mainFunction.get(), false, false));
</span><span class="cx">
</span><span class="cx"> IntSize radius(trackRadius, trackRadius);
</span><del>- paintInfo.context->clipRoundedRect(RoundedRect(bounds, radius, radius, radius, radius));
</del><ins>+ paintInfo.context->clipRoundedRect(FloatRoundedRect(bounds, radius, radius, radius, radius));
</ins><span class="cx"> context = localContext.cgContext();
</span><span class="cx"> CGContextDrawShading(context, mainShading.get());
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderThemeSafaricpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderThemeSafari.cpp (165054 => 165055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderThemeSafari.cpp        2014-03-04 17:05:26 UTC (rev 165054)
+++ trunk/Source/WebCore/rendering/RenderThemeSafari.cpp        2014-03-04 17:06:50 UTC (rev 165055)
</span><span class="lines">@@ -30,6 +30,7 @@
</span><span class="cx"> #include "CSSValueKeywords.h"
</span><span class="cx"> #include "Document.h"
</span><span class="cx"> #include "Element.h"
</span><ins>+#include "FloatRoundedRect.h"
</ins><span class="cx"> #include "Frame.h"
</span><span class="cx"> #include "FrameView.h"
</span><span class="cx"> #include "GraphicsContextCG.h"
</span><span class="lines">@@ -755,7 +756,7 @@
</span><span class="cx">
</span><span class="cx"> paintInfo.context->save();
</span><span class="cx">
</span><del>- RoundedRect bound = o->style().getRoundedBorderFor(r);
</del><ins>+ FloatRoundedRect bound = FloatRoundedRect(o->style().getRoundedBorderFor(r));
</ins><span class="cx"> int radius = bound.radii().topLeft().width();
</span><span class="cx">
</span><span class="cx"> CGColorSpaceRef cspace = deviceRGBColorSpaceRef();
</span><span class="lines">@@ -785,14 +786,14 @@
</span><span class="cx">
</span><span class="cx"> paintInfo.context->save();
</span><span class="cx"> CGContextClipToRect(context, topGradient);
</span><del>- paintInfo.context->clipRoundedRect(RoundedRect(enclosingIntRect(topGradient), bound.radii().topLeft(), bound.radii().topRight(), IntSize(), IntSize()));
</del><ins>+ paintInfo.context->clipRoundedRect(FloatRoundedRect(enclosingIntRect(topGradient), bound.radii().topLeft(), bound.radii().topRight(), IntSize(), IntSize()));
</ins><span class="cx"> CGContextDrawShading(context, topShading.get());
</span><span class="cx"> paintInfo.context->restore();
</span><span class="cx">
</span><span class="cx"> if (!bottomGradient.isEmpty()) {
</span><span class="cx"> paintInfo.context->save();
</span><span class="cx"> CGContextClipToRect(context, bottomGradient);
</span><del>- paintInfo.context->clipRoundedRect(RoundedRect(enclosingIntRect(bottomGradient), IntSize(), IntSize(), bound.radii().bottomLeft(), bound.radii().bottomRight()));
</del><ins>+ paintInfo.context->clipRoundedRect(FloatRoundedRect(enclosingIntRect(bottomGradient), IntSize(), IntSize(), bound.radii().bottomLeft(), bound.radii().bottomRight()));
</ins><span class="cx"> CGContextDrawShading(context, bottomShading.get());
</span><span class="cx"> paintInfo.context->restore();
</span><span class="cx"> }
</span><span class="lines">@@ -956,7 +957,7 @@
</span><span class="cx"> bool RenderThemeSafari::paintSliderTrack(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
</span><span class="cx"> {
</span><span class="cx"> IntSize radius(trackRadius, trackRadius);
</span><del>- RoundedRect bounds(r, radius, radius, radius, radius);
</del><ins>+ FloatRoundedRect bounds(r, radius, radius, radius, radius);
</ins><span class="cx">
</span><span class="cx"> if (o->style().appearance() == SliderHorizontalPart)
</span><span class="cx"> bounds.setRect(IntRect(r.x(),
</span><span class="lines">@@ -973,7 +974,7 @@
</span><span class="cx"> CGColorSpaceRef cspace = deviceRGBColorSpaceRef();
</span><span class="cx">
</span><span class="cx"> paintInfo.context->save();
</span><del>- CGContextClipToRect(context, pixelSnappedIntRect(bounds.rect()));
</del><ins>+ CGContextClipToRect(context, bounds.rect());
</ins><span class="cx">
</span><span class="cx"> struct CGFunctionCallbacks mainCallbacks = { 0, TrackGradientInterpolate, NULL };
</span><span class="cx"> RetainPtr<CGFunctionRef> mainFunction = adoptCF(CGFunctionCreate(NULL, 1, NULL, 4, NULL, &mainCallbacks));
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingshapesBoxShapecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/shapes/BoxShape.cpp (165054 => 165055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/shapes/BoxShape.cpp        2014-03-04 17:05:26 UTC (rev 165054)
+++ trunk/Source/WebCore/rendering/shapes/BoxShape.cpp        2014-03-04 17:06:50 UTC (rev 165055)
</span><span class="lines">@@ -156,18 +156,11 @@
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static void addRoundedRect(Path& path, const FloatRect& rect, const FloatRoundedRect::Radii& radii)
-{
- path.addRoundedRect(rect, radii.topLeft(), radii.topRight(), radii.bottomLeft(), radii.bottomRight(), Path::PreferBezierRoundedRect);
-}
-
</del><span class="cx"> void BoxShape::buildDisplayPaths(DisplayPaths& paths) const
</span><span class="cx"> {
</span><del>- addRoundedRect(paths.shape, m_bounds.rect(), m_bounds.radii());
- if (shapeMargin()) {
- const FloatRoundedRect& marginBounds = shapeMarginBounds();
- addRoundedRect(paths.marginShape, marginBounds.rect(), marginBounds.radii());
- }
</del><ins>+ paths.shape.addRoundedRect(m_bounds, Path::PreferBezierRoundedRect);
+ if (shapeMargin())
+ paths.marginShape.addRoundedRect(shapeMarginBounds(), Path::PreferBezierRoundedRect);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleBasicShapescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/BasicShapes.cpp (165054 => 165055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/BasicShapes.cpp        2014-03-04 17:05:26 UTC (rev 165054)
+++ trunk/Source/WebCore/rendering/style/BasicShapes.cpp        2014-03-04 17:06:50 UTC (rev 165055)
</span><span class="lines">@@ -34,6 +34,7 @@
</span><span class="cx"> #include "BasicShapeFunctions.h"
</span><span class="cx"> #include "CalculationValue.h"
</span><span class="cx"> #include "FloatRect.h"
</span><ins>+#include "FloatRoundedRect.h"
</ins><span class="cx"> #include "LengthFunctions.h"
</span><span class="cx"> #include "Path.h"
</span><span class="cx"> #include "RenderBox.h"
</span><span class="lines">@@ -355,7 +356,7 @@
</span><span class="cx"> ASSERT(path.isEmpty());
</span><span class="cx"> float left = floatValueForLength(m_left, boundingBox.width());
</span><span class="cx"> float top = floatValueForLength(m_top, boundingBox.height());
</span><del>- path.addRoundedRect(
</del><ins>+ FloatRoundedRect r = FloatRoundedRect(
</ins><span class="cx"> FloatRect(
</span><span class="cx"> left + boundingBox.x(),
</span><span class="cx"> top + boundingBox.y(),
</span><span class="lines">@@ -367,6 +368,7 @@
</span><span class="cx"> floatSizeForLengthSize(m_bottomLeftRadius, boundingBox),
</span><span class="cx"> floatSizeForLengthSize(m_bottomRightRadius, boundingBox)
</span><span class="cx"> );
</span><ins>+ path.addRoundedRect(r);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> PassRefPtr<BasicShape> BasicShapeInset::blend(const BasicShape* other, double progress) const
</span></span></pre></div>
<a id="trunkSourceWebKitwinChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/ChangeLog (165054 => 165055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/ChangeLog        2014-03-04 17:05:26 UTC (rev 165054)
+++ trunk/Source/WebKit/win/ChangeLog        2014-03-04 17:06:50 UTC (rev 165055)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2014-03-04 Zalan Bujtas <zalan@apple.com>
+
+ Subpixel rendering: Make GraphicsLayer::fillRect FloatRoundedRect based and cleanup dependencies.
+ https://bugs.webkit.org/show_bug.cgi?id=129557
+
+ Reviewed by Simon Fraser.
+
+ This is the preparation for snapping rounded rects to device pixel position. It enables
+ device pixel aware border-radius painting.
+
+ No change in functionality.
+
+ * FullscreenVideoController.cpp:
+ (HUDSlider::draw):
+ (FullscreenVideoController::draw):
+
</ins><span class="cx"> 2014-03-02 Darin Adler <darin@apple.com>
</span><span class="cx">
</span><span class="cx"> Streamline use of TextIterator, cutting down includes and use of soon-to-be-deleted functions
</span></span></pre></div>
<a id="trunkSourceWebKitwinFullscreenVideoControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/FullscreenVideoController.cpp (165054 => 165055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/FullscreenVideoController.cpp        2014-03-04 17:05:26 UTC (rev 165054)
+++ trunk/Source/WebKit/win/FullscreenVideoController.cpp        2014-03-04 17:06:50 UTC (rev 165055)
</span><span class="lines">@@ -34,6 +34,7 @@
</span><span class="cx"> #include <ApplicationServices/ApplicationServices.h>
</span><span class="cx"> #include <WebCore/BitmapInfo.h>
</span><span class="cx"> #include <WebCore/Chrome.h>
</span><ins>+#include <WebCore/FloatRoundedRect.h>
</ins><span class="cx"> #include <WebCore/Font.h>
</span><span class="cx"> #include <WebCore/FontSelector.h>
</span><span class="cx"> #include <WebCore/GraphicsContext.h>
</span><span class="lines">@@ -135,7 +136,7 @@
</span><span class="cx"> {
</span><span class="cx"> // Draw gutter
</span><span class="cx"> IntSize radius(m_rect.height() / 2, m_rect.height() / 2);
</span><del>- context.fillRoundedRect(m_rect, radius, radius, radius, radius, Color(sliderGutterColor), ColorSpaceDeviceRGB);
</del><ins>+ context.fillRoundedRect(FloatRoundedRect(m_rect, radius, radius, radius, radius), Color(sliderGutterColor), ColorSpaceDeviceRGB);
</ins><span class="cx">
</span><span class="cx"> // Draw button
</span><span class="cx"> context.setStrokeColor(Color(sliderButtonColor), ColorSpaceDeviceRGB);
</span><span class="lines">@@ -491,9 +492,9 @@
</span><span class="cx"> IntSize innerRadius(borderRadius - borderThickness, borderRadius - borderThickness);
</span><span class="cx"> IntRect innerRect(borderThickness, borderThickness, windowWidth - borderThickness * 2, windowHeight - borderThickness * 2);
</span><span class="cx">
</span><del>- context.fillRoundedRect(outerRect, outerRadius, outerRadius, outerRadius, outerRadius, Color(borderColor), ColorSpaceDeviceRGB);
</del><ins>+ context.fillRoundedRect(FloatRoundedRect(outerRect, outerRadius, outerRadius, outerRadius, outerRadius), Color(borderColor), ColorSpaceDeviceRGB);
</ins><span class="cx"> context.setCompositeOperation(CompositeCopy);
</span><del>- context.fillRoundedRect(innerRect, innerRadius, innerRadius, innerRadius, innerRadius, Color(backgroundColor), ColorSpaceDeviceRGB);
</del><ins>+ context.fillRoundedRect(FloatRoundedRect(innerRect, innerRadius, innerRadius, innerRadius, innerRadius), Color(backgroundColor), ColorSpaceDeviceRGB);
</ins><span class="cx">
</span><span class="cx"> // Draw the widgets
</span><span class="cx"> m_playPauseButton.draw(context);
</span></span></pre>
</div>
</div>
</body>
</html>