<!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>[194421] trunk</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/194421">194421</a></dd>
<dt>Author</dt> <dd>zalan@apple.com</dd>
<dt>Date</dt> <dd>2015-12-25 21:28:15 -0800 (Fri, 25 Dec 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Subpixel rendering: Add subpixel support for outline.
https://bugs.webkit.org/show_bug.cgi?id=152560
Source/WebCore:
Reviewed by Simon Fraser.
This patch adds support for subpixel outline-width/outline-offset.
Test: fast/borders/hidpi-outline-hairline-painting.html
* css/CSSPropertyNames.in:
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
* platform/graphics/GraphicsContext.h:
* platform/graphics/mac/GraphicsContextMac.mm:
(WebCore::GraphicsContext::drawFocusRing):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::computeMaxOutlineSize):
(WebCore::RenderElement::paintOutline):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::paintAreaElementFocusRing):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::paintOutlineForLine):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::adjustRectForOutlineAndShadow):
* rendering/RenderView.cpp:
(WebCore::RenderView::setMaximalOutlineSize):
* rendering/RenderView.h:
* rendering/style/OutlineValue.h:
(WebCore::OutlineValue::offset):
(WebCore::OutlineValue::OutlineValue): Deleted.
* rendering/style/RenderStyle.h:
LayoutTests:
Unable to ref-test other outline types.
Reviewed by Simon Fraser.
* fast/borders/hidpi-outline-hairline-painting-expected.html: Added.
* fast/borders/hidpi-outline-hairline-painting.html: Added.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecssCSSPropertyNamesin">trunk/Source/WebCore/css/CSSPropertyNames.in</a></li>
<li><a href="#trunkSourceWebCorepageanimationCSSPropertyAnimationcpp">trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsGraphicsContexth">trunk/Source/WebCore/platform/graphics/GraphicsContext.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscairoGraphicsContextCairocpp">trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsmacGraphicsContextMacmm">trunk/Source/WebCore/platform/graphics/mac/GraphicsContextMac.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicswinGraphicsContextCGWincpp">trunk/Source/WebCore/platform/graphics/win/GraphicsContextCGWin.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderElementcpp">trunk/Source/WebCore/rendering/RenderElement.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderImagecpp">trunk/Source/WebCore/rendering/RenderImage.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderInlinecpp">trunk/Source/WebCore/rendering/RenderInline.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderObjectcpp">trunk/Source/WebCore/rendering/RenderObject.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderViewcpp">trunk/Source/WebCore/rendering/RenderView.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderViewh">trunk/Source/WebCore/rendering/RenderView.h</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleOutlineValueh">trunk/Source/WebCore/rendering/style/OutlineValue.h</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleRenderStyleh">trunk/Source/WebCore/rendering/style/RenderStyle.h</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastbordershidpioutlinehairlinepaintingexpectedhtml">trunk/LayoutTests/fast/borders/hidpi-outline-hairline-painting-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastbordershidpioutlinehairlinepaintinghtml">trunk/LayoutTests/fast/borders/hidpi-outline-hairline-painting.html</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (194420 => 194421)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-12-25 20:46:47 UTC (rev 194420)
+++ trunk/LayoutTests/ChangeLog        2015-12-26 05:28:15 UTC (rev 194421)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2015-12-25 Zalan Bujtas <zalan@apple.com>
+
+ Subpixel rendering: Add subpixel support for outline.
+ https://bugs.webkit.org/show_bug.cgi?id=152560
+
+ Unable to ref-test other outline types.
+
+ Reviewed by Simon Fraser.
+
+ * fast/borders/hidpi-outline-hairline-painting-expected.html: Added.
+ * fast/borders/hidpi-outline-hairline-painting.html: Added.
+
</ins><span class="cx"> 2015-12-24 Zalan Bujtas <zalan@apple.com>
</span><span class="cx">
</span><span class="cx"> ASSERTION FAILED: x2 >= x1 in WebCore::RenderElement::drawLineForBoxSide
</span></span></pre></div>
<a id="trunkLayoutTestsfastbordershidpioutlinehairlinepaintingexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/borders/hidpi-outline-hairline-painting-expected.html (0 => 194421)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/borders/hidpi-outline-hairline-painting-expected.html         (rev 0)
+++ trunk/LayoutTests/fast/borders/hidpi-outline-hairline-painting-expected.html        2015-12-26 05:28:15 UTC (rev 194421)
</span><span class="lines">@@ -0,0 +1,35 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+<title>This tests hairline outline painting.</title>
+<style>
+ div {
+ position: absolute;
+ height: 5px;
+ width: 5px;
+ border: 0.5px solid green;
+ }
+</style>
+</head>
+<body>
+<div style="border-style: solid; top: 9.5px; left: 9.5px;"></div>
+<div style="border-style: solid; top: 9.5px; left: 24.5px;"></div>
+<div style="border-style: solid; top: 9.5px; left: 39.5px;"></div>
+<div style="border-style: solid; top: 9.5px; left: 54.5px;"></div>
+<div style="border-style: solid; width: 6px; height: 6px; top: 9px; left: 69px;"></div>
+<div style="border-style: solid; width: 6px; height: 6px; top: 9px; left: 84px;"></div>
+<div style="border-style: solid; width: 6px; height: 6px; top: 9px; left: 99px;"></div>
+<div style="border-style: solid; width: 6px; height: 6px; top: 9px; left: 114px;"></div>
+<div style="border-style: solid; width: 6px; height: 6px; top: 9px; left: 129px;"></div>
+<div style="border-style: solid; border-width: 1px; width: 7px; height: 7px; top: 8px; left: 143px;"></div>
+<div style="border-style: solid; border-width: 1px; width: 7px; height: 7px; top: 8px; left: 158px;"></div>
+
+<div style="border-style: double; top: 24px; left: 9px; width: 6px; height: 6px;"></div>
+<div style="border-style: double; top: 24px; left: 24px; width: 6px; height: 6px;"></div>
+<div style="border-style: double; border-width: 1px; top: 23px; left: 38px; width: 7px; height: 7px;"></div>
+<div style="border-style: double; border-width: 1px; top: 23px; left: 53px; width: 7px; height: 7px;"></div>
+<div style="border-style: double; border-width: 1px; top: 23px; left: 68px; width: 7px; height: 7px;"></div>
+<div style="border-style: double; border-width: 1px; top: 23px; left: 83px; width: 7px; height: 7px;"></div>
+<div style="border-style: double; border-width: 1px; top: 23px; left: 98px; width: 7px; height: 7px;"></div>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsfastbordershidpioutlinehairlinepaintinghtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/borders/hidpi-outline-hairline-painting.html (0 => 194421)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/borders/hidpi-outline-hairline-painting.html         (rev 0)
+++ trunk/LayoutTests/fast/borders/hidpi-outline-hairline-painting.html        2015-12-26 05:28:15 UTC (rev 194421)
</span><span class="lines">@@ -0,0 +1,47 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+<title>This tests hairline outline painting</title>
+<style>
+ div {
+ position: absolute;
+ height: 5px;
+ width: 5px;
+ left: 10px;
+ top: 10px;
+ outline: solid 0px green;
+ outline-offset: 0px;
+ }
+</style>
+</head>
+<body>
+<p id="container"></p>
+<script>
+ var container = document.getElementById("container");
+ var leftPos = 10;
+ var width = 0.1;
+ for (var i = 0; i <= 10; ++i) {
+ var e = document.createElement("div");
+ e.style.left = leftPos + "px";
+ e.style.outlineWidth = width + "px";
+ e.style.outlineOffset = width + "px";
+ container.appendChild(e);
+ width += 0.1;
+ leftPos += 15;
+ }
+ leftPos = 10;
+ width = 0.8;
+ for (var i = 0; i <= 6; ++i) {
+ var e = document.createElement("div");
+ e.style.left = leftPos + "px";
+ e.style.top = "25px";
+ e.style.outlineWidth = width + "px";
+ e.style.outlineOffset = width + "px";
+ e.style.outlineStyle = "double";
+ container.appendChild(e);
+ width += 0.1;
+ leftPos += 15;
+ }
+</script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (194420 => 194421)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-12-25 20:46:47 UTC (rev 194420)
+++ trunk/Source/WebCore/ChangeLog        2015-12-26 05:28:15 UTC (rev 194421)
</span><span class="lines">@@ -1,3 +1,37 @@
</span><ins>+2015-12-25 Zalan Bujtas <zalan@apple.com>
+
+ Subpixel rendering: Add subpixel support for outline.
+ https://bugs.webkit.org/show_bug.cgi?id=152560
+
+ Reviewed by Simon Fraser.
+
+ This patch adds support for subpixel outline-width/outline-offset.
+
+ Test: fast/borders/hidpi-outline-hairline-painting.html
+
+ * css/CSSPropertyNames.in:
+ * page/animation/CSSPropertyAnimation.cpp:
+ (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
+ * platform/graphics/GraphicsContext.h:
+ * platform/graphics/mac/GraphicsContextMac.mm:
+ (WebCore::GraphicsContext::drawFocusRing):
+ * rendering/RenderElement.cpp:
+ (WebCore::RenderElement::computeMaxOutlineSize):
+ (WebCore::RenderElement::paintOutline):
+ * rendering/RenderImage.cpp:
+ (WebCore::RenderImage::paintAreaElementFocusRing):
+ * rendering/RenderInline.cpp:
+ (WebCore::RenderInline::paintOutlineForLine):
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::adjustRectForOutlineAndShadow):
+ * rendering/RenderView.cpp:
+ (WebCore::RenderView::setMaximalOutlineSize):
+ * rendering/RenderView.h:
+ * rendering/style/OutlineValue.h:
+ (WebCore::OutlineValue::offset):
+ (WebCore::OutlineValue::OutlineValue): Deleted.
+ * rendering/style/RenderStyle.h:
+
</ins><span class="cx"> 2015-12-25 Alexey Proskuryakov <ap@apple.com>
</span><span class="cx">
</span><span class="cx"> ASSERT(m_nsResponse) in ResourceResponse::platformCertificateInfo() when running tests in iOS simulator
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSPropertyNamesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSPropertyNames.in (194420 => 194421)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSPropertyNames.in        2015-12-25 20:46:47 UTC (rev 194420)
+++ trunk/Source/WebCore/css/CSSPropertyNames.in        2015-12-26 05:28:15 UTC (rev 194421)
</span><span class="lines">@@ -277,9 +277,9 @@
</span><span class="cx"> orphans [Inherited, AutoFunctions]
</span><span class="cx"> outline [Longhands=outline-color|outline-style|outline-width]
</span><span class="cx"> outline-color [VisitedLinkColorSupport, Initial=invalidColor]
</span><del>-outline-offset [Converter=ComputedLength<int>]
</del><ins>+outline-offset [Converter=ComputedLength<float>]
</ins><span class="cx"> outline-style [Custom=All]
</span><del>-outline-width [Converter=LineWidth<unsigned short>]
</del><ins>+outline-width [Converter=LineWidth<float>]
</ins><span class="cx"> overflow [Longhands=overflow-x|overflow-y]
</span><span class="cx"> overflow-wrap
</span><span class="cx"> overflow-x
</span></span></pre></div>
<a id="trunkSourceWebCorepageanimationCSSPropertyAnimationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp (194420 => 194421)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp        2015-12-25 20:46:47 UTC (rev 194420)
+++ trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp        2015-12-26 05:28:15 UTC (rev 194421)
</span><span class="lines">@@ -1292,8 +1292,8 @@
</span><span class="cx"> new PropertyWrapper<short>(CSSPropertyOrphans, &RenderStyle::orphans, &RenderStyle::setOrphans),
</span><span class="cx"> new PropertyWrapper<short>(CSSPropertyWidows, &RenderStyle::widows, &RenderStyle::setWidows),
</span><span class="cx"> new LengthPropertyWrapper<Length>(CSSPropertyLineHeight, &RenderStyle::specifiedLineHeight, &RenderStyle::setLineHeight),
</span><del>- new PropertyWrapper<int>(CSSPropertyOutlineOffset, &RenderStyle::outlineOffset, &RenderStyle::setOutlineOffset),
- new PropertyWrapper<unsigned short>(CSSPropertyOutlineWidth, &RenderStyle::outlineWidth, &RenderStyle::setOutlineWidth),
</del><ins>+ new PropertyWrapper<float>(CSSPropertyOutlineOffset, &RenderStyle::outlineOffset, &RenderStyle::setOutlineOffset),
+ new PropertyWrapper<float>(CSSPropertyOutlineWidth, &RenderStyle::outlineWidth, &RenderStyle::setOutlineWidth),
</ins><span class="cx"> new PropertyWrapper<float>(CSSPropertyLetterSpacing, &RenderStyle::letterSpacing, &RenderStyle::setLetterSpacing),
</span><span class="cx"> new LengthPropertyWrapper<Length>(CSSPropertyWordSpacing, &RenderStyle::wordSpacing, &RenderStyle::setWordSpacing),
</span><span class="cx"> new LengthPropertyWrapper<Length>(CSSPropertyTextIndent, &RenderStyle::textIndent, &RenderStyle::setTextIndent),
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsGraphicsContexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/GraphicsContext.h (194420 => 194421)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/GraphicsContext.h        2015-12-25 20:46:47 UTC (rev 194420)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContext.h        2015-12-26 05:28:15 UTC (rev 194421)
</span><span class="lines">@@ -389,10 +389,10 @@
</span><span class="cx"> bool mustUseShadowBlur() const;
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>- void drawFocusRing(const Vector<IntRect>&, int width, int offset, const Color&);
- void drawFocusRing(const Path&, int width, int offset, const Color&);
</del><ins>+ void drawFocusRing(const Vector<IntRect>&, float width, float offset, const Color&);
+ void drawFocusRing(const Path&, float width, float offset, const Color&);
</ins><span class="cx"> #if PLATFORM(MAC)
</span><del>- void drawFocusRing(const Vector<IntRect>&, int width, int offset, double timeOffset, bool& needsRedraw);
</del><ins>+ void drawFocusRing(const Vector<IntRect>&, float width, float offset, double timeOffset, bool& needsRedraw);
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> void setLineCap(LineCap);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscairoGraphicsContextCairocpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp (194420 => 194421)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp        2015-12-25 20:46:47 UTC (rev 194420)
+++ trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp        2015-12-26 05:28:15 UTC (rev 194421)
</span><span class="lines">@@ -522,7 +522,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static inline void adjustFocusRingLineWidth(int& width)
</del><ins>+static inline void adjustFocusRingLineWidth(float& width)
</ins><span class="cx"> {
</span><span class="cx"> #if PLATFORM(GTK)
</span><span class="cx"> width = 2;
</span><span class="lines">@@ -540,7 +540,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void GraphicsContext::drawFocusRing(const Path& path, int width, int /* offset */, const Color& color)
</del><ins>+void GraphicsContext::drawFocusRing(const Path& path, float width, float /* offset */, const Color& color)
</ins><span class="cx"> {
</span><span class="cx"> // FIXME: We should draw paths that describe a rectangle with rounded corners
</span><span class="cx"> // so as to be consistent with how we draw rectangular focus rings.
</span><span class="lines">@@ -558,7 +558,7 @@
</span><span class="cx"> cairo_restore(cr);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void GraphicsContext::drawFocusRing(const Vector<IntRect>& rects, int width, int /* offset */, const Color& color)
</del><ins>+void GraphicsContext::drawFocusRing(const Vector<IntRect>& rects, float width, float /* offset */, const Color& color)
</ins><span class="cx"> {
</span><span class="cx"> if (paintingDisabled())
</span><span class="cx"> return;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsmacGraphicsContextMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/mac/GraphicsContextMac.mm (194420 => 194421)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/mac/GraphicsContextMac.mm        2015-12-25 20:46:47 UTC (rev 194420)
+++ trunk/Source/WebCore/platform/graphics/mac/GraphicsContextMac.mm        2015-12-26 05:28:15 UTC (rev 194421)
</span><span class="lines">@@ -72,7 +72,7 @@
</span><span class="cx"> }
</span><span class="cx"> #endif // !PLATFORM(IOS)
</span><span class="cx">
</span><del>-void GraphicsContext::drawFocusRing(const Path& path, int /* width */, int /* offset */, const Color&)
</del><ins>+void GraphicsContext::drawFocusRing(const Path& path, float /* width */, float /* offset */, const Color&)
</ins><span class="cx"> {
</span><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx"> if (paintingDisabled() || path.isNull())
</span><span class="lines">@@ -85,7 +85,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(MAC)
</span><del>-void GraphicsContext::drawFocusRing(const Vector<IntRect>& rects, int, int offset, double timeOffset, bool& needsRedraw)
</del><ins>+void GraphicsContext::drawFocusRing(const Vector<IntRect>& rects, float, float offset, double timeOffset, bool& needsRedraw)
</ins><span class="cx"> {
</span><span class="cx"> if (paintingDisabled())
</span><span class="cx"> return;
</span><span class="lines">@@ -98,7 +98,7 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>-void GraphicsContext::drawFocusRing(const Vector<IntRect>& rects, int, int offset, const Color&)
</del><ins>+void GraphicsContext::drawFocusRing(const Vector<IntRect>& rects, float, float offset, const Color&)
</ins><span class="cx"> {
</span><span class="cx"> #if !PLATFORM(IOS)
</span><span class="cx"> if (paintingDisabled())
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicswinGraphicsContextCGWincpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/win/GraphicsContextCGWin.cpp (194420 => 194421)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/win/GraphicsContextCGWin.cpp        2015-12-25 20:46:47 UTC (rev 194420)
+++ trunk/Source/WebCore/platform/graphics/win/GraphicsContextCGWin.cpp        2015-12-26 05:28:15 UTC (rev 194421)
</span><span class="lines">@@ -130,14 +130,14 @@
</span><span class="cx"> CGContextDrawImage(m_data->m_cgContext.get(), CGRectMake(point.x(), point.y(), image->size().width(), image->size().height()), cgImage.get());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void GraphicsContext::drawFocusRing(const Path& path, int width, int offset, const Color& color)
</del><ins>+void GraphicsContext::drawFocusRing(const Path& path, float width, float offset, const Color& color)
</ins><span class="cx"> {
</span><span class="cx"> // FIXME: implement
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // FIXME: This is nearly identical to the GraphicsContext::drawFocusRing function in GraphicsContextMac.mm.
</span><span class="cx"> // The code could move to GraphicsContextCG.cpp and be shared.
</span><del>-void GraphicsContext::drawFocusRing(const Vector<IntRect>& rects, int width, int offset, const Color& color)
</del><ins>+void GraphicsContext::drawFocusRing(const Vector<IntRect>& rects, float width, float offset, const Color& color)
</ins><span class="cx"> {
</span><span class="cx"> if (paintingDisabled())
</span><span class="cx"> return;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderElement.cpp (194420 => 194421)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderElement.cpp        2015-12-25 20:46:47 UTC (rev 194420)
+++ trunk/Source/WebCore/rendering/RenderElement.cpp        2015-12-26 05:28:15 UTC (rev 194421)
</span><span class="lines">@@ -377,7 +377,7 @@
</span><span class="cx"> // during styleDidChange (it's used by clippedOverflowRectForRepaint()).
</span><span class="cx"> if (!style.outlineWidth())
</span><span class="cx"> return;
</span><del>- int maxOutlineSize = style.outlineSize();
</del><ins>+ float maxOutlineSize = style.outlineSize();
</ins><span class="cx"> if (style.outlineStyleIsAuto())
</span><span class="cx"> maxOutlineSize = std::max(theme().platformFocusRingWidth() + style.outlineOffset(), maxOutlineSize);
</span><span class="cx">
</span><span class="lines">@@ -2107,10 +2107,9 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> RenderStyle& styleToUse = style();
</span><del>- LayoutUnit outlineWidth = styleToUse.outlineWidth();
</del><ins>+ float outlineWidth = floorToDevicePixel(styleToUse.outlineWidth(), document().deviceScaleFactor());
+ float outlineOffset = floorToDevicePixel(styleToUse.outlineOffset(), document().deviceScaleFactor());
</ins><span class="cx">
</span><del>- int outlineOffset = styleToUse.outlineOffset();
-
</del><span class="cx"> // Only paint the focus ring by hand if the theme isn't able to draw it.
</span><span class="cx"> if (styleToUse.outlineStyleIsAuto() && !theme().supportsFocusRing(styleToUse))
</span><span class="cx"> paintFocusRing(paintInfo, paintRect.location(), styleToUse);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderImagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderImage.cpp (194420 => 194421)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderImage.cpp        2015-12-25 20:46:47 UTC (rev 194420)
+++ trunk/Source/WebCore/rendering/RenderImage.cpp        2015-12-26 05:28:15 UTC (rev 194421)
</span><span class="lines">@@ -516,7 +516,7 @@
</span><span class="cx"> // FIXME: Do we need additional code to clip the path to the image's bounding box?
</span><span class="cx">
</span><span class="cx"> RenderStyle* areaElementStyle = areaElement.computedStyle();
</span><del>- unsigned short outlineWidth = areaElementStyle->outlineWidth();
</del><ins>+ float outlineWidth = areaElementStyle->outlineWidth();
</ins><span class="cx"> if (!outlineWidth)
</span><span class="cx"> return;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderInlinecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderInline.cpp (194420 => 194421)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderInline.cpp        2015-12-25 20:46:47 UTC (rev 194420)
+++ trunk/Source/WebCore/rendering/RenderInline.cpp        2015-12-26 05:28:15 UTC (rev 194421)
</span><span class="lines">@@ -1642,12 +1642,12 @@
</span><span class="cx"> const Color outlineColor)
</span><span class="cx"> {
</span><span class="cx"> const RenderStyle& styleToUse = style();
</span><del>- int outlineWidth = styleToUse.outlineWidth();
</del><ins>+ float outlineWidth = styleToUse.outlineWidth();
</ins><span class="cx"> EBorderStyle outlineStyle = styleToUse.outlineStyle();
</span><span class="cx">
</span><span class="cx"> bool antialias = shouldAntialiasLines(graphicsContext);
</span><span class="cx">
</span><del>- int offset = style().outlineOffset();
</del><ins>+ float offset = style().outlineOffset();
</ins><span class="cx">
</span><span class="cx"> LayoutRect box(LayoutPoint(paintOffset.x() + thisline.x() - offset, paintOffset.y() + thisline.y() - offset),
</span><span class="cx"> LayoutSize(thisline.width() + offset, thisline.height() + offset));
</span><span class="lines">@@ -1686,7 +1686,7 @@
</span><span class="cx"> drawLineForBoxSide(graphicsContext,
</span><span class="cx"> FloatRect(FloatPoint(pixelSnappedBox.x() - outlineWidth,
</span><span class="cx"> pixelSnappedBox.y() - outlineWidth),
</span><del>- FloatPoint(std::min(pixelSnappedBox.maxX() + outlineWidth, (lastline.isEmpty() ? 1000000 : pixelSnappedLastLine.x())),
</del><ins>+ FloatPoint(std::min<float>(pixelSnappedBox.maxX() + outlineWidth, (lastline.isEmpty() ? 1000000 : pixelSnappedLastLine.x())),
</ins><span class="cx"> pixelSnappedBox.y())),
</span><span class="cx"> BSTop, outlineColor, outlineStyle,
</span><span class="cx"> outlineWidth,
</span><span class="lines">@@ -1695,7 +1695,7 @@
</span><span class="cx">
</span><span class="cx"> if (lastline.maxX() < thisline.maxX())
</span><span class="cx"> drawLineForBoxSide(graphicsContext,
</span><del>- FloatRect(FloatPoint(std::max(lastline.isEmpty() ? -1000000 : pixelSnappedLastLine.maxX(), pixelSnappedBox.x() - outlineWidth),
</del><ins>+ FloatRect(FloatPoint(std::max<float>(lastline.isEmpty() ? -1000000 : pixelSnappedLastLine.maxX(), pixelSnappedBox.x() - outlineWidth),
</ins><span class="cx"> pixelSnappedBox.y() - outlineWidth),
</span><span class="cx"> FloatPoint(pixelSnappedBox.maxX() + outlineWidth,
</span><span class="cx"> pixelSnappedBox.y())),
</span><span class="lines">@@ -1719,7 +1719,7 @@
</span><span class="cx"> drawLineForBoxSide(graphicsContext,
</span><span class="cx"> FloatRect(FloatPoint(pixelSnappedBox.x() - outlineWidth,
</span><span class="cx"> pixelSnappedBox.maxY()),
</span><del>- FloatPoint(std::min(pixelSnappedBox.maxX() + outlineWidth, !nextline.isEmpty() ? pixelSnappedNextLine.x() + 1 : 1000000),
</del><ins>+ FloatPoint(std::min<float>(pixelSnappedBox.maxX() + outlineWidth, !nextline.isEmpty() ? pixelSnappedNextLine.x() + 1 : 1000000),
</ins><span class="cx"> pixelSnappedBox.maxY() + outlineWidth)),
</span><span class="cx"> BSBottom, outlineColor, outlineStyle,
</span><span class="cx"> outlineWidth,
</span><span class="lines">@@ -1728,7 +1728,7 @@
</span><span class="cx">
</span><span class="cx"> if (nextline.maxX() < thisline.maxX())
</span><span class="cx"> drawLineForBoxSide(graphicsContext,
</span><del>- FloatRect(FloatPoint(std::max(!nextline.isEmpty() ? pixelSnappedNextLine.maxX() : -1000000, pixelSnappedBox.x() - outlineWidth),
</del><ins>+ FloatRect(FloatPoint(std::max<float>(!nextline.isEmpty() ? pixelSnappedNextLine.maxX() : -1000000, pixelSnappedBox.x() - outlineWidth),
</ins><span class="cx"> pixelSnappedBox.maxY()),
</span><span class="cx"> FloatPoint(pixelSnappedBox.maxX() + outlineWidth,
</span><span class="cx"> pixelSnappedBox.maxY() + outlineWidth)),
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderObject.cpp (194420 => 194421)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderObject.cpp        2015-12-25 20:46:47 UTC (rev 194420)
+++ trunk/Source/WebCore/rendering/RenderObject.cpp        2015-12-26 05:28:15 UTC (rev 194421)
</span><span class="lines">@@ -1943,7 +1943,7 @@
</span><span class="cx">
</span><span class="cx"> void RenderObject::adjustRectForOutlineAndShadow(LayoutRect& rect) const
</span><span class="cx"> {
</span><del>- int outlineSize = outlineStyleForRepaint().outlineSize();
</del><ins>+ float outlineSize = outlineStyleForRepaint().outlineSize();
</ins><span class="cx"> if (outlineStyleForRepaint().outlineStyleIsAuto())
</span><span class="cx"> outlineSize = std::max(theme().platformFocusRingWidth() + outlineStyleForRepaint().outlineOffset(), outlineSize);
</span><span class="cx"> if (const ShadowData* boxShadow = style().boxShadow()) {
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderView.cpp (194420 => 194421)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderView.cpp        2015-12-25 20:46:47 UTC (rev 194420)
+++ trunk/Source/WebCore/rendering/RenderView.cpp        2015-12-26 05:28:15 UTC (rev 194421)
</span><span class="lines">@@ -826,7 +826,7 @@
</span><span class="cx"> // Compositing layer dimensions take outline size into account, so we have to recompute layer
</span><span class="cx"> // bounds when it changes.
</span><span class="cx"> // FIXME: This is ugly; it would be nice to have a better way to do this.
</span><del>-void RenderView::setMaximalOutlineSize(int outlineSize)
</del><ins>+void RenderView::setMaximalOutlineSize(float outlineSize)
</ins><span class="cx"> {
</span><span class="cx"> if (outlineSize == m_maximalOutlineSize)
</span><span class="cx"> return;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderViewh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderView.h (194420 => 194421)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderView.h        2015-12-25 20:46:47 UTC (rev 194420)
+++ trunk/Source/WebCore/rendering/RenderView.h        2015-12-26 05:28:15 UTC (rev 194421)
</span><span class="lines">@@ -98,8 +98,8 @@
</span><span class="cx"> virtual void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedOffset) const override;
</span><span class="cx"> virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const override;
</span><span class="cx">
</span><del>- void setMaximalOutlineSize(int);
- int maximalOutlineSize() const { return m_maximalOutlineSize; }
</del><ins>+ void setMaximalOutlineSize(float);
+ float maximalOutlineSize() const { return m_maximalOutlineSize; }
</ins><span class="cx">
</span><span class="cx"> LayoutRect viewRect() const;
</span><span class="cx">
</span><span class="lines">@@ -351,7 +351,7 @@
</span><span class="cx"> // End deprecated members.
</span><span class="cx">
</span><span class="cx"> // Used to inflate compositing layers and repaint rects.
</span><del>- int m_maximalOutlineSize { 0 };
</del><ins>+ float m_maximalOutlineSize { 0 };
</ins><span class="cx">
</span><span class="cx"> bool shouldUsePrintingLayout() const;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleOutlineValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/OutlineValue.h (194420 => 194421)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/OutlineValue.h        2015-12-25 20:46:47 UTC (rev 194420)
+++ trunk/Source/WebCore/rendering/style/OutlineValue.h        2015-12-26 05:28:15 UTC (rev 194421)
</span><span class="lines">@@ -32,11 +32,6 @@
</span><span class="cx"> class OutlineValue : public BorderValue {
</span><span class="cx"> friend class RenderStyle;
</span><span class="cx"> public:
</span><del>- OutlineValue()
- : m_offset(0)
- {
- }
-
</del><span class="cx"> bool operator==(const OutlineValue& o) const
</span><span class="cx"> {
</span><span class="cx"> return m_width == o.m_width && m_style == o.m_style && m_color == o.m_color && m_colorIsValid == o.m_colorIsValid && m_offset == o.m_offset && m_isAuto == o.m_isAuto;
</span><span class="lines">@@ -47,11 +42,11 @@
</span><span class="cx"> return !(*this == o);
</span><span class="cx"> }
</span><span class="cx">
</span><del>- int offset() const { return m_offset; }
</del><ins>+ float offset() const { return m_offset; }
</ins><span class="cx"> OutlineIsAuto isAuto() const { return static_cast<OutlineIsAuto>(m_isAuto); }
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- int m_offset;
</del><ins>+ float m_offset { 0 };
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleRenderStyleh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/RenderStyle.h (194420 => 194421)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/RenderStyle.h        2015-12-25 20:46:47 UTC (rev 194420)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.h        2015-12-26 05:28:15 UTC (rev 194421)
</span><span class="lines">@@ -674,8 +674,8 @@
</span><span class="cx"> float borderStartWidth() const;
</span><span class="cx"> float borderEndWidth() const;
</span><span class="cx">
</span><del>- unsigned short outlineSize() const { return std::max(0, outlineWidth() + outlineOffset()); }
- unsigned short outlineWidth() const
</del><ins>+ float outlineSize() const { return std::max<float>(0, outlineWidth() + outlineOffset()); }
+ float outlineWidth() const
</ins><span class="cx"> {
</span><span class="cx"> if (m_background->outline().style() == BNONE)
</span><span class="cx"> return 0;
</span><span class="lines">@@ -887,7 +887,7 @@
</span><span class="cx">
</span><span class="cx"> // CSS3 Getter Methods
</span><span class="cx">
</span><del>- int outlineOffset() const
</del><ins>+ float outlineOffset() const
</ins><span class="cx"> {
</span><span class="cx"> if (m_background->outline().style() == BNONE)
</span><span class="cx"> return 0;
</span><span class="lines">@@ -1325,7 +1325,7 @@
</span><span class="cx"> void setBorderBottomStyle(EBorderStyle v) { SET_VAR(surround, border.m_bottom.m_style, v); }
</span><span class="cx"> void setBorderBottomColor(const Color& v) { SET_BORDERVALUE_COLOR(surround, border.m_bottom, v); }
</span><span class="cx">
</span><del>- void setOutlineWidth(unsigned short v) { SET_VAR(m_background, m_outline.m_width, v); }
</del><ins>+ void setOutlineWidth(float v) { SET_VAR(m_background, m_outline.m_width, v); }
</ins><span class="cx"> void setOutlineStyleIsAuto(OutlineIsAuto isAuto) { SET_VAR(m_background, m_outline.m_isAuto, isAuto); }
</span><span class="cx"> void setOutlineStyle(EBorderStyle v) { SET_VAR(m_background, m_outline.m_style, v); }
</span><span class="cx"> void setOutlineColor(const Color& v) { SET_BORDERVALUE_COLOR(m_background, m_outline, v); }
</span><span class="lines">@@ -1499,7 +1499,7 @@
</span><span class="cx"> void setPageBreakAfter(EPageBreak b) { noninherited_flags.setPageBreakAfter(b); }
</span><span class="cx">
</span><span class="cx"> // CSS3 Setters
</span><del>- void setOutlineOffset(int v) { SET_VAR(m_background, m_outline.m_offset, v); }
</del><ins>+ void setOutlineOffset(float v) { SET_VAR(m_background, m_outline.m_offset, v); }
</ins><span class="cx"> void setTextShadow(std::unique_ptr<ShadowData>, bool add = false);
</span><span class="cx"> void setTextStrokeColor(const Color& c) { SET_VAR(rareInheritedData, textStrokeColor, c); }
</span><span class="cx"> void setTextStrokeWidth(float w) { SET_VAR(rareInheritedData, textStrokeWidth, w); }
</span><span class="lines">@@ -1922,7 +1922,7 @@
</span><span class="cx"> static StyleImage* initialListStyleImage() { return 0; }
</span><span class="cx"> static float initialBorderWidth() { return 3; }
</span><span class="cx"> static unsigned short initialColumnRuleWidth() { return 3; }
</span><del>- static unsigned short initialOutlineWidth() { return 3; }
</del><ins>+ static float initialOutlineWidth() { return 3; }
</ins><span class="cx"> static float initialLetterSpacing() { return 0; }
</span><span class="cx"> static Length initialWordSpacing() { return Length(Fixed); }
</span><span class="cx"> static Length initialSize() { return Length(); }
</span><span class="lines">@@ -1955,7 +1955,7 @@
</span><span class="cx"> static TextUnderlinePosition initialTextUnderlinePosition() { return TextUnderlinePositionAuto; }
</span><span class="cx"> static float initialZoom() { return 1.0f; }
</span><span class="cx"> static TextZoom initialTextZoom() { return TextZoomNormal; }
</span><del>- static int initialOutlineOffset() { return 0; }
</del><ins>+ static float initialOutlineOffset() { return 0; }
</ins><span class="cx"> static float initialOpacity() { return 1.0f; }
</span><span class="cx"> static EBoxAlignment initialBoxAlign() { return BSTRETCH; }
</span><span class="cx"> static EBoxDecorationBreak initialBoxDecorationBreak() { return DSLICE; }
</span></span></pre>
</div>
</div>
</body>
</html>