<!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>[208460] 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/208460">208460</a></dd>
<dt>Author</dt> <dd>dino@apple.com</dd>
<dt>Date</dt> <dd>2016-11-09 11:56:17 -0800 (Wed, 09 Nov 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Rendering support for ExtendedColors
https://bugs.webkit.org/show_bug.cgi?id=164443
&lt;rdar://problems/29123243&gt;

Reviewed by Simon Fraser and Darin Adler.

Source/WebCore:

Add support for rendering the new color() syntax, which
ends up as an ExtendedColor.

In order to make rendering code a little more readable, I
changed Color::hasAlpha to Color::isOpaque (since an alpha
of 100% is still an alpha), and added a Color::isVisible
helper (the color isn't completely transparent). These new
helpers support ExtendedColor forms.

Support for painting gradients and blending between colors
is still to come. I also added some FIXME comments
to show other places that don't handle ExtendedColors yet.

Tests: css3/color/backgrounds-and-borders.html
       css3/color/box-shadows.html
       css3/color/canvas.html
       css3/color/composited-solid-backgrounds.html
       css3/color/text.html

* css/CSSGradientValue.cpp: Add some notes that this is broken.
(WebCore::interpolate):
(WebCore::CSSGradientValue::knownToBeOpaque):

* editing/EditingStyle.cpp: Use new Color helpers.
(WebCore::isTransparentColorValue):

* editing/mac/EditorMac.mm: Use new Color helpers.
(WebCore::Editor::fontAttributesForSelectionStart):

* html/ColorInputType.cpp: No need to use the Color class at all here.
(WebCore::isValidSimpleColorString): Renamed from isValidColorString.
(WebCore::ColorInputType::sanitizeValue):
(WebCore::ColorInputType::typeMismatchFor):
(WebCore::isValidColorString): Deleted.

* html/canvas/CanvasRenderingContext2D.cpp: New helpers.
(WebCore::CanvasRenderingContext2D::shouldDrawShadows):
(WebCore::CanvasRenderingContext2D::didDraw):

* page/FrameView.cpp: Ditto.
(WebCore::FrameView::recalculateScrollbarOverlayStyle):
(WebCore::FrameView::hasOpaqueBackground):
(WebCore::FrameView::setBaseBackgroundColor):

* platform/graphics/Color.cpp:
(WebCore::differenceSquared): Support ExtendedColor, but also
add a note to indicate that this method and its call sites
should use floats.
(WebCore::Color::serialized): New helper.
(WebCore::Color::cssText): Ditto.
(WebCore::Color::blend): Ditto.
(WebCore::Color::blendWithWhite):
(WebCore::Color::colorWithAlphaMultipliedBy): Implementation of new function.
(WebCore::Color::colorWithAlpha): Ditto.
(WebCore::Color::opaqueColor): New method to return an opaque version of the given color.
(WebCore::blend):
* platform/graphics/Color.h:
(WebCore::Color::isOpaque): New helper that is !hasAlpha().
(WebCore::Color::isVisible): New helper.
(WebCore::Color::alphaAsFloat): Gets the alpha value as a float. This replaces
a bunch of places that were calculating it manually each time. Meanwhile, we
might consider always exposing the primaries as floats... or at least
have that option.
(WebCore::isBlackColor): New helper - it was used in a couple of places.
(WebCore::isWhiteColor): Ditto.
(WebCore::Color::hasAlpha): Deleted.

* platform/graphics/Gradient.cpp: Add FIXME.
(WebCore::Gradient::addColorStop):
* platform/graphics/Gradient.h:

* platform/graphics/GraphicsContext.cpp: Use new helpers.
(WebCore::GraphicsContext::computeLineBoundsAndAntialiasingModeForText):
* platform/graphics/GraphicsContext.h:
(WebCore::GraphicsContext::hasVisibleShadow):

* platform/graphics/Image.cpp: Ditto.
(WebCore::Image::fillWithSolidColor):

* platform/graphics/ShadowBlur.cpp: Ditto.
(WebCore::ShadowBlur::updateShadowBlurValues):

* platform/graphics/ca/GraphicsLayerCA.cpp: Ditto.
(WebCore::GraphicsLayerCA::setContentsToSolidColor):

* platform/graphics/cg/GradientCG.cpp:
(WebCore::Gradient::platformGradient): Add a FIXME to note that we can
add ExtendedColor support simply by using CGColors, rather than fetching
the components ourselves.

* platform/graphics/cg/GraphicsContextCG.cpp: New helpers.
(WebCore::calculateDrawingMode):

* platform/graphics/cocoa/FontCascadeCocoa.mm: New helpers.
(WebCore::FontCascade::drawGlyphs):

* platform/graphics/mac/ColorMac.mm: Use the new helpers and Color::hash().
(WebCore::nsColor):

* platform/graphics/texmap/TextureMapperGL.cpp: New helpers.
(WebCore::TextureMapperGL::drawBorder):

* rendering/BorderEdge.cpp: Ditto.
(WebCore::BorderEdge::obscuresBackgroundEdge):
(WebCore::BorderEdge::obscuresBackground):

* rendering/RenderBox.cpp: Ditto.
(WebCore::RenderBox::getBackgroundPaintedExtent):
(WebCore::RenderBox::backgroundIsKnownToBeOpaqueInRect):
(WebCore::RenderBox::backgroundHasOpaqueTopLayer):

* rendering/RenderBoxModelObject.cpp: Ditto.
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
(WebCore::colorNeedsAntiAliasAtCorner):
(WebCore::willBeOverdrawn):
(WebCore::RenderBoxModelObject::paintTranslucentBorderSides):
(WebCore::RenderBoxModelObject::paintBorder):
(WebCore::RenderBoxModelObject::boxShadowShouldBeAppliedToBackground):
(WebCore::RenderBoxModelObject::paintBoxShadow):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::paintOutline):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::paintOutline):
* rendering/RenderLayerBacking.cpp:
(WebCore::canCreateTiledImage):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::viewHasTransparentBackground):
* rendering/RenderMenuList.cpp:
(RenderMenuList::getItemBackgroundColor):
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::disabledTextColor):
* rendering/RenderView.cpp:
(WebCore::RenderView::paintBoxDecorations):
* rendering/TextDecorationPainter.cpp:
(WebCore::TextDecorationPainter::paintTextDecoration):
* rendering/TextPainter.cpp:
(WebCore::TextPainter::paintTextWithShadows):
* rendering/style/BorderValue.h:
(WebCore::BorderValue::isTransparent):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::visitedDependentColor):
* rendering/style/RenderStyle.h:
(WebCore::RenderStyle::hasBackground):
* rendering/svg/RenderSVGResource.cpp:
(WebCore::requestPaintingResource):
* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::paintSelectionBackground):

* svg/SVGAnimatedColor.cpp: Add a FIXME to note this is broken.
(WebCore::SVGAnimatedColorAnimator::calculateAnimatedValue):

Source/WebKit2:

Implement argument coders for Color.

* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder&lt;Color&gt;::encode):
(IPC::ArgumentCoder&lt;Color&gt;::decode):
* Shared/WebCoreArgumentCoders.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _updateScrollViewBackground]):

LayoutTests:

Tests that use the new color() syntax.

* css3/color/backgrounds-and-borders-expected.html: Added.
* css3/color/backgrounds-and-borders.html: Added.
* css3/color/box-shadows-expected.html: Added.
* css3/color/box-shadows.html: Added.
* css3/color/canvas-expected.html: Added.
* css3/color/canvas.html: Added.
* css3/color/composited-solid-backgrounds-expected.html: Added.
* css3/color/composited-solid-backgrounds.html: Added.
* css3/color/text-expected.html: Added.
* css3/color/text.html: Added.
* editing/mac/attributed-string/anchor-element-expected.txt: Updated.
* editing/mac/attributed-string/basic-expected.txt:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestseditingmacattributedstringanchorelementexpectedtxt">trunk/LayoutTests/editing/mac/attributed-string/anchor-element-expected.txt</a></li>
<li><a href="#trunkLayoutTestseditingmacattributedstringbasicexpectedtxt">trunk/LayoutTests/editing/mac/attributed-string/basic-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacyosemiteeditingmacattributedstringanchorelementexpectedtxt">trunk/LayoutTests/platform/mac-yosemite/editing/mac/attributed-string/anchor-element-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacyosemiteeditingmacattributedstringbasicexpectedtxt">trunk/LayoutTests/platform/mac-yosemite/editing/mac/attributed-string/basic-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecssCSSGradientValuecpp">trunk/Source/WebCore/css/CSSGradientValue.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingEditingStylecpp">trunk/Source/WebCore/editing/EditingStyle.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingmacEditorMacmm">trunk/Source/WebCore/editing/mac/EditorMac.mm</a></li>
<li><a href="#trunkSourceWebCorehtmlColorInputTypecpp">trunk/Source/WebCore/html/ColorInputType.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasCanvasRenderingContext2Dcpp">trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp</a></li>
<li><a href="#trunkSourceWebCorepageFrameViewcpp">trunk/Source/WebCore/page/FrameView.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsColorcpp">trunk/Source/WebCore/platform/graphics/Color.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsColorh">trunk/Source/WebCore/platform/graphics/Color.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsGradientcpp">trunk/Source/WebCore/platform/graphics/Gradient.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsGradienth">trunk/Source/WebCore/platform/graphics/Gradient.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="#trunkSourceWebCoreplatformgraphicsImagecpp">trunk/Source/WebCore/platform/graphics/Image.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsShadowBlurcpp">trunk/Source/WebCore/platform/graphics/ShadowBlur.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscaGraphicsLayerCAcpp">trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscgGradientCGcpp">trunk/Source/WebCore/platform/graphics/cg/GradientCG.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscgGraphicsContextCGcpp">trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscocoaFontCascadeCocoamm">trunk/Source/WebCore/platform/graphics/cocoa/FontCascadeCocoa.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsmacColorMacmm">trunk/Source/WebCore/platform/graphics/mac/ColorMac.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicstexmapTextureMapperGLcpp">trunk/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingBorderEdgecpp">trunk/Source/WebCore/rendering/BorderEdge.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="#trunkSourceWebCorerenderingRenderElementcpp">trunk/Source/WebCore/rendering/RenderElement.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderInlinecpp">trunk/Source/WebCore/rendering/RenderInline.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderLayerBackingcpp">trunk/Source/WebCore/rendering/RenderLayerBacking.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderLayerCompositorcpp">trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderMenuListcpp">trunk/Source/WebCore/rendering/RenderMenuList.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderThemecpp">trunk/Source/WebCore/rendering/RenderTheme.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderViewcpp">trunk/Source/WebCore/rendering/RenderView.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingTextDecorationPaintercpp">trunk/Source/WebCore/rendering/TextDecorationPainter.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingTextPaintercpp">trunk/Source/WebCore/rendering/TextPainter.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleBorderValueh">trunk/Source/WebCore/rendering/style/BorderValue.h</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleRenderStylecpp">trunk/Source/WebCore/rendering/style/RenderStyle.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleRenderStyleh">trunk/Source/WebCore/rendering/style/RenderStyle.h</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGResourcecpp">trunk/Source/WebCore/rendering/svg/RenderSVGResource.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgSVGInlineTextBoxcpp">trunk/Source/WebCore/rendering/svg/SVGInlineTextBox.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGAnimatedColorcpp">trunk/Source/WebCore/svg/SVGAnimatedColor.cpp</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2SharedWebCoreArgumentCoderscpp">trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedWebCoreArgumentCodersh">trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKWebViewmm">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcesscairoBackingStoreCairocpp">trunk/Source/WebKit2/UIProcess/cairo/BackingStoreCairo.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessgtkAcceleratedBackingStorecpp">trunk/Source/WebKit2/UIProcess/gtk/AcceleratedBackingStore.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestscss3colorbackgroundsandbordersexpectedhtml">trunk/LayoutTests/css3/color/backgrounds-and-borders-expected.html</a></li>
<li><a href="#trunkLayoutTestscss3colorbackgroundsandbordershtml">trunk/LayoutTests/css3/color/backgrounds-and-borders.html</a></li>
<li><a href="#trunkLayoutTestscss3colorboxshadowsexpectedhtml">trunk/LayoutTests/css3/color/box-shadows-expected.html</a></li>
<li><a href="#trunkLayoutTestscss3colorboxshadowshtml">trunk/LayoutTests/css3/color/box-shadows.html</a></li>
<li><a href="#trunkLayoutTestscss3colorcanvasexpectedhtml">trunk/LayoutTests/css3/color/canvas-expected.html</a></li>
<li><a href="#trunkLayoutTestscss3colorcanvashtml">trunk/LayoutTests/css3/color/canvas.html</a></li>
<li><a href="#trunkLayoutTestscss3colorcompositedsolidbackgroundsexpectedhtml">trunk/LayoutTests/css3/color/composited-solid-backgrounds-expected.html</a></li>
<li><a href="#trunkLayoutTestscss3colorcompositedsolidbackgroundshtml">trunk/LayoutTests/css3/color/composited-solid-backgrounds.html</a></li>
<li><a href="#trunkLayoutTestscss3colortextexpectedhtml">trunk/LayoutTests/css3/color/text-expected.html</a></li>
<li><a href="#trunkLayoutTestscss3colortexthtml">trunk/LayoutTests/css3/color/text.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (208459 => 208460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-11-09 19:54:25 UTC (rev 208459)
+++ trunk/LayoutTests/ChangeLog        2016-11-09 19:56:17 UTC (rev 208460)
</span><span class="lines">@@ -1,3 +1,26 @@
</span><ins>+2016-11-08  Dean Jackson  &lt;dino@apple.com&gt;
+
+        Rendering support for ExtendedColors
+        https://bugs.webkit.org/show_bug.cgi?id=164443
+        &lt;rdar://problems/29123243&gt;
+
+        Reviewed by Simon Fraser and Darin Adler.
+
+        Tests that use the new color() syntax.
+
+        * css3/color/backgrounds-and-borders-expected.html: Added.
+        * css3/color/backgrounds-and-borders.html: Added.
+        * css3/color/box-shadows-expected.html: Added.
+        * css3/color/box-shadows.html: Added.
+        * css3/color/canvas-expected.html: Added.
+        * css3/color/canvas.html: Added.
+        * css3/color/composited-solid-backgrounds-expected.html: Added.
+        * css3/color/composited-solid-backgrounds.html: Added.
+        * css3/color/text-expected.html: Added.
+        * css3/color/text.html: Added.
+        * editing/mac/attributed-string/anchor-element-expected.txt: Updated.
+        * editing/mac/attributed-string/basic-expected.txt:
+
</ins><span class="cx"> 2016-11-09  Antoine Quint  &lt;graouts@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Modern Media Controls] UI Library: StatusLabel
</span></span></pre></div>
<a id="trunkLayoutTestscss3colorbackgroundsandbordersexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/css3/color/backgrounds-and-borders-expected.html (0 => 208460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/color/backgrounds-and-borders-expected.html                                (rev 0)
+++ trunk/LayoutTests/css3/color/backgrounds-and-borders-expected.html        2016-11-09 19:56:17 UTC (rev 208460)
</span><span class="lines">@@ -0,0 +1,47 @@
</span><ins>+&lt;style&gt;
+body {
+    background-image: url('data:image/svg+xml,&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; viewBox=&quot;0 0 10 10&quot;&gt;&lt;g fill=&quot;#ccc&quot;&gt;&lt;rect width=&quot;5&quot; height=&quot;5&quot;/&gt;&lt;rect x=&quot;5&quot; y=&quot;5&quot; width=&quot;5&quot; height=&quot;5&quot;/&gt;&lt;/g&gt;&lt;/svg&gt;');
+    background-size: 100px 100px;
+}
+.box {
+    display: inline-block;
+    width: 60px;
+    height: 60px;
+}
+.outlined-box {
+    display: inline-block;
+    width: 60px;
+    height: 60px;
+    box-sizing: border-box;
+    border: 20px solid black;
+}
+&lt;/style&gt;
+&lt;p&gt;These two rows should be identical&lt;/p&gt;
+&lt;div class=&quot;box&quot; style=&quot;background-color: red;&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;box&quot; style=&quot;background-color: rgb(0, 255, 0);&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;box&quot; style=&quot;background-color: blue;&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;box&quot; style=&quot;background-color: rgba(255, 0, 0, 0.6);&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;box&quot; style=&quot;background-color: rgba(0, 255, 0, 0.6);&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;box&quot; style=&quot;background-color: rgba(0, 0, 255, 0.6);&quot;&gt;&lt;/div&gt;
+&lt;br&gt;
+&lt;div class=&quot;box&quot; style=&quot;background-color: red;&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;box&quot; style=&quot;background-color: rgb(0, 255, 0);&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;box&quot; style=&quot;background-color: blue;&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;box&quot; style=&quot;background-color: rgba(255, 0, 0, 0.6);&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;box&quot; style=&quot;background-color: rgba(0, 255, 0, 0.6);&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;box&quot; style=&quot;background-color: rgba(0, 0, 255, 0.6);&quot;&gt;&lt;/div&gt;
+
+&lt;p&gt;These two rows should be identical&lt;/p&gt;
+&lt;div class=&quot;outlined-box&quot; style=&quot;border-color: red;&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;outlined-box&quot; style=&quot;border-color: rgb(0, 255, 0);&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;outlined-box&quot; style=&quot;border-color: blue;&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;outlined-box&quot; style=&quot;border-color: rgba(255, 0, 0, 0.6);&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;outlined-box&quot; style=&quot;border-color: rgba(0, 255, 0, 0.6);&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;outlined-box&quot; style=&quot;border-color: rgba(0, 0, 255, 0.6);&quot;&gt;&lt;/div&gt;
+&lt;br&gt;
+&lt;div class=&quot;outlined-box&quot; style=&quot;border-color: red;&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;outlined-box&quot; style=&quot;border-color: rgb(0, 255, 0);&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;outlined-box&quot; style=&quot;border-color: blue;&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;outlined-box&quot; style=&quot;border-color: rgba(255, 0, 0, 0.6);&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;outlined-box&quot; style=&quot;border-color: rgba(0, 255, 0, 0.6);&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;outlined-box&quot; style=&quot;border-color: rgba(0, 0, 255, 0.6);&quot;&gt;&lt;/div&gt;
</ins><span class="cx">Property changes on: trunk/LayoutTests/css3/color/backgrounds-and-borders-expected.html
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<ins>+native
</ins><span class="cx">\ No newline at end of property
</span><a id="svnkeywords"></a>
<div class="addfile"><h4>Added: svn:keywords</h4></div>
<ins>+Date Revision
</ins><span class="cx">\ No newline at end of property
</span><a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<ins>+text/html
</ins><span class="cx">\ No newline at end of property
</span><a id="trunkLayoutTestscss3colorbackgroundsandbordershtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/css3/color/backgrounds-and-borders.html (0 => 208460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/color/backgrounds-and-borders.html                                (rev 0)
+++ trunk/LayoutTests/css3/color/backgrounds-and-borders.html        2016-11-09 19:56:17 UTC (rev 208460)
</span><span class="lines">@@ -0,0 +1,47 @@
</span><ins>+&lt;style&gt;
+body {
+    background-image: url('data:image/svg+xml,&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; viewBox=&quot;0 0 10 10&quot;&gt;&lt;g fill=&quot;#ccc&quot;&gt;&lt;rect width=&quot;5&quot; height=&quot;5&quot;/&gt;&lt;rect x=&quot;5&quot; y=&quot;5&quot; width=&quot;5&quot; height=&quot;5&quot;/&gt;&lt;/g&gt;&lt;/svg&gt;');
+    background-size: 100px 100px;
+}
+.box {
+    display: inline-block;
+    width: 60px;
+    height: 60px;
+}
+.outlined-box {
+    display: inline-block;
+    width: 60px;
+    height: 60px;
+    box-sizing: border-box;
+    border: 20px solid black;
+}
+&lt;/style&gt;
+&lt;p&gt;These two rows should be identical&lt;/p&gt;
+&lt;div class=&quot;box&quot; style=&quot;background-color: red;&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;box&quot; style=&quot;background-color: rgb(0, 255, 0);&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;box&quot; style=&quot;background-color: blue;&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;box&quot; style=&quot;background-color: rgba(255, 0, 0, 0.6);&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;box&quot; style=&quot;background-color: rgba(0, 255, 0, 0.6);&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;box&quot; style=&quot;background-color: rgba(0, 0, 255, 0.6);&quot;&gt;&lt;/div&gt;
+&lt;br&gt;
+&lt;div class=&quot;box&quot; style=&quot;background-color: color(srgb 1 0 0);&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;box&quot; style=&quot;background-color: color(srgb 0 1 0);&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;box&quot; style=&quot;background-color: color(srgb 0 0 1);&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;box&quot; style=&quot;background-color: color(srgb 1 0 0 / 0.6);&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;box&quot; style=&quot;background-color: color(srgb 0 1 0 / 0.6);&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;box&quot; style=&quot;background-color: color(srgb 0 0 1 / 0.6);&quot;&gt;&lt;/div&gt;
+
+&lt;p&gt;These two rows should be identical&lt;/p&gt;
+&lt;div class=&quot;outlined-box&quot; style=&quot;border-color: red;&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;outlined-box&quot; style=&quot;border-color: rgb(0, 255, 0);&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;outlined-box&quot; style=&quot;border-color: blue;&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;outlined-box&quot; style=&quot;border-color: rgba(255, 0, 0, 0.6);&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;outlined-box&quot; style=&quot;border-color: rgba(0, 255, 0, 0.6);&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;outlined-box&quot; style=&quot;border-color: rgba(0, 0, 255, 0.6);&quot;&gt;&lt;/div&gt;
+&lt;br&gt;
+&lt;div class=&quot;outlined-box&quot; style=&quot;border-color: color(srgb 1 0 0);&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;outlined-box&quot; style=&quot;border-color: color(srgb 0 1 0);&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;outlined-box&quot; style=&quot;border-color: color(srgb 0 0 1);&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;outlined-box&quot; style=&quot;border-color: color(srgb 1 0 0 / 0.6);&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;outlined-box&quot; style=&quot;border-color: color(srgb 0 1 0 / 0.6);&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;outlined-box&quot; style=&quot;border-color: color(srgb 0 0 1 / 0.6);&quot;&gt;&lt;/div&gt;
</ins><span class="cx">Property changes on: trunk/LayoutTests/css3/color/backgrounds-and-borders.html
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<ins>+native
</ins><span class="cx">\ No newline at end of property
</span><a id="svnkeywords"></a>
<div class="addfile"><h4>Added: svn:keywords</h4></div>
<ins>+Date Revision
</ins><span class="cx">\ No newline at end of property
</span><a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<ins>+text/html
</ins><span class="cx">\ No newline at end of property
</span><a id="trunkLayoutTestscss3colorboxshadowsexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/css3/color/box-shadows-expected.html (0 => 208460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/color/box-shadows-expected.html                                (rev 0)
+++ trunk/LayoutTests/css3/color/box-shadows-expected.html        2016-11-09 19:56:17 UTC (rev 208460)
</span><span class="lines">@@ -0,0 +1,33 @@
</span><ins>+&lt;style&gt;
+body {
+    background-image: url('data:image/svg+xml,&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; viewBox=&quot;0 0 10 10&quot;&gt;&lt;g fill=&quot;#ccc&quot;&gt;&lt;rect width=&quot;5&quot; height=&quot;5&quot;/&gt;&lt;rect x=&quot;5&quot; y=&quot;5&quot; width=&quot;5&quot; height=&quot;5&quot;/&gt;&lt;/g&gt;&lt;/svg&gt;');
+    background-size: 100px 100px;
+}
+
+:root {
+    --x: black;
+}
+
+.box {
+    display: inline-block;
+    width: 60px;
+    height: 60px;
+    background-color: #666;
+    box-shadow: 3px 3px 3px var(--x);
+    margin: 10px 10px;
+}
+&lt;/style&gt;
+&lt;p&gt;These two rows should be identical&lt;/p&gt;
+&lt;div class=&quot;box&quot; style=&quot;--x: red;&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;box&quot; style=&quot;--x: rgb(0, 255, 0);&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;box&quot; style=&quot;--x: blue;&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;box&quot; style=&quot;--x: rgba(255, 0, 0, 0.6);&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;box&quot; style=&quot;--x: rgba(0, 255, 0, 0.6);&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;box&quot; style=&quot;--x: rgba(0, 0, 255, 0.6);&quot;&gt;&lt;/div&gt;
+&lt;br&gt;
+&lt;div class=&quot;box&quot; style=&quot;--x: red;&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;box&quot; style=&quot;--x: rgb(0, 255, 0);&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;box&quot; style=&quot;--x: blue;&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;box&quot; style=&quot;--x: rgba(255, 0, 0, 0.6);&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;box&quot; style=&quot;--x: rgba(0, 255, 0, 0.6);&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;box&quot; style=&quot;--x: rgba(0, 0, 255, 0.6);&quot;&gt;&lt;/div&gt;
</ins><span class="cx">Property changes on: trunk/LayoutTests/css3/color/box-shadows-expected.html
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<ins>+native
</ins><span class="cx">\ No newline at end of property
</span><a id="svnkeywords"></a>
<div class="addfile"><h4>Added: svn:keywords</h4></div>
<ins>+Date Revision
</ins><span class="cx">\ No newline at end of property
</span><a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<ins>+text/html
</ins><span class="cx">\ No newline at end of property
</span><a id="trunkLayoutTestscss3colorboxshadowshtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/css3/color/box-shadows.html (0 => 208460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/color/box-shadows.html                                (rev 0)
+++ trunk/LayoutTests/css3/color/box-shadows.html        2016-11-09 19:56:17 UTC (rev 208460)
</span><span class="lines">@@ -0,0 +1,33 @@
</span><ins>+&lt;style&gt;
+body {
+    background-image: url('data:image/svg+xml,&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; viewBox=&quot;0 0 10 10&quot;&gt;&lt;g fill=&quot;#ccc&quot;&gt;&lt;rect width=&quot;5&quot; height=&quot;5&quot;/&gt;&lt;rect x=&quot;5&quot; y=&quot;5&quot; width=&quot;5&quot; height=&quot;5&quot;/&gt;&lt;/g&gt;&lt;/svg&gt;');
+    background-size: 100px 100px;
+}
+
+:root {
+    --x: black;
+}
+
+.box {
+    display: inline-block;
+    width: 60px;
+    height: 60px;
+    background-color: #666;
+    box-shadow: 3px 3px 3px var(--x);
+    margin: 10px 10px;
+}
+&lt;/style&gt;
+&lt;p&gt;These two rows should be identical&lt;/p&gt;
+&lt;div class=&quot;box&quot; style=&quot;--x: red;&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;box&quot; style=&quot;--x: rgb(0, 255, 0);&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;box&quot; style=&quot;--x: blue;&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;box&quot; style=&quot;--x: rgba(255, 0, 0, 0.6);&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;box&quot; style=&quot;--x: rgba(0, 255, 0, 0.6);&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;box&quot; style=&quot;--x: rgba(0, 0, 255, 0.6);&quot;&gt;&lt;/div&gt;
+&lt;br&gt;
+&lt;div class=&quot;box&quot; style=&quot;--x: color(srgb 1 0 0);&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;box&quot; style=&quot;--x: color(srgb 0 1 0);&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;box&quot; style=&quot;--x: color(srgb 0 0 1);&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;box&quot; style=&quot;--x: color(srgb 1 0 0 / 0.6);&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;box&quot; style=&quot;--x: color(srgb 0 1 0 / 0.6);&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;box&quot; style=&quot;--x: color(srgb 0 0 1 / 0.6);&quot;&gt;&lt;/div&gt;
</ins><span class="cx">Property changes on: trunk/LayoutTests/css3/color/box-shadows.html
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<ins>+native
</ins><span class="cx">\ No newline at end of property
</span><a id="svnkeywords"></a>
<div class="addfile"><h4>Added: svn:keywords</h4></div>
<ins>+Date Revision
</ins><span class="cx">\ No newline at end of property
</span><a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<ins>+text/html
</ins><span class="cx">\ No newline at end of property
</span><a id="trunkLayoutTestscss3colorcanvasexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/css3/color/canvas-expected.html (0 => 208460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/color/canvas-expected.html                                (rev 0)
+++ trunk/LayoutTests/css3/color/canvas-expected.html        2016-11-09 19:56:17 UTC (rev 208460)
</span><span class="lines">@@ -0,0 +1,55 @@
</span><ins>+&lt;style&gt;
+body {
+    background-image: url('data:image/svg+xml,&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; viewBox=&quot;0 0 10 10&quot;&gt;&lt;g fill=&quot;#ccc&quot;&gt;&lt;rect width=&quot;5&quot; height=&quot;5&quot;/&gt;&lt;rect x=&quot;5&quot; y=&quot;5&quot; width=&quot;5&quot; height=&quot;5&quot;/&gt;&lt;/g&gt;&lt;/svg&gt;');
+    background-size: 100px 100px;
+}
+
+canvas {
+    display: inline-block;
+    width: 100px;
+    height: 100px;
+}
+&lt;/style&gt;
+&lt;script&gt;
+window.addEventListener(&quot;load&quot;, run, false);
+
+function run()
+{
+    var canvases = document.querySelectorAll(&quot;canvas&quot;);
+    Array.from(canvases).forEach(function (canvas) {
+        canvas.width = 100;
+        canvas.height = 100;
+        var ctx = canvas.getContext(&quot;2d&quot;);
+        if (canvas.dataset.type == &quot;fill&quot;) {
+            ctx.fillStyle = canvas.dataset.color;
+            ctx.fillRect(0, 0, 100, 100);
+        } else {
+            ctx.strokeStyle = canvas.dataset.color;
+            ctx.lineWidth = 20;
+            ctx.strokeRect(10, 10, 80, 80);
+        }
+    });
+}
+&lt;/script&gt;
+&lt;p&gt;These two rows should be identical&lt;/p&gt;
+&lt;canvas data-type=&quot;fill&quot; data-color=&quot;red&quot;&gt;&lt;/canvas&gt;
+&lt;canvas data-type=&quot;fill&quot; data-color=&quot;#00ff00&quot;&gt;&lt;/canvas&gt;
+&lt;canvas data-type=&quot;fill&quot; data-color=&quot;blue&quot;&gt;&lt;/canvas&gt;
+&lt;canvas data-type=&quot;fill&quot; data-color=&quot;rgba(255, 0, 0, 0.6)&quot;&gt;&lt;/canvas&gt;
+&lt;br&gt;
+&lt;canvas data-type=&quot;fill&quot; data-color=&quot;red&quot;&gt;&lt;/canvas&gt;
+&lt;canvas data-type=&quot;fill&quot; data-color=&quot;#00ff00&quot;&gt;&lt;/canvas&gt;
+&lt;canvas data-type=&quot;fill&quot; data-color=&quot;blue&quot;&gt;&lt;/canvas&gt;
+&lt;canvas data-type=&quot;fill&quot; data-color=&quot;rgba(255, 0, 0, 0.6)&quot;&gt;&lt;/canvas&gt;
+
+&lt;p&gt;These two rows should be identical&lt;/p&gt;
+&lt;canvas data-type=&quot;stroke&quot; data-color=&quot;red&quot;&gt;&lt;/canvas&gt;
+&lt;canvas data-type=&quot;stroke&quot; data-color=&quot;#00ff00&quot;&gt;&lt;/canvas&gt;
+&lt;canvas data-type=&quot;stroke&quot; data-color=&quot;blue&quot;&gt;&lt;/canvas&gt;
+&lt;canvas data-type=&quot;stroke&quot; data-color=&quot;rgba(255, 0, 0, 0.6)&quot;&gt;&lt;/canvas&gt;
+&lt;br&gt;
+&lt;canvas data-type=&quot;stroke&quot; data-color=&quot;red&quot;&gt;&lt;/canvas&gt;
+&lt;canvas data-type=&quot;stroke&quot; data-color=&quot;#00ff00&quot;&gt;&lt;/canvas&gt;
+&lt;canvas data-type=&quot;stroke&quot; data-color=&quot;blue&quot;&gt;&lt;/canvas&gt;
+&lt;canvas data-type=&quot;stroke&quot; data-color=&quot;rgba(255, 0, 0, 0.6)&quot;&gt;&lt;/canvas&gt;
+
</ins><span class="cx">Property changes on: trunk/LayoutTests/css3/color/canvas-expected.html
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<ins>+native
</ins><span class="cx">\ No newline at end of property
</span><a id="svnkeywords"></a>
<div class="addfile"><h4>Added: svn:keywords</h4></div>
<ins>+Date Revision
</ins><span class="cx">\ No newline at end of property
</span><a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<ins>+text/html
</ins><span class="cx">\ No newline at end of property
</span><a id="trunkLayoutTestscss3colorcanvashtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/css3/color/canvas.html (0 => 208460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/color/canvas.html                                (rev 0)
+++ trunk/LayoutTests/css3/color/canvas.html        2016-11-09 19:56:17 UTC (rev 208460)
</span><span class="lines">@@ -0,0 +1,55 @@
</span><ins>+&lt;style&gt;
+body {
+    background-image: url('data:image/svg+xml,&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; viewBox=&quot;0 0 10 10&quot;&gt;&lt;g fill=&quot;#ccc&quot;&gt;&lt;rect width=&quot;5&quot; height=&quot;5&quot;/&gt;&lt;rect x=&quot;5&quot; y=&quot;5&quot; width=&quot;5&quot; height=&quot;5&quot;/&gt;&lt;/g&gt;&lt;/svg&gt;');
+    background-size: 100px 100px;
+}
+
+canvas {
+    display: inline-block;
+    width: 100px;
+    height: 100px;
+}
+&lt;/style&gt;
+&lt;script&gt;
+window.addEventListener(&quot;load&quot;, run, false);
+
+function run()
+{
+    var canvases = document.querySelectorAll(&quot;canvas&quot;);
+    Array.from(canvases).forEach(function (canvas) {
+        canvas.width = 100;
+        canvas.height = 100;
+        var ctx = canvas.getContext(&quot;2d&quot;);
+        if (canvas.dataset.type == &quot;fill&quot;) {
+            ctx.fillStyle = canvas.dataset.color;
+            ctx.fillRect(0, 0, 100, 100);
+        } else {
+            ctx.strokeStyle = canvas.dataset.color;
+            ctx.lineWidth = 20;
+            ctx.strokeRect(10, 10, 80, 80);
+        }
+    });
+}
+&lt;/script&gt;
+&lt;p&gt;These two rows should be identical&lt;/p&gt;
+&lt;canvas data-type=&quot;fill&quot; data-color=&quot;red&quot;&gt;&lt;/canvas&gt;
+&lt;canvas data-type=&quot;fill&quot; data-color=&quot;#00ff00&quot;&gt;&lt;/canvas&gt;
+&lt;canvas data-type=&quot;fill&quot; data-color=&quot;blue&quot;&gt;&lt;/canvas&gt;
+&lt;canvas data-type=&quot;fill&quot; data-color=&quot;rgba(255, 0, 0, 0.6)&quot;&gt;&lt;/canvas&gt;
+&lt;br&gt;
+&lt;canvas data-type=&quot;fill&quot; data-color=&quot;color(srgb 1 0 0)&quot;&gt;&lt;/canvas&gt;
+&lt;canvas data-type=&quot;fill&quot; data-color=&quot;color(srgb 0 1 0)&quot;&gt;&lt;/canvas&gt;
+&lt;canvas data-type=&quot;fill&quot; data-color=&quot;color(srgb 0 0 1)&quot;&gt;&lt;/canvas&gt;
+&lt;canvas data-type=&quot;fill&quot; data-color=&quot;color(srgb 1 0 0 / 0.6)&quot;&gt;&lt;/canvas&gt;
+
+&lt;p&gt;These two rows should be identical&lt;/p&gt;
+&lt;canvas data-type=&quot;stroke&quot; data-color=&quot;red&quot;&gt;&lt;/canvas&gt;
+&lt;canvas data-type=&quot;stroke&quot; data-color=&quot;#00ff00&quot;&gt;&lt;/canvas&gt;
+&lt;canvas data-type=&quot;stroke&quot; data-color=&quot;blue&quot;&gt;&lt;/canvas&gt;
+&lt;canvas data-type=&quot;stroke&quot; data-color=&quot;rgba(255, 0, 0, 0.6)&quot;&gt;&lt;/canvas&gt;
+&lt;br&gt;
+&lt;canvas data-type=&quot;stroke&quot; data-color=&quot;color(srgb 1 0 0)&quot;&gt;&lt;/canvas&gt;
+&lt;canvas data-type=&quot;stroke&quot; data-color=&quot;color(srgb 0 1 0)&quot;&gt;&lt;/canvas&gt;
+&lt;canvas data-type=&quot;stroke&quot; data-color=&quot;color(srgb 0 0 1)&quot;&gt;&lt;/canvas&gt;
+&lt;canvas data-type=&quot;stroke&quot; data-color=&quot;color(srgb 1 0 0 / 0.6)&quot;&gt;&lt;/canvas&gt;
+
</ins><span class="cx">Property changes on: trunk/LayoutTests/css3/color/canvas.html
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<ins>+native
</ins><span class="cx">\ No newline at end of property
</span><a id="svnkeywords"></a>
<div class="addfile"><h4>Added: svn:keywords</h4></div>
<ins>+Date Revision
</ins><span class="cx">\ No newline at end of property
</span><a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<ins>+text/html
</ins><span class="cx">\ No newline at end of property
</span><a id="trunkLayoutTestscss3colorcompositedsolidbackgroundsexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/css3/color/composited-solid-backgrounds-expected.html (0 => 208460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/color/composited-solid-backgrounds-expected.html                                (rev 0)
+++ trunk/LayoutTests/css3/color/composited-solid-backgrounds-expected.html        2016-11-09 19:56:17 UTC (rev 208460)
</span><span class="lines">@@ -0,0 +1,29 @@
</span><ins>+&lt;style&gt;
+body {
+    background-image: url('data:image/svg+xml,&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; viewBox=&quot;0 0 10 10&quot;&gt;&lt;g fill=&quot;#ccc&quot;&gt;&lt;rect width=&quot;5&quot; height=&quot;5&quot;/&gt;&lt;rect x=&quot;5&quot; y=&quot;5&quot; width=&quot;5&quot; height=&quot;5&quot;/&gt;&lt;/g&gt;&lt;/svg&gt;');
+    background-size: 100px 100px;
+}
+.box {
+    display: inline-block;
+    width: 60px;
+    height: 60px;
+    will-change: transform; // force compositing.
+}
+&lt;/style&gt;
+&lt;p&gt;These two rows should be identical&lt;/p&gt;
+&lt;div class=&quot;box&quot; style=&quot;background-color: red;&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;box&quot; style=&quot;background-color: rgb(0, 255, 0);&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;box&quot; style=&quot;background-color: blue;&quot;&gt;&lt;/div&gt;
+&lt;br&gt;
+&lt;div class=&quot;box&quot; style=&quot;background-color: red;&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;box&quot; style=&quot;background-color: rgb(0, 255, 0);&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;box&quot; style=&quot;background-color: blue;&quot;&gt;&lt;/div&gt;
+
+&lt;p&gt;These two rows should be identical&lt;/p&gt;
+&lt;div class=&quot;box&quot; style=&quot;background-color: rgba(255, 0, 0, 0.6);&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;box&quot; style=&quot;background-color: rgba(0, 255, 0, 0.6);&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;box&quot; style=&quot;background-color: rgba(0, 0, 255, 0.6);&quot;&gt;&lt;/div&gt;
+&lt;br&gt;
+&lt;div class=&quot;box&quot; style=&quot;background-color: rgba(255, 0, 0, 0.6);&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;box&quot; style=&quot;background-color: rgba(0, 255, 0, 0.6);&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;box&quot; style=&quot;background-color: rgba(0, 0, 255, 0.6);&quot;&gt;&lt;/div&gt;
</ins><span class="cx">Property changes on: trunk/LayoutTests/css3/color/composited-solid-backgrounds-expected.html
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<ins>+native
</ins><span class="cx">\ No newline at end of property
</span><a id="svnkeywords"></a>
<div class="addfile"><h4>Added: svn:keywords</h4></div>
<ins>+Date Revision
</ins><span class="cx">\ No newline at end of property
</span><a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<ins>+text/html
</ins><span class="cx">\ No newline at end of property
</span><a id="trunkLayoutTestscss3colorcompositedsolidbackgroundshtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/css3/color/composited-solid-backgrounds.html (0 => 208460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/color/composited-solid-backgrounds.html                                (rev 0)
+++ trunk/LayoutTests/css3/color/composited-solid-backgrounds.html        2016-11-09 19:56:17 UTC (rev 208460)
</span><span class="lines">@@ -0,0 +1,29 @@
</span><ins>+&lt;style&gt;
+body {
+    background-image: url('data:image/svg+xml,&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; viewBox=&quot;0 0 10 10&quot;&gt;&lt;g fill=&quot;#ccc&quot;&gt;&lt;rect width=&quot;5&quot; height=&quot;5&quot;/&gt;&lt;rect x=&quot;5&quot; y=&quot;5&quot; width=&quot;5&quot; height=&quot;5&quot;/&gt;&lt;/g&gt;&lt;/svg&gt;');
+    background-size: 100px 100px;
+}
+.box {
+    display: inline-block;
+    width: 60px;
+    height: 60px;
+    will-change: transform; // force compositing.
+}
+&lt;/style&gt;
+&lt;p&gt;These two rows should be identical&lt;/p&gt;
+&lt;div class=&quot;box&quot; style=&quot;background-color: red;&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;box&quot; style=&quot;background-color: rgb(0, 255, 0);&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;box&quot; style=&quot;background-color: blue;&quot;&gt;&lt;/div&gt;
+&lt;br&gt;
+&lt;div class=&quot;box&quot; style=&quot;background-color: color(srgb 1 0 0);&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;box&quot; style=&quot;background-color: color(srgb 0 1 0);&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;box&quot; style=&quot;background-color: color(srgb 0 0 1);&quot;&gt;&lt;/div&gt;
+
+&lt;p&gt;These two rows should be identical&lt;/p&gt;
+&lt;div class=&quot;box&quot; style=&quot;background-color: rgba(255, 0, 0, 0.6);&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;box&quot; style=&quot;background-color: rgba(0, 255, 0, 0.6);&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;box&quot; style=&quot;background-color: rgba(0, 0, 255, 0.6);&quot;&gt;&lt;/div&gt;
+&lt;br&gt;
+&lt;div class=&quot;box&quot; style=&quot;background-color: color(srgb 1 0 0 / 0.6);&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;box&quot; style=&quot;background-color: color(srgb 0 1 0 / 0.6);&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;box&quot; style=&quot;background-color: color(srgb 0 0 1 / 0.6);&quot;&gt;&lt;/div&gt;
</ins><span class="cx">Property changes on: trunk/LayoutTests/css3/color/composited-solid-backgrounds.html
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<ins>+native
</ins><span class="cx">\ No newline at end of property
</span><a id="svnkeywords"></a>
<div class="addfile"><h4>Added: svn:keywords</h4></div>
<ins>+Date Revision
</ins><span class="cx">\ No newline at end of property
</span><a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<ins>+text/html
</ins><span class="cx">\ No newline at end of property
</span><a id="trunkLayoutTestscss3colortextexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/css3/color/text-expected.html (0 => 208460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/color/text-expected.html                                (rev 0)
+++ trunk/LayoutTests/css3/color/text-expected.html        2016-11-09 19:56:17 UTC (rev 208460)
</span><span class="lines">@@ -0,0 +1,38 @@
</span><ins>+&lt;style&gt;
+body {
+    background-image: url('data:image/svg+xml,&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; viewBox=&quot;0 0 10 10&quot;&gt;&lt;g fill=&quot;#ccc&quot;&gt;&lt;rect width=&quot;5&quot; height=&quot;5&quot;/&gt;&lt;rect x=&quot;5&quot; y=&quot;5&quot; width=&quot;5&quot; height=&quot;5&quot;/&gt;&lt;/g&gt;&lt;/svg&gt;');
+    background-size: 100px 100px;
+}
+
+p {
+    margin: 10px 0;
+    padding: 0;
+}
+
+.underlined {
+    text-decoration: underline;
+}
+&lt;/style&gt;
+
+&lt;p&gt;This is normal text content.&lt;/p&gt;
+
+&lt;p style=&quot;color: red;&quot;&gt;This is colored text content with old syntax.&lt;/p&gt;
+&lt;p style=&quot;color: red;&quot;&gt;This is colored text content with old syntax &lt;span style=&quot;color: blue;&quot;&gt;and an inline color&lt;/span&gt;.&lt;/p&gt;
+
+&lt;p style=&quot;color: red;&quot;&gt;This is colored text content with color() syntax.&lt;/p&gt;
+&lt;p style=&quot;color: red;&quot;&gt;This is colored text content with color() syntax &lt;span style=&quot;color: blue;&quot;&gt;and an inline color&lt;/span&gt;.&lt;/p&gt;
+
+&lt;p class=&quot;underlined&quot; style=&quot;color: red;&quot;&gt;This is underlined text content with old syntax.&lt;/p&gt;
+&lt;p class=&quot;underlined&quot; style=&quot;color: red;&quot;&gt;This is colored text content with old syntax &lt;span style=&quot;color: blue;&quot;&gt;and an inline color&lt;/span&gt;.&lt;/p&gt;
+
+&lt;p class=&quot;underlined&quot; style=&quot;color: red;&quot;&gt;This is underlined text content with color() syntax.&lt;/p&gt;
+&lt;p class=&quot;underlined&quot; style=&quot;color: red;&quot;&gt;This is colored text content with color() syntax &lt;span style=&quot;color: blue;&quot;&gt;and an inline color&lt;/span&gt;.&lt;/p&gt;
+
+&lt;p class=&quot;underlined&quot; style=&quot;color: red; -webkit-text-decoration-style: double;&quot;&gt;This is underlined text content with old syntax and a different underline style.&lt;/p&gt;
+&lt;p class=&quot;underlined&quot; style=&quot;color: red; -webkit-text-decoration-style: wavy;&quot;&gt;This is underlined text content with old syntax and a different underline style.&lt;/p&gt;
+&lt;p class=&quot;underlined&quot; style=&quot;color: red; -webkit-text-decoration-style: dotted;&quot;&gt;This is underlined text content with old syntax and a different underline style.&lt;/p&gt;
+
+&lt;p class=&quot;underlined&quot; style=&quot;color: red; -webkit-text-decoration-style: double;&quot;&gt;This is underlined text content with color() syntax and a different underline style.&lt;/p&gt;
+&lt;p class=&quot;underlined&quot; style=&quot;color: red; -webkit-text-decoration-style: wavy;&quot;&gt;This is underlined text content with color() syntax and a different underline style.&lt;/p&gt;
+&lt;p class=&quot;underlined&quot; style=&quot;color: red; -webkit-text-decoration-style: dotted;&quot;&gt;This is underlined text content with color() syntax and a different underline style.&lt;/p&gt;
+
</ins><span class="cx">Property changes on: trunk/LayoutTests/css3/color/text-expected.html
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<ins>+native
</ins><span class="cx">\ No newline at end of property
</span><a id="svnkeywords"></a>
<div class="addfile"><h4>Added: svn:keywords</h4></div>
<ins>+Date Revision
</ins><span class="cx">\ No newline at end of property
</span><a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<ins>+text/html
</ins><span class="cx">\ No newline at end of property
</span><a id="trunkLayoutTestscss3colortexthtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/css3/color/text.html (0 => 208460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/color/text.html                                (rev 0)
+++ trunk/LayoutTests/css3/color/text.html        2016-11-09 19:56:17 UTC (rev 208460)
</span><span class="lines">@@ -0,0 +1,38 @@
</span><ins>+&lt;style&gt;
+body {
+    background-image: url('data:image/svg+xml,&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; viewBox=&quot;0 0 10 10&quot;&gt;&lt;g fill=&quot;#ccc&quot;&gt;&lt;rect width=&quot;5&quot; height=&quot;5&quot;/&gt;&lt;rect x=&quot;5&quot; y=&quot;5&quot; width=&quot;5&quot; height=&quot;5&quot;/&gt;&lt;/g&gt;&lt;/svg&gt;');
+    background-size: 100px 100px;
+}
+
+p {
+    margin: 10px 0;
+    padding: 0;
+}
+
+.underlined {
+    text-decoration: underline;
+}
+&lt;/style&gt;
+
+&lt;p&gt;This is normal text content.&lt;/p&gt;
+
+&lt;p style=&quot;color: red;&quot;&gt;This is colored text content with old syntax.&lt;/p&gt;
+&lt;p style=&quot;color: red;&quot;&gt;This is colored text content with old syntax &lt;span style=&quot;color: blue;&quot;&gt;and an inline color&lt;/span&gt;.&lt;/p&gt;
+
+&lt;p style=&quot;color: color(srgb 1 0 0);&quot;&gt;This is colored text content with color() syntax.&lt;/p&gt;
+&lt;p style=&quot;color: color(srgb 1 0 0);&quot;&gt;This is colored text content with color() syntax &lt;span style=&quot;color: color(srgb 0 0 1);&quot;&gt;and an inline color&lt;/span&gt;.&lt;/p&gt;
+
+&lt;p class=&quot;underlined&quot; style=&quot;color: red;&quot;&gt;This is underlined text content with old syntax.&lt;/p&gt;
+&lt;p class=&quot;underlined&quot; style=&quot;color: red;&quot;&gt;This is colored text content with old syntax &lt;span style=&quot;color: blue;&quot;&gt;and an inline color&lt;/span&gt;.&lt;/p&gt;
+
+&lt;p class=&quot;underlined&quot; style=&quot;color: color(srgb 1 0 0);&quot;&gt;This is underlined text content with color() syntax.&lt;/p&gt;
+&lt;p class=&quot;underlined&quot; style=&quot;color: color(srgb 1 0 0);&quot;&gt;This is colored text content with color() syntax &lt;span style=&quot;color: color(srgb 0 0 1);&quot;&gt;and an inline color&lt;/span&gt;.&lt;/p&gt;
+
+&lt;p class=&quot;underlined&quot; style=&quot;color: red; -webkit-text-decoration-style: double;&quot;&gt;This is underlined text content with old syntax and a different underline style.&lt;/p&gt;
+&lt;p class=&quot;underlined&quot; style=&quot;color: red; -webkit-text-decoration-style: wavy;&quot;&gt;This is underlined text content with old syntax and a different underline style.&lt;/p&gt;
+&lt;p class=&quot;underlined&quot; style=&quot;color: red; -webkit-text-decoration-style: dotted;&quot;&gt;This is underlined text content with old syntax and a different underline style.&lt;/p&gt;
+
+&lt;p class=&quot;underlined&quot; style=&quot;color: color(srgb 1 0 0); -webkit-text-decoration-style: double;&quot;&gt;This is underlined text content with color() syntax and a different underline style.&lt;/p&gt;
+&lt;p class=&quot;underlined&quot; style=&quot;color: color(srgb 1 0 0); -webkit-text-decoration-style: wavy;&quot;&gt;This is underlined text content with color() syntax and a different underline style.&lt;/p&gt;
+&lt;p class=&quot;underlined&quot; style=&quot;color: color(srgb 1 0 0); -webkit-text-decoration-style: dotted;&quot;&gt;This is underlined text content with color() syntax and a different underline style.&lt;/p&gt;
+
</ins><span class="cx">Property changes on: trunk/LayoutTests/css3/color/text.html
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<ins>+native
</ins><span class="cx">\ No newline at end of property
</span><a id="svnkeywords"></a>
<div class="addfile"><h4>Added: svn:keywords</h4></div>
<ins>+Date Revision
</ins><span class="cx">\ No newline at end of property
</span><a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<ins>+text/html
</ins><span class="cx">\ No newline at end of property
</span><a id="trunkLayoutTestseditingmacattributedstringanchorelementexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/editing/mac/attributed-string/anchor-element-expected.txt (208459 => 208460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/editing/mac/attributed-string/anchor-element-expected.txt        2016-11-09 19:54:25 UTC (rev 208459)
+++ trunk/LayoutTests/editing/mac/attributed-string/anchor-element-expected.txt        2016-11-09 19:56:17 UTC (rev 208460)
</span><span class="lines">@@ -24,11 +24,11 @@
</span><span class="cx">     TighteningForTruncation: YES
</span><span class="cx">     HeaderLevel: 0
</span><span class="cx"> [webkit.org]
</span><del>-    NSColor: #0000ee (NSDeviceRGBColorSpace)
</del><ins>+    NSColor: rgba(255, 2295, 1530, 6) (IEC6)
</ins><span class="cx">     NSFont: Times-Roman 16.00 pt.
</span><span class="cx">     NSKern: 0pt
</span><span class="cx">     NSLink: https://webkit.org/
</span><del>-    NSStrokeColor: NSDeviceRGBColorSpace 0 0 0.933333 1
</del><ins>+    NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0.933333 1
</ins><span class="cx">     NSStrokeWidth: 0
</span><span class="cx">     NSUnderline: true
</span><span class="cx"> [ ]
</span></span></pre></div>
<a id="trunkLayoutTestseditingmacattributedstringbasicexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/editing/mac/attributed-string/basic-expected.txt (208459 => 208460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/editing/mac/attributed-string/basic-expected.txt        2016-11-09 19:54:25 UTC (rev 208459)
+++ trunk/LayoutTests/editing/mac/attributed-string/basic-expected.txt        2016-11-09 19:56:17 UTC (rev 208460)
</span><span class="lines">@@ -31,7 +31,7 @@
</span><span class="cx">     NSStrokeColor: NSDeviceRGBColorSpace 0 0 0 1
</span><span class="cx">     NSStrokeWidth: 0
</span><span class="cx"> [world]
</span><del>-    NSBackgroundColor: #0000ff (NSDeviceRGBColorSpace)
</del><ins>+    NSBackgroundColor: rgba(255, 2295, 1530, 6) (IEC6)
</ins><span class="cx">     NSColor: #ffffff (NSDeviceRGBColorSpace)
</span><span class="cx">     NSFont: Times-Bold 16.00 pt.
</span><span class="cx">     NSKern: 0pt
</span><span class="lines">@@ -44,11 +44,11 @@
</span><span class="cx">     NSStrokeColor: NSDeviceRGBColorSpace 0 0 0 1
</span><span class="cx">     NSStrokeWidth: 0
</span><span class="cx"> [WebKit]
</span><del>-    NSColor: #0000ee (NSDeviceRGBColorSpace)
</del><ins>+    NSColor: rgba(255, 2295, 1530, 6) (IEC6)
</ins><span class="cx">     NSFont: Times-Roman 16.00 pt.
</span><span class="cx">     NSKern: 0pt
</span><span class="cx">     NSLink: https://webkit.org/
</span><del>-    NSStrokeColor: NSDeviceRGBColorSpace 0 0 0.933333 1
</del><ins>+    NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0.933333 1
</ins><span class="cx">     NSStrokeWidth: 0
</span><span class="cx">     NSUnderline: true
</span><span class="cx"> [.\n]
</span><span class="lines">@@ -58,7 +58,7 @@
</span><span class="cx">     NSStrokeColor: NSDeviceRGBColorSpace 0 0 0 1
</span><span class="cx">     NSStrokeWidth: 0
</span><span class="cx"> [this is a ]
</span><del>-    NSBackgroundColor: #ffff00 (NSDeviceRGBColorSpace)
</del><ins>+    NSBackgroundColor: rgba(255, 2295, 1530, 6) (IEC6)
</ins><span class="cx">     NSColor: #000000 (NSDeviceRGBColorSpace)
</span><span class="cx">     NSFont: Times-Roman 16.00 pt.
</span><span class="cx">     NSKern: 0pt
</span><span class="lines">@@ -65,7 +65,7 @@
</span><span class="cx">     NSStrokeColor: NSDeviceRGBColorSpace 0 0 0 1
</span><span class="cx">     NSStrokeWidth: 0
</span><span class="cx"> [t]
</span><del>-    NSBackgroundColor: #ffff00 (NSDeviceRGBColorSpace)
</del><ins>+    NSBackgroundColor: rgba(255, 2295, 1530, 6) (IEC6)
</ins><span class="cx">     NSColor: #000000 (NSDeviceRGBColorSpace)
</span><span class="cx">     NSFont: Times-Italic 16.00 pt.
</span><span class="cx">     NSKern: 0pt
</span><span class="lines">@@ -73,7 +73,7 @@
</span><span class="cx">     NSStrokeWidth: 0
</span><span class="cx">     NSUnderline: true
</span><span class="cx"> [est]
</span><del>-    NSBackgroundColor: #ffff00 (NSDeviceRGBColorSpace)
</del><ins>+    NSBackgroundColor: rgba(255, 2295, 1530, 6) (IEC6)
</ins><span class="cx">     NSColor: #000000 (NSDeviceRGBColorSpace)
</span><span class="cx">     NSFont: Times-Roman 16.00 pt.
</span><span class="cx">     NSKern: 0pt
</span><span class="lines">@@ -81,7 +81,7 @@
</span><span class="cx">     NSStrokeWidth: 0
</span><span class="cx">     NSUnderline: true
</span><span class="cx"> [ of ]
</span><del>-    NSBackgroundColor: #ffff00 (NSDeviceRGBColorSpace)
</del><ins>+    NSBackgroundColor: rgba(255, 2295, 1530, 6) (IEC6)
</ins><span class="cx">     NSColor: #000000 (NSDeviceRGBColorSpace)
</span><span class="cx">     NSFont: Times-Roman 16.00 pt.
</span><span class="cx">     NSKern: 0pt
</span><span class="lines">@@ -88,7 +88,7 @@
</span><span class="cx">     NSStrokeColor: NSDeviceRGBColorSpace 0 0 0 1
</span><span class="cx">     NSStrokeWidth: 0
</span><span class="cx"> [attributed]
</span><del>-    NSBackgroundColor: #ffff00 (NSDeviceRGBColorSpace)
</del><ins>+    NSBackgroundColor: rgba(255, 2295, 1530, 6) (IEC6)
</ins><span class="cx">     NSColor: #000000 (NSDeviceRGBColorSpace)
</span><span class="cx">     NSFont: Times-Italic 16.00 pt.
</span><span class="cx">     NSKern: 0pt
</span><span class="lines">@@ -95,7 +95,7 @@
</span><span class="cx">     NSStrokeColor: NSDeviceRGBColorSpace 0 0 0 1
</span><span class="cx">     NSStrokeWidth: 0
</span><span class="cx"> [ string.]
</span><del>-    NSBackgroundColor: #ffff00 (NSDeviceRGBColorSpace)
</del><ins>+    NSBackgroundColor: rgba(255, 2295, 1530, 6) (IEC6)
</ins><span class="cx">     NSColor: #000000 (NSDeviceRGBColorSpace)
</span><span class="cx">     NSFont: Times-Roman 16.00 pt.
</span><span class="cx">     NSKern: 0pt
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacyosemiteeditingmacattributedstringanchorelementexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-yosemite/editing/mac/attributed-string/anchor-element-expected.txt (208459 => 208460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-yosemite/editing/mac/attributed-string/anchor-element-expected.txt        2016-11-09 19:54:25 UTC (rev 208459)
+++ trunk/LayoutTests/platform/mac-yosemite/editing/mac/attributed-string/anchor-element-expected.txt        2016-11-09 19:56:17 UTC (rev 208460)
</span><span class="lines">@@ -22,11 +22,11 @@
</span><span class="cx">     TighteningFactor: 0.05
</span><span class="cx">     HeaderLevel: 0
</span><span class="cx"> [webkit.org]
</span><del>-    NSColor: #0000ee (NSDeviceRGBColorSpace)
</del><ins>+    NSColor: rgba(255, 2295, 1530, 6) (IEC6)
</ins><span class="cx">     NSFont: Times-Roman 16.00 pt.
</span><span class="cx">     NSKern: 0pt
</span><span class="cx">     NSLink: https://webkit.org/
</span><del>-    NSStrokeColor: NSDeviceRGBColorSpace 0 0 0.933333 1
</del><ins>+    NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0.933333 1
</ins><span class="cx">     NSStrokeWidth: 0
</span><span class="cx">     NSUnderline: true
</span><span class="cx"> [ ]
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacyosemiteeditingmacattributedstringbasicexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-yosemite/editing/mac/attributed-string/basic-expected.txt (208459 => 208460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-yosemite/editing/mac/attributed-string/basic-expected.txt        2016-11-09 19:54:25 UTC (rev 208459)
+++ trunk/LayoutTests/platform/mac-yosemite/editing/mac/attributed-string/basic-expected.txt        2016-11-09 19:56:17 UTC (rev 208460)
</span><span class="lines">@@ -29,7 +29,7 @@
</span><span class="cx">     NSStrokeColor: NSDeviceRGBColorSpace 0 0 0 1
</span><span class="cx">     NSStrokeWidth: 0
</span><span class="cx"> [world]
</span><del>-    NSBackgroundColor: #0000ff (NSDeviceRGBColorSpace)
</del><ins>+    NSBackgroundColor: rgba(255, 2295, 1530, 6) (IEC6)
</ins><span class="cx">     NSColor: #ffffff (NSDeviceRGBColorSpace)
</span><span class="cx">     NSFont: Times-Bold 16.00 pt.
</span><span class="cx">     NSKern: 0pt
</span><span class="lines">@@ -42,11 +42,11 @@
</span><span class="cx">     NSStrokeColor: NSDeviceRGBColorSpace 0 0 0 1
</span><span class="cx">     NSStrokeWidth: 0
</span><span class="cx"> [WebKit]
</span><del>-    NSColor: #0000ee (NSDeviceRGBColorSpace)
</del><ins>+    NSColor: rgba(255, 2295, 1530, 6) (IEC6)
</ins><span class="cx">     NSFont: Times-Roman 16.00 pt.
</span><span class="cx">     NSKern: 0pt
</span><span class="cx">     NSLink: https://webkit.org/
</span><del>-    NSStrokeColor: NSDeviceRGBColorSpace 0 0 0.933333 1
</del><ins>+    NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0.933333 1
</ins><span class="cx">     NSStrokeWidth: 0
</span><span class="cx">     NSUnderline: true
</span><span class="cx"> [.\n]
</span><span class="lines">@@ -56,7 +56,7 @@
</span><span class="cx">     NSStrokeColor: NSDeviceRGBColorSpace 0 0 0 1
</span><span class="cx">     NSStrokeWidth: 0
</span><span class="cx"> [this is a ]
</span><del>-    NSBackgroundColor: #ffff00 (NSDeviceRGBColorSpace)
</del><ins>+    NSBackgroundColor: rgba(255, 2295, 1530, 6) (IEC6)
</ins><span class="cx">     NSColor: #000000 (NSDeviceRGBColorSpace)
</span><span class="cx">     NSFont: Times-Roman 16.00 pt.
</span><span class="cx">     NSKern: 0pt
</span><span class="lines">@@ -63,7 +63,7 @@
</span><span class="cx">     NSStrokeColor: NSDeviceRGBColorSpace 0 0 0 1
</span><span class="cx">     NSStrokeWidth: 0
</span><span class="cx"> [t]
</span><del>-    NSBackgroundColor: #ffff00 (NSDeviceRGBColorSpace)
</del><ins>+    NSBackgroundColor: rgba(255, 2295, 1530, 6) (IEC6)
</ins><span class="cx">     NSColor: #000000 (NSDeviceRGBColorSpace)
</span><span class="cx">     NSFont: Times-Italic 16.00 pt.
</span><span class="cx">     NSKern: 0pt
</span><span class="lines">@@ -71,7 +71,7 @@
</span><span class="cx">     NSStrokeWidth: 0
</span><span class="cx">     NSUnderline: true
</span><span class="cx"> [est]
</span><del>-    NSBackgroundColor: #ffff00 (NSDeviceRGBColorSpace)
</del><ins>+    NSBackgroundColor: rgba(255, 2295, 1530, 6) (IEC6)
</ins><span class="cx">     NSColor: #000000 (NSDeviceRGBColorSpace)
</span><span class="cx">     NSFont: Times-Roman 16.00 pt.
</span><span class="cx">     NSKern: 0pt
</span><span class="lines">@@ -79,7 +79,7 @@
</span><span class="cx">     NSStrokeWidth: 0
</span><span class="cx">     NSUnderline: true
</span><span class="cx"> [ of ]
</span><del>-    NSBackgroundColor: #ffff00 (NSDeviceRGBColorSpace)
</del><ins>+    NSBackgroundColor: rgba(255, 2295, 1530, 6) (IEC6)
</ins><span class="cx">     NSColor: #000000 (NSDeviceRGBColorSpace)
</span><span class="cx">     NSFont: Times-Roman 16.00 pt.
</span><span class="cx">     NSKern: 0pt
</span><span class="lines">@@ -86,7 +86,7 @@
</span><span class="cx">     NSStrokeColor: NSDeviceRGBColorSpace 0 0 0 1
</span><span class="cx">     NSStrokeWidth: 0
</span><span class="cx"> [attributed]
</span><del>-    NSBackgroundColor: #ffff00 (NSDeviceRGBColorSpace)
</del><ins>+    NSBackgroundColor: rgba(255, 2295, 1530, 6) (IEC6)
</ins><span class="cx">     NSColor: #000000 (NSDeviceRGBColorSpace)
</span><span class="cx">     NSFont: Times-Italic 16.00 pt.
</span><span class="cx">     NSKern: 0pt
</span><span class="lines">@@ -93,7 +93,7 @@
</span><span class="cx">     NSStrokeColor: NSDeviceRGBColorSpace 0 0 0 1
</span><span class="cx">     NSStrokeWidth: 0
</span><span class="cx"> [ string.]
</span><del>-    NSBackgroundColor: #ffff00 (NSDeviceRGBColorSpace)
</del><ins>+    NSBackgroundColor: rgba(255, 2295, 1530, 6) (IEC6)
</ins><span class="cx">     NSColor: #000000 (NSDeviceRGBColorSpace)
</span><span class="cx">     NSFont: Times-Roman 16.00 pt.
</span><span class="cx">     NSKern: 0pt
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (208459 => 208460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-11-09 19:54:25 UTC (rev 208459)
+++ trunk/Source/WebCore/ChangeLog        2016-11-09 19:56:17 UTC (rev 208460)
</span><span class="lines">@@ -1,3 +1,162 @@
</span><ins>+2016-11-08  Dean Jackson  &lt;dino@apple.com&gt;
+
+        Rendering support for ExtendedColors
+        https://bugs.webkit.org/show_bug.cgi?id=164443
+        &lt;rdar://problems/29123243&gt;
+
+        Reviewed by Simon Fraser and Darin Adler.
+
+        Add support for rendering the new color() syntax, which
+        ends up as an ExtendedColor.
+
+        In order to make rendering code a little more readable, I
+        changed Color::hasAlpha to Color::isOpaque (since an alpha
+        of 100% is still an alpha), and added a Color::isVisible
+        helper (the color isn't completely transparent). These new
+        helpers support ExtendedColor forms.
+
+        Support for painting gradients and blending between colors
+        is still to come. I also added some FIXME comments
+        to show other places that don't handle ExtendedColors yet.
+
+        Tests: css3/color/backgrounds-and-borders.html
+               css3/color/box-shadows.html
+               css3/color/canvas.html
+               css3/color/composited-solid-backgrounds.html
+               css3/color/text.html
+
+        * css/CSSGradientValue.cpp: Add some notes that this is broken.
+        (WebCore::interpolate):
+        (WebCore::CSSGradientValue::knownToBeOpaque):
+
+        * editing/EditingStyle.cpp: Use new Color helpers.
+        (WebCore::isTransparentColorValue):
+
+        * editing/mac/EditorMac.mm: Use new Color helpers.
+        (WebCore::Editor::fontAttributesForSelectionStart):
+
+        * html/ColorInputType.cpp: No need to use the Color class at all here.
+        (WebCore::isValidSimpleColorString): Renamed from isValidColorString.
+        (WebCore::ColorInputType::sanitizeValue):
+        (WebCore::ColorInputType::typeMismatchFor):
+        (WebCore::isValidColorString): Deleted.
+
+        * html/canvas/CanvasRenderingContext2D.cpp: New helpers.
+        (WebCore::CanvasRenderingContext2D::shouldDrawShadows):
+        (WebCore::CanvasRenderingContext2D::didDraw):
+
+        * page/FrameView.cpp: Ditto.
+        (WebCore::FrameView::recalculateScrollbarOverlayStyle):
+        (WebCore::FrameView::hasOpaqueBackground):
+        (WebCore::FrameView::setBaseBackgroundColor):
+
+        * platform/graphics/Color.cpp:
+        (WebCore::differenceSquared): Support ExtendedColor, but also
+        add a note to indicate that this method and its call sites
+        should use floats.
+        (WebCore::Color::serialized): New helper.
+        (WebCore::Color::cssText): Ditto.
+        (WebCore::Color::blend): Ditto.
+        (WebCore::Color::blendWithWhite):
+        (WebCore::Color::colorWithAlphaMultipliedBy): Implementation of new function.
+        (WebCore::Color::colorWithAlpha): Ditto.
+        (WebCore::Color::opaqueColor): New method to return an opaque version of the given color.
+        (WebCore::blend):
+        * platform/graphics/Color.h:
+        (WebCore::Color::isOpaque): New helper that is !hasAlpha().
+        (WebCore::Color::isVisible): New helper.
+        (WebCore::Color::alphaAsFloat): Gets the alpha value as a float. This replaces
+        a bunch of places that were calculating it manually each time. Meanwhile, we
+        might consider always exposing the primaries as floats... or at least
+        have that option.
+        (WebCore::isBlackColor): New helper - it was used in a couple of places.
+        (WebCore::isWhiteColor): Ditto.
+        (WebCore::Color::hasAlpha): Deleted.
+
+        * platform/graphics/Gradient.cpp: Add FIXME.
+        (WebCore::Gradient::addColorStop):
+        * platform/graphics/Gradient.h:
+
+        * platform/graphics/GraphicsContext.cpp: Use new helpers.
+        (WebCore::GraphicsContext::computeLineBoundsAndAntialiasingModeForText):
+        * platform/graphics/GraphicsContext.h:
+        (WebCore::GraphicsContext::hasVisibleShadow):
+
+        * platform/graphics/Image.cpp: Ditto.
+        (WebCore::Image::fillWithSolidColor):
+
+        * platform/graphics/ShadowBlur.cpp: Ditto.
+        (WebCore::ShadowBlur::updateShadowBlurValues):
+
+        * platform/graphics/ca/GraphicsLayerCA.cpp: Ditto.
+        (WebCore::GraphicsLayerCA::setContentsToSolidColor):
+
+        * platform/graphics/cg/GradientCG.cpp:
+        (WebCore::Gradient::platformGradient): Add a FIXME to note that we can
+        add ExtendedColor support simply by using CGColors, rather than fetching
+        the components ourselves.
+
+        * platform/graphics/cg/GraphicsContextCG.cpp: New helpers.
+        (WebCore::calculateDrawingMode):
+
+        * platform/graphics/cocoa/FontCascadeCocoa.mm: New helpers.
+        (WebCore::FontCascade::drawGlyphs):
+
+        * platform/graphics/mac/ColorMac.mm: Use the new helpers and Color::hash().
+        (WebCore::nsColor):
+
+        * platform/graphics/texmap/TextureMapperGL.cpp: New helpers.
+        (WebCore::TextureMapperGL::drawBorder):
+
+        * rendering/BorderEdge.cpp: Ditto.
+        (WebCore::BorderEdge::obscuresBackgroundEdge):
+        (WebCore::BorderEdge::obscuresBackground):
+
+        * rendering/RenderBox.cpp: Ditto.
+        (WebCore::RenderBox::getBackgroundPaintedExtent):
+        (WebCore::RenderBox::backgroundIsKnownToBeOpaqueInRect):
+        (WebCore::RenderBox::backgroundHasOpaqueTopLayer):
+
+        * rendering/RenderBoxModelObject.cpp: Ditto.
+        (WebCore::RenderBoxModelObject::paintFillLayerExtended):
+        (WebCore::colorNeedsAntiAliasAtCorner):
+        (WebCore::willBeOverdrawn):
+        (WebCore::RenderBoxModelObject::paintTranslucentBorderSides):
+        (WebCore::RenderBoxModelObject::paintBorder):
+        (WebCore::RenderBoxModelObject::boxShadowShouldBeAppliedToBackground):
+        (WebCore::RenderBoxModelObject::paintBoxShadow):
+        * rendering/RenderElement.cpp:
+        (WebCore::RenderElement::paintOutline):
+        * rendering/RenderInline.cpp:
+        (WebCore::RenderInline::paintOutline):
+        * rendering/RenderLayerBacking.cpp:
+        (WebCore::canCreateTiledImage):
+        * rendering/RenderLayerCompositor.cpp:
+        (WebCore::RenderLayerCompositor::viewHasTransparentBackground):
+        * rendering/RenderMenuList.cpp:
+        (RenderMenuList::getItemBackgroundColor):
+        * rendering/RenderTheme.cpp:
+        (WebCore::RenderTheme::disabledTextColor):
+        * rendering/RenderView.cpp:
+        (WebCore::RenderView::paintBoxDecorations):
+        * rendering/TextDecorationPainter.cpp:
+        (WebCore::TextDecorationPainter::paintTextDecoration):
+        * rendering/TextPainter.cpp:
+        (WebCore::TextPainter::paintTextWithShadows):
+        * rendering/style/BorderValue.h:
+        (WebCore::BorderValue::isTransparent):
+        * rendering/style/RenderStyle.cpp:
+        (WebCore::RenderStyle::visitedDependentColor):
+        * rendering/style/RenderStyle.h:
+        (WebCore::RenderStyle::hasBackground):
+        * rendering/svg/RenderSVGResource.cpp:
+        (WebCore::requestPaintingResource):
+        * rendering/svg/SVGInlineTextBox.cpp:
+        (WebCore::SVGInlineTextBox::paintSelectionBackground):
+
+        * svg/SVGAnimatedColor.cpp: Add a FIXME to note this is broken.
+        (WebCore::SVGAnimatedColorAnimator::calculateAnimatedValue):
+
</ins><span class="cx"> 2016-11-09  Antoine Quint  &lt;graouts@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Modern Media Controls] UI Library: StatusLabel
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSGradientValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSGradientValue.cpp (208459 => 208460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSGradientValue.cpp        2016-11-09 19:54:25 UTC (rev 208459)
+++ trunk/Source/WebCore/css/CSSGradientValue.cpp        2016-11-09 19:56:17 UTC (rev 208460)
</span><span class="lines">@@ -143,6 +143,7 @@
</span><span class="cx"> 
</span><span class="cx"> static inline Color interpolate(const Color&amp; color1, const Color&amp; color2, float position)
</span><span class="cx"> {
</span><ins>+    // FIXME: ExtendedColor - Doesn't work with extended colors, and really should be a helper in Color.h, not here.
</ins><span class="cx">     int red = interpolate(color1.red(), color2.red(), position);
</span><span class="cx">     int green = interpolate(color1.green(), color2.green(), position);
</span><span class="cx">     int blue = interpolate(color1.blue(), color2.blue(), position);
</span><span class="lines">@@ -581,7 +582,7 @@
</span><span class="cx"> bool CSSGradientValue::knownToBeOpaque(const RenderElement*) const
</span><span class="cx"> {
</span><span class="cx">     for (size_t i = 0; i &lt; m_stops.size(); ++i) {
</span><del>-        if (m_stops[i].m_resolvedColor.hasAlpha())
</del><ins>+        if (!m_stops[i].m_resolvedColor.isOpaque())
</ins><span class="cx">             return false;
</span><span class="cx">     }
</span><span class="cx">     return true;
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingEditingStylecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/EditingStyle.cpp (208459 => 208460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/EditingStyle.cpp        2016-11-09 19:54:25 UTC (rev 208459)
+++ trunk/Source/WebCore/editing/EditingStyle.cpp        2016-11-09 19:56:17 UTC (rev 208460)
</span><span class="lines">@@ -1837,7 +1837,7 @@
</span><span class="cx">         return false;
</span><span class="cx">     auto&amp; primitiveValue = downcast&lt;CSSPrimitiveValue&gt;(*value);
</span><span class="cx">     if (primitiveValue.isRGBColor())
</span><del>-        return !primitiveValue.color().alpha();
</del><ins>+        return !primitiveValue.color().isVisible();
</ins><span class="cx">     return primitiveValue.valueID() == CSSValueTransparent;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingmacEditorMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/mac/EditorMac.mm (208459 => 208460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/mac/EditorMac.mm        2016-11-09 19:54:25 UTC (rev 208459)
+++ trunk/Source/WebCore/editing/mac/EditorMac.mm        2016-11-09 19:56:17 UTC (rev 208460)
</span><span class="lines">@@ -155,13 +155,13 @@
</span><span class="cx"> 
</span><span class="cx">     NSMutableDictionary* result = [NSMutableDictionary dictionary];
</span><span class="cx"> 
</span><del>-    if (style-&gt;visitedDependentColor(CSSPropertyBackgroundColor).isValid() &amp;&amp; style-&gt;visitedDependentColor(CSSPropertyBackgroundColor).alpha() != 0)
</del><ins>+    if (style-&gt;visitedDependentColor(CSSPropertyBackgroundColor).isVisible())
</ins><span class="cx">         [result setObject:nsColor(style-&gt;visitedDependentColor(CSSPropertyBackgroundColor)) forKey:NSBackgroundColorAttributeName];
</span><span class="cx"> 
</span><span class="cx">     if (auto ctFont = style-&gt;fontCascade().primaryFont().getCTFont())
</span><span class="cx">         [result setObject:toNSFont(ctFont) forKey:NSFontAttributeName];
</span><span class="cx"> 
</span><del>-    if (style-&gt;visitedDependentColor(CSSPropertyColor).isValid() &amp;&amp; style-&gt;visitedDependentColor(CSSPropertyColor) != Color::black)
</del><ins>+    if (style-&gt;visitedDependentColor(CSSPropertyColor).isValid() &amp;&amp; !Color::isBlackColor(style-&gt;visitedDependentColor(CSSPropertyColor)))
</ins><span class="cx">         [result setObject:nsColor(style-&gt;visitedDependentColor(CSSPropertyColor)) forKey:NSForegroundColorAttributeName];
</span><span class="cx"> 
</span><span class="cx">     const ShadowData* shadow = style-&gt;textShadow();
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlColorInputTypecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/ColorInputType.cpp (208459 => 208460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/ColorInputType.cpp        2016-11-09 19:54:25 UTC (rev 208459)
+++ trunk/Source/WebCore/html/ColorInputType.cpp        2016-11-09 19:56:17 UTC (rev 208460)
</span><span class="lines">@@ -54,18 +54,30 @@
</span><span class="cx"> 
</span><span class="cx"> using namespace HTMLNames;
</span><span class="cx"> 
</span><del>-static bool isValidColorString(const String&amp; value)
</del><ins>+static bool isValidSimpleColorString(const String&amp; value)
</ins><span class="cx"> {
</span><ins>+    // See https://html.spec.whatwg.org/multipage/infrastructure.html#valid-simple-colour
+
</ins><span class="cx">     if (value.isEmpty())
</span><span class="cx">         return false;
</span><span class="cx">     if (value[0] != '#')
</span><span class="cx">         return false;
</span><del>-
-    // We don't accept #rgb and #aarrggbb formats.
</del><span class="cx">     if (value.length() != 7)
</span><span class="cx">         return false;
</span><del>-    Color color(value);
-    return color.isValid() &amp;&amp; !color.hasAlpha();
</del><ins>+    if (value.is8Bit()) {
+        const LChar* characters = value.characters8();
+        for (unsigned i = 1, length = value.length(); i &lt; length; ++i) {
+            if (!isASCIIHexDigit(characters[i]))
+                return false;
+        }
+    } else {
+        const UChar* characters = value.characters16();
+        for (unsigned i = 1, length = value.length(); i &lt; length; ++i) {
+            if (!isASCIIHexDigit(characters[i]))
+                return false;
+        }
+    }
+    return true;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> ColorInputType::~ColorInputType()
</span><span class="lines">@@ -95,7 +107,7 @@
</span><span class="cx"> 
</span><span class="cx"> String ColorInputType::sanitizeValue(const String&amp; proposedValue) const
</span><span class="cx"> {
</span><del>-    if (!isValidColorString(proposedValue))
</del><ins>+    if (!isValidSimpleColorString(proposedValue))
</ins><span class="cx">         return fallbackValue();
</span><span class="cx"> 
</span><span class="cx">     return proposedValue.convertToASCIILowercase();
</span><span class="lines">@@ -163,7 +175,7 @@
</span><span class="cx"> 
</span><span class="cx"> bool ColorInputType::typeMismatchFor(const String&amp; value) const
</span><span class="cx"> {
</span><del>-    return !isValidColorString(value);
</del><ins>+    return !isValidSimpleColorString(value);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool ColorInputType::shouldResetOnDocumentActivation()
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasCanvasRenderingContext2Dcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp (208459 => 208460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp        2016-11-09 19:54:25 UTC (rev 208459)
+++ trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp        2016-11-09 19:56:17 UTC (rev 208460)
</span><span class="lines">@@ -1311,7 +1311,7 @@
</span><span class="cx"> 
</span><span class="cx"> bool CanvasRenderingContext2D::shouldDrawShadows() const
</span><span class="cx"> {
</span><del>-    return state().shadowColor.alpha() &amp;&amp; (state().shadowBlur || !state().shadowOffset.isZero());
</del><ins>+    return state().shadowColor.isVisible() &amp;&amp; (state().shadowBlur || !state().shadowOffset.isZero());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> enum ImageSizeType {
</span><span class="lines">@@ -1849,7 +1849,7 @@
</span><span class="cx">         dirtyRect = ctm.mapRect(r);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (options &amp; CanvasDidDrawApplyShadow &amp;&amp; state().shadowColor.alpha()) {
</del><ins>+    if (options &amp; CanvasDidDrawApplyShadow &amp;&amp; state().shadowColor.isVisible()) {
</ins><span class="cx">         // The shadow gets applied after transformation
</span><span class="cx">         FloatRect shadowRect(dirtyRect);
</span><span class="cx">         shadowRect.move(state().shadowOffset);
</span></span></pre></div>
<a id="trunkSourceWebCorepageFrameViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/FrameView.cpp (208459 => 208460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/FrameView.cpp        2016-11-09 19:54:25 UTC (rev 208459)
+++ trunk/Source/WebCore/page/FrameView.cpp        2016-11-09 19:56:17 UTC (rev 208460)
</span><span class="lines">@@ -465,7 +465,7 @@
</span><span class="cx">         // heuristic.
</span><span class="cx">         double hue, saturation, lightness;
</span><span class="cx">         backgroundColor.getHSL(hue, saturation, lightness);
</span><del>-        if (lightness &lt;= .5 &amp;&amp; backgroundColor.alpha() &gt; 0)
</del><ins>+        if (lightness &lt;= .5 &amp;&amp; backgroundColor.isVisible())
</ins><span class="cx">             computedOverlayStyle = ScrollbarOverlayStyleLight;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -3063,7 +3063,7 @@
</span><span class="cx"> 
</span><span class="cx"> bool FrameView::hasOpaqueBackground() const
</span><span class="cx"> {
</span><del>-    return !m_isTransparent &amp;&amp; !m_baseBackgroundColor.hasAlpha();
</del><ins>+    return !m_isTransparent &amp;&amp; m_baseBackgroundColor.isOpaque();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> Color FrameView::baseBackgroundColor() const
</span><span class="lines">@@ -3073,7 +3073,7 @@
</span><span class="cx"> 
</span><span class="cx"> void FrameView::setBaseBackgroundColor(const Color&amp; backgroundColor)
</span><span class="cx"> {
</span><del>-    bool hadAlpha = m_baseBackgroundColor.hasAlpha();
</del><ins>+    bool wasOpaque = m_baseBackgroundColor.isOpaque();
</ins><span class="cx">     
</span><span class="cx">     if (!backgroundColor.isValid())
</span><span class="cx">         m_baseBackgroundColor = Color::white;
</span><span class="lines">@@ -3085,7 +3085,7 @@
</span><span class="cx"> 
</span><span class="cx">     recalculateScrollbarOverlayStyle();
</span><span class="cx"> 
</span><del>-    if (m_baseBackgroundColor.hasAlpha() != hadAlpha)
</del><ins>+    if (m_baseBackgroundColor.isOpaque() != wasOpaque)
</ins><span class="cx">         renderView()-&gt;compositor().rootBackgroundTransparencyChanged();
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsColorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/Color.cpp (208459 => 208460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/Color.cpp        2016-11-09 19:54:25 UTC (rev 208459)
+++ trunk/Source/WebCore/platform/graphics/Color.cpp        2016-11-09 19:56:17 UTC (rev 208460)
</span><span class="lines">@@ -216,9 +216,19 @@
</span><span class="cx"> 
</span><span class="cx"> int differenceSquared(const Color&amp; c1, const Color&amp; c2)
</span><span class="cx"> {
</span><del>-    int dR = c1.red() - c2.red();
-    int dG = c1.green() - c2.green();
-    int dB = c1.blue() - c2.blue();
</del><ins>+    // FIXME: This is assuming that the colors are in the same colorspace.
+    // FIXME: This should probably return a floating point number, but many of the call
+    // sites have picked comparison values based on feel. We'd need to break out
+    // our logarithm tables to change them :)
+    int c1Red = c1.isExtended() ? c1.asExtended().red() * 255 : c1.red();
+    int c1Green = c1.isExtended() ? c1.asExtended().green() * 255 : c1.green();
+    int c1Blue = c1.isExtended() ? c1.asExtended().blue() * 255 : c1.blue();
+    int c2Red = c2.isExtended() ? c2.asExtended().red() * 255 : c2.red();
+    int c2Green = c2.isExtended() ? c2.asExtended().green() * 255 : c2.green();
+    int c2Blue = c2.isExtended() ? c2.asExtended().blue() * 255 : c2.blue();
+    int dR = c1Red - c2Red;
+    int dG = c1Green - c2Green;
+    int dB = c1Blue - c2Blue;
</ins><span class="cx">     return dR * dR + dG * dG + dB * dB;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -334,7 +344,7 @@
</span><span class="cx">     if (isExtended())
</span><span class="cx">         return asExtended().cssText();
</span><span class="cx"> 
</span><del>-    if (!hasAlpha()) {
</del><ins>+    if (isOpaque()) {
</ins><span class="cx">         StringBuilder builder;
</span><span class="cx">         builder.reserveCapacity(7);
</span><span class="cx">         builder.append('#');
</span><span class="lines">@@ -354,7 +364,7 @@
</span><span class="cx"> 
</span><span class="cx">     StringBuilder builder;
</span><span class="cx">     builder.reserveCapacity(28);
</span><del>-    bool colorHasAlpha = hasAlpha();
</del><ins>+    bool colorHasAlpha = !isOpaque();
</ins><span class="cx">     if (colorHasAlpha)
</span><span class="cx">         builder.appendLiteral(&quot;rgba(&quot;);
</span><span class="cx">     else
</span><span class="lines">@@ -459,7 +469,7 @@
</span><span class="cx"> 
</span><span class="cx"> Color Color::blend(const Color&amp; source) const
</span><span class="cx"> {
</span><del>-    if (!alpha() || !source.hasAlpha())
</del><ins>+    if (!isVisible() || source.isOpaque())
</ins><span class="cx">         return source;
</span><span class="cx"> 
</span><span class="cx">     if (!source.alpha())
</span><span class="lines">@@ -476,7 +486,7 @@
</span><span class="cx"> Color Color::blendWithWhite() const
</span><span class="cx"> {
</span><span class="cx">     // If the color contains alpha already, we leave it alone.
</span><del>-    if (hasAlpha())
</del><ins>+    if (!isOpaque())
</ins><span class="cx">         return *this;
</span><span class="cx"> 
</span><span class="cx">     Color newColor;
</span><span class="lines">@@ -495,6 +505,21 @@
</span><span class="cx">     return newColor;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+Color Color::colorWithAlphaMultipliedBy(float amount) const
+{
+    float newAlpha = amount * (isExtended() ? m_colorData.extendedColor-&gt;alpha() : static_cast&lt;float&gt;(alpha()) / 255);
+    return colorWithAlpha(newAlpha);
+}
+
+Color Color::colorWithAlpha(float alpha) const
+{
+    if (isExtended())
+        return Color { m_colorData.extendedColor-&gt;red(), m_colorData.extendedColor-&gt;green(), m_colorData.extendedColor-&gt;blue(), alpha, m_colorData.extendedColor-&gt;colorSpace() };
+
+    int newAlpha = alpha * 255;
+    return Color { red(), green(), blue(), newAlpha };
+}
+
</ins><span class="cx"> void Color::getRGBA(float&amp; r, float&amp; g, float&amp; b, float&amp; a) const
</span><span class="cx"> {
</span><span class="cx">     r = red() / 255.0f;
</span><span class="lines">@@ -601,6 +626,7 @@
</span><span class="cx"> 
</span><span class="cx"> Color blend(const Color&amp; from, const Color&amp; to, double progress, bool blendPremultiplied)
</span><span class="cx"> {
</span><ins>+    // FIXME: ExtendedColor - needs to handle color spaces.
</ins><span class="cx">     // We need to preserve the state of the valid flag at the end of the animation
</span><span class="cx">     if (progress == 1 &amp;&amp; !to.isValid())
</span><span class="cx">         return Color();
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsColorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/Color.h (208459 => 208460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/Color.h        2016-11-09 19:54:25 UTC (rev 208459)
+++ trunk/Source/WebCore/platform/graphics/Color.h        2016-11-09 19:56:17 UTC (rev 208460)
</span><span class="lines">@@ -193,18 +193,20 @@
</span><span class="cx">     WEBCORE_EXPORT String cssText() const;
</span><span class="cx"> 
</span><span class="cx">     // Returns the color serialized as either #RRGGBB or #RRGGBBAA
</span><del>-    // The latter format is not a valid CSS color, and should only be seen in DRT dumps.
</del><span class="cx">     String nameForRenderTreeAsText() const;
</span><span class="cx"> 
</span><span class="cx">     bool isValid() const { return isExtended() || (m_colorData.rgbaAndFlags &amp; validRGBAColorBit); }
</span><span class="cx"> 
</span><del>-    bool hasAlpha() const { return alpha() &lt; 255; }
</del><ins>+    bool isOpaque() const { return isValid() &amp;&amp; (isExtended() ? asExtended().alpha() == 1.0 : alpha() == 255); }
+    bool isVisible() const { return isValid() &amp;&amp; (isExtended() ? asExtended().alpha() &gt; 0.0 : alpha() &gt; 0); }
</ins><span class="cx"> 
</span><span class="cx">     int red() const { return redChannel(rgb()); }
</span><span class="cx">     int green() const { return greenChannel(rgb()); }
</span><span class="cx">     int blue() const { return blueChannel(rgb()); }
</span><span class="cx">     int alpha() const { return alphaChannel(rgb()); }
</span><del>-    
</del><ins>+
+    float alphaAsFloat() const { return isExtended() ? asExtended().alpha() : static_cast&lt;float&gt;(alphaChannel(rgb())) / 255; }
+
</ins><span class="cx">     RGBA32 rgb() const;
</span><span class="cx"> 
</span><span class="cx">     // FIXME: Like operator==, this will give different values for ExtendedColors that
</span><span class="lines">@@ -225,6 +227,12 @@
</span><span class="cx">     Color blend(const Color&amp;) const;
</span><span class="cx">     Color blendWithWhite() const;
</span><span class="cx"> 
</span><ins>+    Color colorWithAlphaMultipliedBy(float) const;
+
+    // Returns a color that has the same RGB values, but with the given A.
+    Color colorWithAlpha(float) const;
+    Color opaqueColor() const { return colorWithAlpha(1.0f); }
+
</ins><span class="cx"> #if PLATFORM(GTK)
</span><span class="cx">     Color(const GdkColor&amp;);
</span><span class="cx">     // We can't sensibly go back to GdkColor without losing the alpha value
</span><span class="lines">@@ -271,6 +279,9 @@
</span><span class="cx"> 
</span><span class="cx">     friend bool operator==(const Color&amp; a, const Color&amp; b);
</span><span class="cx"> 
</span><ins>+    static bool isBlackColor(const Color&amp;);
+    static bool isWhiteColor(const Color&amp;);
+
</ins><span class="cx"> private:
</span><span class="cx">     void setRGB(int r, int g, int b) { setRGB(makeRGB(r, g, b)); }
</span><span class="cx">     void setRGB(RGBA32);
</span><span class="lines">@@ -413,4 +424,24 @@
</span><span class="cx"> 
</span><span class="cx"> WEBCORE_EXPORT TextStream&amp; operator&lt;&lt;(TextStream&amp;, const Color&amp;);
</span><span class="cx"> 
</span><ins>+inline bool Color::isBlackColor(const Color&amp; color)
+{
+    if (color.isExtended()) {
+        const ExtendedColor&amp; extendedColor = color.asExtended();
+        return !extendedColor.red() &amp;&amp; !extendedColor.green() &amp;&amp; !extendedColor.blue() &amp;&amp; extendedColor.alpha() == 1;
+    }
+
+    return color.isValid() &amp;&amp; color.rgb() == Color::black;
+}
+
+inline bool Color::isWhiteColor(const Color&amp; color)
+{
+    if (color.isExtended()) {
+        const ExtendedColor&amp; extendedColor = color.asExtended();
+        return extendedColor.red() == 1 &amp;&amp; extendedColor.green() == 1 &amp;&amp; extendedColor.blue() == 1 &amp;&amp; extendedColor.alpha() == 1;
+    }
+    
+    return color.isValid() &amp;&amp; color.rgb() == Color::white;
+}
+
</ins><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsGradientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/Gradient.cpp (208459 => 208460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/Gradient.cpp        2016-11-09 19:54:25 UTC (rev 208459)
+++ trunk/Source/WebCore/platform/graphics/Gradient.cpp        2016-11-09 19:56:17 UTC (rev 208460)
</span><span class="lines">@@ -96,6 +96,7 @@
</span><span class="cx"> 
</span><span class="cx"> void Gradient::addColorStop(float value, const Color&amp; color)
</span><span class="cx"> {
</span><ins>+    // FIXME: ExtendedColor - update this to support colors with color spaces.
</ins><span class="cx">     float r;
</span><span class="cx">     float g;
</span><span class="cx">     float b;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsGradienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/Gradient.h (208459 => 208460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/Gradient.h        2016-11-09 19:54:25 UTC (rev 208459)
+++ trunk/Source/WebCore/platform/graphics/Gradient.h        2016-11-09 19:56:17 UTC (rev 208460)
</span><span class="lines">@@ -133,6 +133,7 @@
</span><span class="cx">         PlatformGradient platformGradient();
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+        // FIXME: ExtendedColor - A color stop needs a notion of color space.
</ins><span class="cx">         struct ColorStop {
</span><span class="cx">             float stop;
</span><span class="cx">             float red;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsGraphicsContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp (208459 => 208460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp        2016-11-09 19:54:25 UTC (rev 208459)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp        2016-11-09 19:56:17 UTC (rev 208460)
</span><span class="lines">@@ -1101,8 +1101,7 @@
</span><span class="cx">         // effect, an alpha is applied to the underline color when text is at small scales.
</span><span class="cx">         static const float minimumUnderlineAlpha = 0.4f;
</span><span class="cx">         float shade = scale &gt; minimumUnderlineAlpha ? scale : minimumUnderlineAlpha;
</span><del>-        int alpha = color.alpha() * shade;
-        color = Color(color.red(), color.green(), color.blue(), alpha);
</del><ins>+        color = color.colorWithAlphaMultipliedBy(shade);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     FloatPoint devicePoint = transform.mapPoint(point);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsGraphicsContexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/GraphicsContext.h (208459 => 208460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/GraphicsContext.h        2016-11-09 19:54:25 UTC (rev 208459)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContext.h        2016-11-09 19:56:17 UTC (rev 208460)
</span><span class="lines">@@ -427,7 +427,7 @@
</span><span class="cx">     WEBCORE_EXPORT void clearShadow();
</span><span class="cx">     bool getShadow(FloatSize&amp;, float&amp;, Color&amp;) const;
</span><span class="cx"> 
</span><del>-    bool hasVisibleShadow() const { return m_state.shadowColor.isValid() &amp;&amp; m_state.shadowColor.alpha(); }
</del><ins>+    bool hasVisibleShadow() const { return m_state.shadowColor.isVisible(); }
</ins><span class="cx">     bool hasShadow() const { return hasVisibleShadow() &amp;&amp; (m_state.shadowBlur || m_state.shadowOffset.width() || m_state.shadowOffset.height()); }
</span><span class="cx">     bool hasBlurredShadow() const { return hasVisibleShadow() &amp;&amp; m_state.shadowBlur; }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsImagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/Image.cpp (208459 => 208460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/Image.cpp        2016-11-09 19:54:25 UTC (rev 208459)
+++ trunk/Source/WebCore/platform/graphics/Image.cpp        2016-11-09 19:56:17 UTC (rev 208460)
</span><span class="lines">@@ -82,11 +82,11 @@
</span><span class="cx"> 
</span><span class="cx"> void Image::fillWithSolidColor(GraphicsContext&amp; ctxt, const FloatRect&amp; dstRect, const Color&amp; color, CompositeOperator op)
</span><span class="cx"> {
</span><del>-    if (!color.alpha())
</del><ins>+    if (!color.isVisible())
</ins><span class="cx">         return;
</span><span class="cx">     
</span><span class="cx">     CompositeOperator previousOperator = ctxt.compositeOperation();
</span><del>-    ctxt.setCompositeOperation(!color.hasAlpha() &amp;&amp; op == CompositeSourceOver ? CompositeCopy : op);
</del><ins>+    ctxt.setCompositeOperation(color.isOpaque() &amp;&amp; op == CompositeSourceOver ? CompositeCopy : op);
</ins><span class="cx">     ctxt.fillRect(dstRect, color);
</span><span class="cx">     ctxt.setCompositeOperation(previousOperator);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsShadowBlurcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/ShadowBlur.cpp (208459 => 208460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/ShadowBlur.cpp        2016-11-09 19:54:25 UTC (rev 208459)
+++ trunk/Source/WebCore/platform/graphics/ShadowBlur.cpp        2016-11-09 19:56:17 UTC (rev 208460)
</span><span class="lines">@@ -218,7 +218,7 @@
</span><span class="cx">     m_blurRadius = m_blurRadius.shrunkTo(FloatSize(128, 128));
</span><span class="cx"> 
</span><span class="cx">     // The type of shadow is decided by the blur radius, shadow offset, and shadow color.
</span><del>-    if (!m_color.isValid() || !m_color.alpha()) {
</del><ins>+    if (!m_color.isVisible()) {
</ins><span class="cx">         // Can't paint the shadow with invalid or invisible color.
</span><span class="cx">         m_type = NoShadow;
</span><span class="cx">     } else if (m_blurRadius.width() &gt; 0 || m_blurRadius.height() &gt; 0) {
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscaGraphicsLayerCAcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp (208459 => 208460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp        2016-11-09 19:54:25 UTC (rev 208459)
+++ trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp        2016-11-09 19:56:17 UTC (rev 208460)
</span><span class="lines">@@ -1004,7 +1004,7 @@
</span><span class="cx">     
</span><span class="cx">     bool contentsLayerChanged = false;
</span><span class="cx"> 
</span><del>-    if (m_contentsSolidColor.isValid() &amp;&amp; m_contentsSolidColor.alpha()) {
</del><ins>+    if (m_contentsSolidColor.isVisible()) {
</ins><span class="cx">         if (!m_contentsLayer || m_contentsLayerPurpose != ContentsLayerForBackgroundColor) {
</span><span class="cx">             m_contentsLayerPurpose = ContentsLayerForBackgroundColor;
</span><span class="cx">             m_contentsLayer = createPlatformCALayer(PlatformCALayer::LayerTypeLayer, this);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscgGradientCGcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/cg/GradientCG.cpp (208459 => 208460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cg/GradientCG.cpp        2016-11-09 19:54:25 UTC (rev 208459)
+++ trunk/Source/WebCore/platform/graphics/cg/GradientCG.cpp        2016-11-09 19:56:17 UTC (rev 208460)
</span><span class="lines">@@ -47,7 +47,10 @@
</span><span class="cx">         return m_gradient;
</span><span class="cx"> 
</span><span class="cx">     sortStopsIfNecessary();
</span><del>-    
</del><ins>+
+    // FIXME: ExtendedColor - we should generate CGColorRefs here, so that
+    // we can handle color spaces.
+
</ins><span class="cx">     const int cReservedStops = 3;
</span><span class="cx">     Vector&lt;CGFloat, 4 * cReservedStops&gt; colorComponents;
</span><span class="cx">     colorComponents.reserveInitialCapacity(m_stops.size() * 4); // RGBA components per stop
</span><span class="lines">@@ -63,7 +66,8 @@
</span><span class="cx"> 
</span><span class="cx">         locations.uncheckedAppend(m_stops[i].stop);
</span><span class="cx">     }
</span><del>-    
</del><ins>+
+    // FIXME: ExtendedColor - use CGGradientCreateWithColors so that we can have stops in different color spaces.
</ins><span class="cx">     m_gradient = CGGradientCreateWithColorComponents(sRGBColorSpaceRef(), colorComponents.data(), locations.data(), m_stops.size());
</span><span class="cx"> 
</span><span class="cx">     return m_gradient;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscgGraphicsContextCGcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp (208459 => 208460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp        2016-11-09 19:54:25 UTC (rev 208459)
+++ trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp        2016-11-09 19:56:17 UTC (rev 208460)
</span><span class="lines">@@ -597,8 +597,8 @@
</span><span class="cx"> 
</span><span class="cx"> static inline bool calculateDrawingMode(const GraphicsContextState&amp; state, CGPathDrawingMode&amp; mode)
</span><span class="cx"> {
</span><del>-    bool shouldFill = state.fillPattern || state.fillColor.alpha();
-    bool shouldStroke = state.strokePattern || (state.strokeStyle != NoStroke &amp;&amp; state.strokeColor.alpha());
</del><ins>+    bool shouldFill = state.fillPattern || state.fillColor.isVisible();
+    bool shouldStroke = state.strokePattern || (state.strokeStyle != NoStroke &amp;&amp; state.strokeColor.isVisible());
</ins><span class="cx">     bool useEOFill = state.fillRule == RULE_EVENODD;
</span><span class="cx"> 
</span><span class="cx">     if (shouldFill) {
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscocoaFontCascadeCocoamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/cocoa/FontCascadeCocoa.mm (208459 => 208460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cocoa/FontCascadeCocoa.mm        2016-11-09 19:54:25 UTC (rev 208459)
+++ trunk/Source/WebCore/platform/graphics/cocoa/FontCascadeCocoa.mm        2016-11-09 19:56:17 UTC (rev 208460)
</span><span class="lines">@@ -273,7 +273,7 @@
</span><span class="cx">         // Paint simple shadows ourselves instead of relying on CG shadows, to avoid losing subpixel antialiasing.
</span><span class="cx">         context.clearShadow();
</span><span class="cx">         Color fillColor = context.fillColor();
</span><del>-        Color shadowFillColor(shadowColor.red(), shadowColor.green(), shadowColor.blue(), shadowColor.alpha() * fillColor.alpha() / 255);
</del><ins>+        Color shadowFillColor = shadowColor.colorWithAlphaMultipliedBy(fillColor.alphaAsFloat());
</ins><span class="cx">         context.setFillColor(shadowFillColor);
</span><span class="cx">         float shadowTextX = point.x() + shadowOffset.width();
</span><span class="cx">         // If shadows are ignoring transforms, then we haven't applied the Y coordinate flip yet, so down is negative.
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsmacColorMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/mac/ColorMac.mm (208459 => 208460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/mac/ColorMac.mm        2016-11-09 19:54:25 UTC (rev 208459)
+++ trunk/Source/WebCore/platform/graphics/mac/ColorMac.mm        2016-11-09 19:56:17 UTC (rev 208460)
</span><span class="lines">@@ -27,6 +27,7 @@
</span><span class="cx"> #import &quot;ColorMac.h&quot;
</span><span class="cx"> 
</span><span class="cx"> #import &lt;wtf/BlockObjCExceptions.h&gt;
</span><ins>+#import &lt;wtf/NeverDestroyed.h&gt;
</ins><span class="cx"> #import &lt;wtf/RetainPtr.h&gt;
</span><span class="cx"> #import &lt;wtf/StdLibExtras.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -74,44 +75,40 @@
</span><span class="cx"> 
</span><span class="cx"> NSColor *nsColor(const Color&amp; color)
</span><span class="cx"> {
</span><del>-    RGBA32 c = color.rgb();
-    switch (c) {
-        case 0: {
-            // Need this to avoid returning nil because cachedRGBAValues will default to 0.
-            static NSColor *clearColor = [[NSColor colorWithDeviceRed:0 green:0 blue:0 alpha:0] retain];
-            return clearColor;
-        }
-        case Color::black: {
-            static NSColor *blackColor = [[NSColor colorWithDeviceRed:0 green:0 blue:0 alpha:1] retain];
-            return blackColor;
-        }
-        case Color::white: {
-            static NSColor *whiteColor = [[NSColor colorWithDeviceRed:1 green:1 blue:1 alpha:1] retain];
-            return whiteColor;
-        }
-        default: {
-            const int cacheSize = 32;
-            static unsigned cachedRGBAValues[cacheSize];
-            static RetainPtr&lt;NSColor&gt;* cachedColors = new RetainPtr&lt;NSColor&gt;[cacheSize];
</del><ins>+    if (!color.isValid()) {
+        // Need this to avoid returning nil because cachedRGBAValues will default to 0.
+        static NeverDestroyed&lt;NSColor *&gt; clearColor = [[NSColor colorWithDeviceRed:0 green:0 blue:0 alpha:0] retain];
+        return clearColor;
+    }
</ins><span class="cx"> 
</span><del>-            for (int i = 0; i != cacheSize; ++i) {
-                if (cachedRGBAValues[i] == c)
-                    return cachedColors[i].get();
-            }
</del><ins>+    if (Color::isBlackColor(color)) {
+        static NeverDestroyed&lt;NSColor *&gt; blackColor = [[NSColor colorWithDeviceRed:0 green:0 blue:0 alpha:1] retain];
+        return blackColor;
+    }
</ins><span class="cx"> 
</span><del>-            NSColor *result = [NSColor colorWithDeviceRed:static_cast&lt;CGFloat&gt;(color.red()) / 255
-                                                    green:static_cast&lt;CGFloat&gt;(color.green()) / 255
-                                                     blue:static_cast&lt;CGFloat&gt;(color.blue()) / 255
-                                                    alpha:static_cast&lt;CGFloat&gt;(color.alpha()) / 255];
</del><ins>+    if (Color::isWhiteColor(color)) {
+        static NeverDestroyed&lt;NSColor *&gt; whiteColor = [[NSColor colorWithDeviceRed:1 green:1 blue:1 alpha:1] retain];
+        return whiteColor;
+    }
</ins><span class="cx"> 
</span><del>-            static int cursor;
-            cachedRGBAValues[cursor] = c;
-            cachedColors[cursor] = result;
-            if (++cursor == cacheSize)
-                cursor = 0;
-            return result;
-        }
</del><ins>+    const int cacheSize = 32;
+    static unsigned cachedRGBAValues[cacheSize];
+    static RetainPtr&lt;NSColor&gt;* cachedColors = new RetainPtr&lt;NSColor&gt;[cacheSize];
+
+    unsigned hash = color.hash();
+    for (int i = 0; i &lt; cacheSize; ++i) {
+        if (cachedRGBAValues[i] == hash)
+            return cachedColors[i].get();
</ins><span class="cx">     }
</span><ins>+
+    NSColor *result = [NSColor colorWithCGColor:cachedCGColor(color)];
+
+    static int cursor;
+    cachedRGBAValues[cursor] = hash;
+    cachedColors[cursor] = result;
+    if (++cursor == cacheSize)
+        cursor = 0;
+    return result;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicstexmapTextureMapperGLcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp (208459 => 208460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp        2016-11-09 19:54:25 UTC (rev 208459)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp        2016-11-09 19:56:17 UTC (rev 208460)
</span><span class="lines">@@ -229,7 +229,7 @@
</span><span class="cx">     m_context3D-&gt;uniform4f(program-&gt;colorLocation(), r, g, b, a);
</span><span class="cx">     m_context3D-&gt;lineWidth(width);
</span><span class="cx"> 
</span><del>-    draw(targetRect, modelViewMatrix, program.get(), GraphicsContext3D::LINE_LOOP, color.hasAlpha() ? ShouldBlend : 0);
</del><ins>+    draw(targetRect, modelViewMatrix, program.get(), GraphicsContext3D::LINE_LOOP, !color.isOpaque() ? ShouldBlend : 0);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> // FIXME: drawNumber() should save a number texture-atlas and re-use whenever possible.
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingBorderEdgecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/BorderEdge.cpp (208459 => 208460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/BorderEdge.cpp        2016-11-09 19:54:25 UTC (rev 208459)
+++ trunk/Source/WebCore/rendering/BorderEdge.cpp        2016-11-09 19:56:17 UTC (rev 208460)
</span><span class="lines">@@ -62,7 +62,7 @@
</span><span class="cx"> 
</span><span class="cx"> bool BorderEdge::obscuresBackgroundEdge(float scale) const
</span><span class="cx"> {
</span><del>-    if (!m_isPresent || m_isTransparent || (m_width * scale) &lt; borderWidthInDevicePixel(2) || m_color.hasAlpha() || m_style == BHIDDEN)
</del><ins>+    if (!m_isPresent || m_isTransparent || (m_width * scale) &lt; borderWidthInDevicePixel(2) || !m_color.isOpaque() || m_style == BHIDDEN)
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     if (m_style == DOTTED || m_style == DASHED)
</span><span class="lines">@@ -76,7 +76,7 @@
</span><span class="cx"> 
</span><span class="cx"> bool BorderEdge::obscuresBackground() const
</span><span class="cx"> {
</span><del>-    if (!m_isPresent || m_isTransparent || m_color.hasAlpha() || m_style == BHIDDEN)
</del><ins>+    if (!m_isPresent || m_isTransparent || !m_color.isOpaque() || m_style == BHIDDEN)
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     if (m_style == DOTTED || m_style == DASHED || m_style == DOUBLE)
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (208459 => 208460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBox.cpp        2016-11-09 19:54:25 UTC (rev 208459)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp        2016-11-09 19:56:17 UTC (rev 208460)
</span><span class="lines">@@ -1402,7 +1402,7 @@
</span><span class="cx">     LayoutRect backgroundRect = snappedIntRect(borderBoxRect());
</span><span class="cx"> 
</span><span class="cx">     Color backgroundColor = style().visitedDependentColor(CSSPropertyBackgroundColor);
</span><del>-    if (backgroundColor.isValid() &amp;&amp; backgroundColor.alpha()) {
</del><ins>+    if (backgroundColor.isVisible()) {
</ins><span class="cx">         paintedExtent = backgroundRect;
</span><span class="cx">         return true;
</span><span class="cx">     }
</span><span class="lines">@@ -1423,7 +1423,7 @@
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     Color backgroundColor = style().visitedDependentColor(CSSPropertyBackgroundColor);
</span><del>-    if (!backgroundColor.isValid() || backgroundColor.hasAlpha())
</del><ins>+    if (!backgroundColor.isOpaque())
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     // If the element has appearance, it might be painted by theme.
</span><span class="lines">@@ -1543,10 +1543,10 @@
</span><span class="cx">     if (fillLayer-&gt;hasOpaqueImage(*this) &amp;&amp; fillLayer-&gt;hasRepeatXY() &amp;&amp; fillLayer-&gt;image()-&gt;canRender(this, style().effectiveZoom()))
</span><span class="cx">         return true;
</span><span class="cx"> 
</span><del>-    // If there is only one layer and no image, check whether the background color is opaque
</del><ins>+    // If there is only one layer and no image, check whether the background color is opaque.
</ins><span class="cx">     if (!fillLayer-&gt;next() &amp;&amp; !fillLayer-&gt;hasImage()) {
</span><span class="cx">         Color bgColor = style().visitedDependentColor(CSSPropertyBackgroundColor);
</span><del>-        if (bgColor.isValid() &amp;&amp; bgColor.alpha() == 255)
</del><ins>+        if (bgColor.isOpaque())
</ins><span class="cx">             return true;
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBoxModelObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp (208459 => 208460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp        2016-11-09 19:54:25 UTC (rev 208459)
+++ trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp        2016-11-09 19:56:17 UTC (rev 208460)
</span><span class="lines">@@ -657,7 +657,7 @@
</span><span class="cx">     // while rendering.)
</span><span class="cx">     if (forceBackgroundToWhite) {
</span><span class="cx">         // Note that we can't reuse this variable below because the bgColor might be changed
</span><del>-        bool shouldPaintBackgroundColor = !bgLayer-&gt;next() &amp;&amp; bgColor.isValid() &amp;&amp; bgColor.alpha();
</del><ins>+        bool shouldPaintBackgroundColor = !bgLayer-&gt;next() &amp;&amp; bgColor.isVisible();
</ins><span class="cx">         if (shouldPaintBackgroundImage || shouldPaintBackgroundColor) {
</span><span class="cx">             bgColor = Color::white;
</span><span class="cx">             shouldPaintBackgroundImage = false;
</span><span class="lines">@@ -665,10 +665,10 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     bool baseBgColorOnly = (baseBgColorUsage == BaseBackgroundColorOnly);
</span><del>-    if (baseBgColorOnly &amp;&amp; (!isRoot || bgLayer-&gt;next() || (bgColor.isValid() &amp;&amp; !bgColor.hasAlpha())))
</del><ins>+    if (baseBgColorOnly &amp;&amp; (!isRoot || bgLayer-&gt;next() || bgColor.isOpaque()))
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    bool colorVisible = bgColor.isValid() &amp;&amp; bgColor.alpha();
</del><ins>+    bool colorVisible = bgColor.isVisible();
</ins><span class="cx">     float deviceScaleFactor = document().deviceScaleFactor();
</span><span class="cx">     FloatRect pixelSnappedRect = snapRectToDevicePixels(rect, deviceScaleFactor);
</span><span class="cx"> 
</span><span class="lines">@@ -772,7 +772,7 @@
</span><span class="cx">     bool isOpaqueRoot = false;
</span><span class="cx">     if (isRoot) {
</span><span class="cx">         isOpaqueRoot = true;
</span><del>-        if (!bgLayer-&gt;next() &amp;&amp; !(bgColor.isValid() &amp;&amp; bgColor.alpha() == 255)) {
</del><ins>+        if (!bgLayer-&gt;next() &amp;&amp; !bgColor.isOpaque()) {
</ins><span class="cx">             HTMLFrameOwnerElement* ownerElement = document().ownerElement();
</span><span class="cx">             if (ownerElement) {
</span><span class="cx">                 if (!ownerElement-&gt;hasTagName(frameTag)) {
</span><span class="lines">@@ -809,7 +809,7 @@
</span><span class="cx">             bool shouldClearBackground = false;
</span><span class="cx">             if ((baseBgColorUsage != BaseBackgroundColorSkip) &amp;&amp; isOpaqueRoot) {
</span><span class="cx">                 baseColor = view().frameView().baseBackgroundColor();
</span><del>-                if (!baseColor.alpha())
</del><ins>+                if (!baseColor.isVisible())
</ins><span class="cx">                     shouldClearBackground = true;
</span><span class="cx">             }
</span><span class="cx"> 
</span><span class="lines">@@ -818,12 +818,12 @@
</span><span class="cx">                 applyBoxShadowForBackground(context, &amp;style());
</span><span class="cx"> 
</span><span class="cx">             FloatRect backgroundRectForPainting = snapRectToDevicePixels(backgroundRect, deviceScaleFactor);
</span><del>-            if (baseColor.alpha()) {
-                if (!baseBgColorOnly &amp;&amp; bgColor.alpha())
</del><ins>+            if (baseColor.isVisible()) {
+                if (!baseBgColorOnly &amp;&amp; bgColor.isVisible())
</ins><span class="cx">                     baseColor = baseColor.blend(bgColor);
</span><span class="cx"> 
</span><span class="cx">                 context.fillRect(backgroundRectForPainting, baseColor, CompositeCopy);
</span><del>-            } else if (!baseBgColorOnly &amp;&amp; bgColor.alpha()) {
</del><ins>+            } else if (!baseBgColorOnly &amp;&amp; bgColor.isVisible()) {
</ins><span class="cx">                 CompositeOperator operation = shouldClearBackground ? CompositeCopy : context.compositeOperation();
</span><span class="cx">                 context.fillRect(backgroundRectForPainting, bgColor, operation);
</span><span class="cx">             } else if (shouldClearBackground)
</span><span class="lines">@@ -1368,7 +1368,7 @@
</span><span class="cx"> 
</span><span class="cx"> static inline bool colorNeedsAntiAliasAtCorner(BoxSide side, BoxSide adjacentSide, const BorderEdge edges[])
</span><span class="cx"> {
</span><del>-    if (!edges[side].color().hasAlpha())
</del><ins>+    if (edges[side].color().isOpaque())
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     if (edges[side].shouldRender() != edges[adjacentSide].shouldRender())
</span><span class="lines">@@ -1389,7 +1389,7 @@
</span><span class="cx">         if (edges[adjacentSide].presentButInvisible())
</span><span class="cx">             return false;
</span><span class="cx"> 
</span><del>-        if (!edgesShareColor(edges[side], edges[adjacentSide]) &amp;&amp; edges[adjacentSide].color().hasAlpha())
</del><ins>+        if (!edgesShareColor(edges[side], edges[adjacentSide]) &amp;&amp; !edges[adjacentSide].color().isOpaque())
</ins><span class="cx">             return false;
</span><span class="cx">         
</span><span class="cx">         if (!borderStyleFillsBorderArea(edges[adjacentSide].style()))
</span><span class="lines">@@ -1656,10 +1656,10 @@
</span><span class="cx">                 commonColorEdgeSet |= edgeFlagForSide(currSide);
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        bool useTransparencyLayer = includesAdjacentEdges(commonColorEdgeSet) &amp;&amp; commonColor.hasAlpha();
</del><ins>+        bool useTransparencyLayer = includesAdjacentEdges(commonColorEdgeSet) &amp;&amp; !commonColor.isOpaque();
</ins><span class="cx">         if (useTransparencyLayer) {
</span><del>-            graphicsContext.beginTransparencyLayer(static_cast&lt;float&gt;(commonColor.alpha()) / 255);
-            commonColor = Color(commonColor.red(), commonColor.green(), commonColor.blue());
</del><ins>+            graphicsContext.beginTransparencyLayer(commonColor.alphaAsFloat());
+            commonColor = commonColor.opaqueColor();
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         paintBorderSides(graphicsContext, style, outerBorder, innerBorder, innerBorderAdjustment, edges, commonColorEdgeSet, bleedAvoidance, includeLogicalLeftEdge, includeLogicalRightEdge, antialias, &amp;commonColor);
</span><span class="lines">@@ -1721,7 +1721,7 @@
</span><span class="cx">         else if (currEdge.color() != edges[firstVisibleEdge].color())
</span><span class="cx">             allEdgesShareColor = false;
</span><span class="cx"> 
</span><del>-        if (currEdge.color().hasAlpha())
</del><ins>+        if (!currEdge.color().isOpaque())
</ins><span class="cx">             haveAlphaColor = true;
</span><span class="cx">         
</span><span class="cx">         if (currEdge.style() != SOLID)
</span><span class="lines">@@ -2164,7 +2164,7 @@
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     Color backgroundColor = style().visitedDependentColor(CSSPropertyBackgroundColor);
</span><del>-    if (!backgroundColor.isValid() || backgroundColor.hasAlpha())
</del><ins>+    if (!backgroundColor.isOpaque())
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     const FillLayer* lastBackgroundLayer = style().backgroundLayers();
</span><span class="lines">@@ -2213,8 +2213,8 @@
</span><span class="cx">     bool hasBorderRadius = style.hasBorderRadius();
</span><span class="cx">     bool isHorizontal = style.isHorizontalWritingMode();
</span><span class="cx">     float deviceScaleFactor = document().deviceScaleFactor();
</span><del>-    
-    bool hasOpaqueBackground = style.visitedDependentColor(CSSPropertyBackgroundColor).isValid() &amp;&amp; style.visitedDependentColor(CSSPropertyBackgroundColor).alpha() == 255;
</del><ins>+
+    bool hasOpaqueBackground = style.visitedDependentColor(CSSPropertyBackgroundColor).isOpaque();
</ins><span class="cx">     for (const ShadowData* shadow = style.boxShadow(); shadow; shadow = shadow-&gt;next()) {
</span><span class="cx">         if (shadow-&gt;style() != shadowStyle)
</span><span class="cx">             continue;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderElement.cpp (208459 => 208460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderElement.cpp        2016-11-09 19:54:25 UTC (rev 208459)
+++ trunk/Source/WebCore/rendering/RenderElement.cpp        2016-11-09 19:56:17 UTC (rev 208460)
</span><span class="lines">@@ -2112,7 +2112,7 @@
</span><span class="cx">     EBorderStyle outlineStyle = styleToUse.outlineStyle();
</span><span class="cx">     Color outlineColor = styleToUse.visitedDependentColor(CSSPropertyOutlineColor);
</span><span class="cx"> 
</span><del>-    bool useTransparencyLayer = outlineColor.hasAlpha();
</del><ins>+    bool useTransparencyLayer = !outlineColor.isOpaque();
</ins><span class="cx">     if (useTransparencyLayer) {
</span><span class="cx">         if (outlineStyle == SOLID) {
</span><span class="cx">             Path path;
</span><span class="lines">@@ -2123,8 +2123,8 @@
</span><span class="cx">             graphicsContext.fillPath(path);
</span><span class="cx">             return;
</span><span class="cx">         }
</span><del>-        graphicsContext.beginTransparencyLayer(static_cast&lt;float&gt;(outlineColor.alpha()) / 255);
-        outlineColor = Color(outlineColor.red(), outlineColor.green(), outlineColor.blue());
</del><ins>+        graphicsContext.beginTransparencyLayer(outlineColor.alphaAsFloat());
+        outlineColor = outlineColor.opaqueColor();
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     float leftOuter = outer.x();
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderInlinecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderInline.cpp (208459 => 208460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderInline.cpp        2016-11-09 19:54:25 UTC (rev 208459)
+++ trunk/Source/WebCore/rendering/RenderInline.cpp        2016-11-09 19:56:17 UTC (rev 208460)
</span><span class="lines">@@ -1637,10 +1637,10 @@
</span><span class="cx">     rects.append(LayoutRect());
</span><span class="cx"> 
</span><span class="cx">     Color outlineColor = styleToUse.visitedDependentColor(CSSPropertyOutlineColor);
</span><del>-    bool useTransparencyLayer = outlineColor.hasAlpha();
</del><ins>+    bool useTransparencyLayer = !outlineColor.isOpaque();
</ins><span class="cx">     if (useTransparencyLayer) {
</span><del>-        graphicsContext.beginTransparencyLayer(static_cast&lt;float&gt;(outlineColor.alpha()) / 255);
-        outlineColor = Color(outlineColor.red(), outlineColor.green(), outlineColor.blue());
</del><ins>+        graphicsContext.beginTransparencyLayer(outlineColor.alphaAsFloat());
+        outlineColor = outlineColor.opaqueColor();
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     for (unsigned i = 1; i &lt; rects.size() - 1; i++)
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayerBackingcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.cpp (208459 => 208460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLayerBacking.cpp        2016-11-09 19:54:25 UTC (rev 208459)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.cpp        2016-11-09 19:56:17 UTC (rev 208460)
</span><span class="lines">@@ -1769,7 +1769,7 @@
</span><span class="cx"> 
</span><span class="cx">     // FIXME: Allow color+image compositing when it makes sense.
</span><span class="cx">     // For now bailing out.
</span><del>-    if (color.isValid() &amp;&amp; color.alpha())
</del><ins>+    if (color.isVisible())
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     StyleImage* styleImage = fillLayer-&gt;image();
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayerCompositorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp (208459 => 208460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp        2016-11-09 19:54:25 UTC (rev 208459)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp        2016-11-09 19:56:17 UTC (rev 208460)
</span><span class="lines">@@ -3209,7 +3209,7 @@
</span><span class="cx">     if (backgroundColor)
</span><span class="cx">         *backgroundColor = documentBackgroundColor;
</span><span class="cx">         
</span><del>-    return documentBackgroundColor.hasAlpha();
</del><ins>+    return !documentBackgroundColor.isOpaque();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> // We can't rely on getting layerStyleChanged() for a style change that affects the root background, because the style change may
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderMenuListcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderMenuList.cpp (208459 => 208460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderMenuList.cpp        2016-11-09 19:54:25 UTC (rev 208459)
+++ trunk/Source/WebCore/rendering/RenderMenuList.cpp        2016-11-09 19:56:17 UTC (rev 208460)
</span><span class="lines">@@ -535,9 +535,9 @@
</span><span class="cx">     HTMLElement* element = listItems[listIndex];
</span><span class="cx"> 
</span><span class="cx">     Color backgroundColor = element-&gt;computedStyle()-&gt;visitedDependentColor(CSSPropertyBackgroundColor);
</span><del>-    itemHasCustomBackgroundColor = backgroundColor.isValid() &amp;&amp; backgroundColor.alpha();
</del><ins>+    itemHasCustomBackgroundColor = backgroundColor.isValid() &amp;&amp; backgroundColor.isVisible();
</ins><span class="cx">     // If the item has an opaque background color, return that.
</span><del>-    if (!backgroundColor.hasAlpha()) {
</del><ins>+    if (backgroundColor.isOpaque()) {
</ins><span class="cx">         itemBackgroundColor = backgroundColor;
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="lines">@@ -544,7 +544,7 @@
</span><span class="cx"> 
</span><span class="cx">     // Otherwise, the item's background is overlayed on top of the menu background.
</span><span class="cx">     backgroundColor = style().visitedDependentColor(CSSPropertyBackgroundColor).blend(backgroundColor);
</span><del>-    if (!backgroundColor.hasAlpha()) {
</del><ins>+    if (backgroundColor.isOpaque()) {
</ins><span class="cx">         itemBackgroundColor = backgroundColor;
</span><span class="cx">         return;
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderThemecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderTheme.cpp (208459 => 208460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderTheme.cpp        2016-11-09 19:54:25 UTC (rev 208459)
+++ trunk/Source/WebCore/rendering/RenderTheme.cpp        2016-11-09 19:56:17 UTC (rev 208460)
</span><span class="lines">@@ -1289,7 +1289,7 @@
</span><span class="cx"> // Value chosen by observation. This can be tweaked.
</span><span class="cx"> static const int minColorContrastValue = 1300;
</span><span class="cx"> // For transparent or translucent background color, use lightening.
</span><del>-static const int minDisabledColorAlphaValue = 128;
</del><ins>+static const float minDisabledColorAlphaValue = 0.5;
</ins><span class="cx"> 
</span><span class="cx"> Color RenderTheme::disabledTextColor(const Color&amp; textColor, const Color&amp; backgroundColor) const
</span><span class="cx"> {
</span><span class="lines">@@ -1296,7 +1296,7 @@
</span><span class="cx">     // The explicit check for black is an optimization for the 99% case (black on white).
</span><span class="cx">     // This also means that black on black will turn into grey on black when disabled.
</span><span class="cx">     Color disabledColor;
</span><del>-    if (textColor.rgb() == Color::black || backgroundColor.alpha() &lt; minDisabledColorAlphaValue || differenceSquared(textColor, Color::white) &gt; differenceSquared(backgroundColor, Color::white))
</del><ins>+    if (Color::isBlackColor(textColor) || backgroundColor.alphaAsFloat() &lt; minDisabledColorAlphaValue || differenceSquared(textColor, Color::white) &gt; differenceSquared(backgroundColor, Color::white))
</ins><span class="cx">         disabledColor = textColor.light();
</span><span class="cx">     else
</span><span class="cx">         disabledColor = textColor.dark();
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderView.cpp (208459 => 208460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderView.cpp        2016-11-09 19:54:25 UTC (rev 208459)
+++ trunk/Source/WebCore/rendering/RenderView.cpp        2016-11-09 19:56:17 UTC (rev 208460)
</span><span class="lines">@@ -585,7 +585,7 @@
</span><span class="cx">     else {
</span><span class="cx">         const Color&amp; documentBackgroundColor = frameView().documentBackgroundColor();
</span><span class="cx">         const Color&amp; backgroundColor = (backgroundShouldExtendBeyondPage &amp;&amp; documentBackgroundColor.isValid()) ? documentBackgroundColor : frameView().baseBackgroundColor();
</span><del>-        if (backgroundColor.alpha()) {
</del><ins>+        if (backgroundColor.isVisible()) {
</ins><span class="cx">             CompositeOperator previousOperator = paintInfo.context().compositeOperation();
</span><span class="cx">             paintInfo.context().setCompositeOperation(CompositeCopy);
</span><span class="cx">             paintInfo.context().fillRect(paintInfo.rect, backgroundColor);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingTextDecorationPaintercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/TextDecorationPainter.cpp (208459 => 208460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/TextDecorationPainter.cpp        2016-11-09 19:54:25 UTC (rev 208459)
+++ trunk/Source/WebCore/rendering/TextDecorationPainter.cpp        2016-11-09 19:56:17 UTC (rev 208460)
</span><span class="lines">@@ -286,9 +286,9 @@
</span><span class="cx">     };
</span><span class="cx"> 
</span><span class="cx">     bool linesAreOpaque = !m_isPrinting
</span><del>-        &amp;&amp; (!(m_decoration &amp; TextDecorationUnderline) || m_styles.underlineColor.alpha() == 255)
-        &amp;&amp; (!(m_decoration &amp; TextDecorationOverline) || m_styles.overlineColor.alpha() == 255)
-        &amp;&amp; (!(m_decoration &amp; TextDecorationLineThrough) || m_styles.linethroughColor.alpha() == 255);
</del><ins>+        &amp;&amp; (!(m_decoration &amp; TextDecorationUnderline) || m_styles.underlineColor.isOpaque())
+        &amp;&amp; (!(m_decoration &amp; TextDecorationOverline) || m_styles.overlineColor.isOpaque())
+        &amp;&amp; (!(m_decoration &amp; TextDecorationLineThrough) || m_styles.linethroughColor.isOpaque());
</ins><span class="cx"> 
</span><span class="cx">     int extraOffset = 0;
</span><span class="cx">     bool clipping = !linesAreOpaque &amp;&amp; m_shadow &amp;&amp; m_shadow-&gt;next();
</span><span class="lines">@@ -360,7 +360,7 @@
</span><span class="cx">     if (style.textStrokeWidth() &gt; 0) {
</span><span class="cx">         // Prefer stroke color if possible but not if it's fully transparent.
</span><span class="cx">         result = style.visitedDependentColor(CSSPropertyWebkitTextStrokeColor);
</span><del>-        if (result.alpha())
</del><ins>+        if (result.isVisible())
</ins><span class="cx">             return result;
</span><span class="cx">     }
</span><span class="cx">     
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingTextPaintercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/TextPainter.cpp (208459 => 208460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/TextPainter.cpp        2016-11-09 19:54:25 UTC (rev 208459)
+++ trunk/Source/WebCore/rendering/TextPainter.cpp        2016-11-09 19:56:17 UTC (rev 208460)
</span><span class="lines">@@ -102,7 +102,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     Color fillColor = m_context.fillColor();
</span><del>-    bool opaque = !fillColor.hasAlpha();
</del><ins>+    bool opaque = fillColor.isOpaque();
</ins><span class="cx">     bool lastShadowIterationShouldDrawText = !stroked &amp;&amp; opaque;
</span><span class="cx">     if (!opaque)
</span><span class="cx">         m_context.setFillColor(Color::black);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleBorderValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/BorderValue.h (208459 => 208460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/BorderValue.h        2016-11-09 19:54:25 UTC (rev 208459)
+++ trunk/Source/WebCore/rendering/style/BorderValue.h        2016-11-09 19:56:17 UTC (rev 208460)
</span><span class="lines">@@ -46,7 +46,7 @@
</span><span class="cx"> 
</span><span class="cx">     bool isTransparent() const
</span><span class="cx">     {
</span><del>-        return m_color.isValid() &amp;&amp; !m_color.alpha();
</del><ins>+        return m_color.isValid() &amp;&amp; !m_color.isVisible();
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     bool isVisible(bool checkStyle = true) const
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleRenderStylecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/RenderStyle.cpp (208459 => 208460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/RenderStyle.cpp        2016-11-09 19:54:25 UTC (rev 208459)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.cpp        2016-11-09 19:56:17 UTC (rev 208460)
</span><span class="lines">@@ -1707,7 +1707,7 @@
</span><span class="cx">         return unvisitedColor;
</span><span class="cx"> 
</span><span class="cx">     // Take the alpha from the unvisited color, but get the RGB values from the visited color.
</span><del>-    return Color(visitedColor.red(), visitedColor.green(), visitedColor.blue(), unvisitedColor.alpha());
</del><ins>+    return visitedColor.colorWithAlpha(unvisitedColor.alphaAsFloat());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> const BorderValue&amp; RenderStyle::borderBefore() const
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleRenderStyleh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/RenderStyle.h (208459 => 208460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/RenderStyle.h        2016-11-09 19:54:25 UTC (rev 208459)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.h        2016-11-09 19:56:17 UTC (rev 208460)
</span><span class="lines">@@ -568,7 +568,7 @@
</span><span class="cx">     bool hasBackground() const
</span><span class="cx">     {
</span><span class="cx">         Color color = visitedDependentColor(CSSPropertyBackgroundColor);
</span><del>-        if (color.isValid() &amp;&amp; color.alpha())
</del><ins>+        if (color.isVisible())
</ins><span class="cx">             return true;
</span><span class="cx">         return hasBackgroundImage();
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGResourcecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGResource.cpp (208459 => 208460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGResource.cpp        2016-11-09 19:54:25 UTC (rev 208459)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGResource.cpp        2016-11-09 19:56:17 UTC (rev 208460)
</span><span class="lines">@@ -96,7 +96,7 @@
</span><span class="cx">         if (visitedPaintType &lt; SVGPaint::SVG_PAINTTYPE_URI_NONE &amp;&amp; visitedPaintType != SVGPaint::SVG_PAINTTYPE_CURRENTCOLOR) {
</span><span class="cx">             const Color&amp; visitedColor = applyToFill ? svgStyle.visitedLinkFillPaintColor() : svgStyle.visitedLinkStrokePaintColor();
</span><span class="cx">             if (visitedColor.isValid())
</span><del>-                color = Color(visitedColor.red(), visitedColor.green(), visitedColor.blue(), color.alpha());
</del><ins>+                color = visitedColor.colorWithAlpha(color.alphaAsFloat());
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgSVGInlineTextBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/SVGInlineTextBox.cpp (208459 => 208460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/SVGInlineTextBox.cpp        2016-11-09 19:54:25 UTC (rev 208459)
+++ trunk/Source/WebCore/rendering/svg/SVGInlineTextBox.cpp        2016-11-09 19:56:17 UTC (rev 208460)
</span><span class="lines">@@ -193,7 +193,7 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     Color backgroundColor = renderer().selectionBackgroundColor();
</span><del>-    if (!backgroundColor.isValid() || !backgroundColor.alpha())
</del><ins>+    if (!backgroundColor.isVisible())
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     if (!textShouldBePainted(renderer()))
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGAnimatedColorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGAnimatedColor.cpp (208459 => 208460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGAnimatedColor.cpp        2016-11-09 19:54:25 UTC (rev 208459)
+++ trunk/Source/WebCore/svg/SVGAnimatedColor.cpp        2016-11-09 19:56:17 UTC (rev 208460)
</span><span class="lines">@@ -85,6 +85,8 @@
</span><span class="cx">     auto&amp; toAtEndOfDurationColor = toAtEndOfDuration-&gt;color();
</span><span class="cx">     auto&amp; animatedColor = animated-&gt;color();
</span><span class="cx"> 
</span><ins>+    // FIXME: ExtendedColor - this will need to handle blending between colors in different color spaces,
+    // as well as work with non [0-255] Colors.
</ins><span class="cx">     float red = animatedColor.red();
</span><span class="cx">     m_animationElement-&gt;animateAdditiveNumber(percentage, repeatCount, fromColor.red(), toColor.red(), toAtEndOfDurationColor.red(), red);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (208459 => 208460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2016-11-09 19:54:25 UTC (rev 208459)
+++ trunk/Source/WebKit2/ChangeLog        2016-11-09 19:56:17 UTC (rev 208460)
</span><span class="lines">@@ -1,3 +1,20 @@
</span><ins>+2016-11-08  Dean Jackson  &lt;dino@apple.com&gt;
+
+        Rendering support for ExtendedColors
+        https://bugs.webkit.org/show_bug.cgi?id=164443
+        &lt;rdar://problems/29123243&gt;
+
+        Reviewed by Simon Fraser and Darin Adler.
+
+        Implement argument coders for Color.
+
+        * Shared/WebCoreArgumentCoders.cpp:
+        (IPC::ArgumentCoder&lt;Color&gt;::encode):
+        (IPC::ArgumentCoder&lt;Color&gt;::decode):
+        * Shared/WebCoreArgumentCoders.h:
+        * UIProcess/API/Cocoa/WKWebView.mm:
+        (-[WKWebView _updateScrollViewBackground]):
+
</ins><span class="cx"> 2016-11-09  Beth Dakin  &lt;bdakin@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Build fix.
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebCoreArgumentCoderscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp (208459 => 208460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp        2016-11-09 19:54:25 UTC (rev 208459)
+++ trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp        2016-11-09 19:56:17 UTC (rev 208460)
</span><span class="lines">@@ -1096,6 +1096,18 @@
</span><span class="cx"> 
</span><span class="cx"> void ArgumentCoder&lt;Color&gt;::encode(Encoder&amp; encoder, const Color&amp; color)
</span><span class="cx"> {
</span><ins>+    if (color.isExtended()) {
+        encoder &lt;&lt; true;
+        encoder &lt;&lt; color.asExtended().red();
+        encoder &lt;&lt; color.asExtended().green();
+        encoder &lt;&lt; color.asExtended().blue();
+        encoder &lt;&lt; color.asExtended().alpha();
+        encoder &lt;&lt; color.asExtended().colorSpace();
+        return;
+    }
+
+    encoder &lt;&lt; false;
+
</ins><span class="cx">     if (!color.isValid()) {
</span><span class="cx">         encoder &lt;&lt; false;
</span><span class="cx">         return;
</span><span class="lines">@@ -1107,6 +1119,30 @@
</span><span class="cx"> 
</span><span class="cx"> bool ArgumentCoder&lt;Color&gt;::decode(Decoder&amp; decoder, Color&amp; color)
</span><span class="cx"> {
</span><ins>+    bool isExtended;
+    if (!decoder.decode(isExtended))
+        return false;
+
+    if (isExtended) {
+        float red;
+        float green;
+        float blue;
+        float alpha;
+        ColorSpace colorSpace;
+        if (!decoder.decode(red))
+            return false;
+        if (!decoder.decode(green))
+            return false;
+        if (!decoder.decode(blue))
+            return false;
+        if (!decoder.decode(alpha))
+            return false;
+        if (!decoder.decode(colorSpace))
+            return false;
+        color = Color(red, green, blue, alpha, colorSpace);
+        return true;
+    }
+
</ins><span class="cx">     bool isValid;
</span><span class="cx">     if (!decoder.decode(isValid))
</span><span class="cx">         return false;
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebCoreArgumentCodersh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.h (208459 => 208460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.h        2016-11-09 19:54:25 UTC (rev 208459)
+++ trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.h        2016-11-09 19:56:17 UTC (rev 208460)
</span><span class="lines">@@ -26,6 +26,7 @@
</span><span class="cx"> #pragma once
</span><span class="cx"> 
</span><span class="cx"> #include &quot;ArgumentCoders.h&quot;
</span><ins>+#include &lt;WebCore/ColorSpace.h&gt;
</ins><span class="cx"> #include &lt;WebCore/FrameLoaderTypes.h&gt;
</span><span class="cx"> #include &lt;WebCore/IndexedDB.h&gt;
</span><span class="cx"> #include &lt;WebCore/PaymentHeaders.h&gt;
</span><span class="lines">@@ -567,6 +568,16 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WTF {
</span><span class="cx"> 
</span><ins>+template&lt;&gt; struct EnumTraits&lt;WebCore::ColorSpace&gt; {
+    using values = EnumValues&lt;
+    WebCore::ColorSpace,
+    WebCore::ColorSpace::ColorSpaceDeviceRGB,
+    WebCore::ColorSpace::ColorSpaceSRGB,
+    WebCore::ColorSpace::ColorSpaceLinearRGB,
+    WebCore::ColorSpace::ColorSpaceDisplayP3
+    &gt;;
+};
+
</ins><span class="cx"> template&lt;&gt; struct EnumTraits&lt;WebCore::HasInsecureContent&gt; {
</span><span class="cx">     using values = EnumValues&lt;
</span><span class="cx">         WebCore::HasInsecureContent,
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm (208459 => 208460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm        2016-11-09 19:54:25 UTC (rev 208459)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm        2016-11-09 19:56:17 UTC (rev 208460)
</span><span class="lines">@@ -1142,7 +1142,7 @@
</span><span class="cx">     // Update the indicator style based on the lightness/darkness of the background color.
</span><span class="cx">     double hue, saturation, lightness;
</span><span class="cx">     color.getHSL(hue, saturation, lightness);
</span><del>-    if (lightness &lt;= .5 &amp;&amp; color.alpha() &gt; 0)
</del><ins>+    if (lightness &lt;= .5 &amp;&amp; color.isVisible())
</ins><span class="cx">         [_scrollView setIndicatorStyle:UIScrollViewIndicatorStyleWhite];
</span><span class="cx">     else
</span><span class="cx">         [_scrollView setIndicatorStyle:UIScrollViewIndicatorStyleDefault];
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcesscairoBackingStoreCairocpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/cairo/BackingStoreCairo.cpp (208459 => 208460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/cairo/BackingStoreCairo.cpp        2016-11-09 19:54:25 UTC (rev 208459)
+++ trunk/Source/WebKit2/UIProcess/cairo/BackingStoreCairo.cpp        2016-11-09 19:56:17 UTC (rev 208460)
</span><span class="lines">@@ -106,9 +106,9 @@
</span><span class="cx"> #if PLATFORM(GTK)
</span><span class="cx">         if (!m_webPageProxy.drawsBackground()) {
</span><span class="cx">             const WebCore::Color color = m_webPageProxy.backgroundColor();
</span><del>-            if (color.hasAlpha())
</del><ins>+            if (!color.isOpaque())
</ins><span class="cx">                 graphicsContext.clearRect(srcRect);
</span><del>-            if (color.alpha() &gt; 0)
</del><ins>+            if (color.isVisible())
</ins><span class="cx">                 graphicsContext.fillRect(srcRect, color);
</span><span class="cx">         }
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessgtkAcceleratedBackingStorecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/gtk/AcceleratedBackingStore.cpp (208459 => 208460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/gtk/AcceleratedBackingStore.cpp        2016-11-09 19:54:25 UTC (rev 208459)
+++ trunk/Source/WebKit2/UIProcess/gtk/AcceleratedBackingStore.cpp        2016-11-09 19:56:17 UTC (rev 208460)
</span><span class="lines">@@ -66,13 +66,13 @@
</span><span class="cx">         return true;
</span><span class="cx"> 
</span><span class="cx">     const WebCore::Color&amp; color = m_webPage.backgroundColor();
</span><del>-    if (color.hasAlpha()) {
</del><ins>+    if (!color.isOpaque()) {
</ins><span class="cx">         cairo_rectangle(cr, clipRect.x(), clipRect.y(), clipRect.width(), clipRect.height());
</span><span class="cx">         cairo_set_operator(cr, CAIRO_OPERATOR_CLEAR);
</span><span class="cx">         cairo_fill(cr);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (color.alpha() &gt; 0) {
</del><ins>+    if (color.isVisible()) {
</ins><span class="cx">         setSourceRGBAFromColor(cr, color);
</span><span class="cx">         cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
</span><span class="cx">         cairo_rectangle(cr, clipRect.x(), clipRect.y(), clipRect.width(), clipRect.height());
</span></span></pre>
</div>
</div>

</body>
</html>