<!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>[195699] 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/195699">195699</a></dd>
<dt>Author</dt> <dd>simon.fraser@apple.com</dd>
<dt>Date</dt> <dd>2016-01-27 15:31:38 -0800 (Wed, 27 Jan 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>Support CSS3 Images values for the image-rendering property
https://bugs.webkit.org/show_bug.cgi?id=153556
Reviewed by Dean Jackson.
Source/WebCore:
CSS3 Images has the following values for image-rendering:
auto, crisp-edges, pixelated
The old code supported:
optimizeSpeed, optimizeQuality, -webkit-crisp-edges, -webkit-optimize-contrast
Add support for the new values without prefixes. Map -webkit-crisp-edges to crisp-edges,
and -webkit-optimize-contrast to crisp-edges. Support pixelated which behaves like
crisp-edges (a low quality scale).
The spec says that optimizeQuality should behave like 'auto', but that would be
a behavior change since ImageQualityController::shouldPaintAtLowQuality() currently
uses it as a trigger to avoid low quality scaling, so don't change that for now.
No new tests, covered by fast/css/script-tests/image-rendering-parsing.js
* css/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator EImageRendering):
* css/CSSValueKeywords.in:
* rendering/ImageQualityController.cpp:
(WebCore::ImageQualityController::shouldPaintAtLowQuality):
* rendering/RenderHTMLCanvas.cpp:
(WebCore::RenderHTMLCanvas::paintReplaced):
* rendering/style/RenderStyleConstants.h:
* rendering/style/StyleRareInheritedData.h: Need another bit.
Source/WebInspectorUI:
Add "crisp-edges", "pixelated" to the suggestions for image-rendering.
* UserInterface/Models/CSSKeywordCompletions.js:
LayoutTests:
Update for new values. Add a new SVG shape-rendering test which would have
detected a bug I caused with an earlier patch.
* fast/css/image-rendering-parsing-expected.txt:
* fast/css/script-tests/image-rendering-parsing.js:
* svg/css/script-tests/shape-rendering-parsing.js: Added.
* svg/css/shape-rendering-parsing.html: Added.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfastcssimagerenderingparsingexpectedtxt">trunk/LayoutTests/fast/css/image-rendering-parsing-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcssscripttestsimagerenderingparsingjs">trunk/LayoutTests/fast/css/script-tests/image-rendering-parsing.js</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecssCSSParsercpp">trunk/Source/WebCore/css/CSSParser.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSPrimitiveValueMappingsh">trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSValueKeywordsin">trunk/Source/WebCore/css/CSSValueKeywords.in</a></li>
<li><a href="#trunkSourceWebCorerenderingImageQualityControllercpp">trunk/Source/WebCore/rendering/ImageQualityController.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderHTMLCanvascpp">trunk/Source/WebCore/rendering/RenderHTMLCanvas.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleRenderStyleConstantsh">trunk/Source/WebCore/rendering/style/RenderStyleConstants.h</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleStyleRareInheritedDatah">trunk/Source/WebCore/rendering/style/StyleRareInheritedData.h</a></li>
<li><a href="#trunkSourceWebInspectorUIChangeLog">trunk/Source/WebInspectorUI/ChangeLog</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceModelsCSSKeywordCompletionsjs">trunk/Source/WebInspectorUI/UserInterface/Models/CSSKeywordCompletions.js</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestssvgcssscripttestsshaperenderingparsingjs">trunk/LayoutTests/svg/css/script-tests/shape-rendering-parsing.js</a></li>
<li><a href="#trunkLayoutTestssvgcssshaperenderingparsingexpectedtxt">trunk/LayoutTests/svg/css/shape-rendering-parsing-expected.txt</a></li>
<li><a href="#trunkLayoutTestssvgcssshaperenderingparsinghtml">trunk/LayoutTests/svg/css/shape-rendering-parsing.html</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (195698 => 195699)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-01-27 23:12:31 UTC (rev 195698)
+++ trunk/LayoutTests/ChangeLog        2016-01-27 23:31:38 UTC (rev 195699)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2016-01-27 Simon Fraser <simon.fraser@apple.com>
+
+ Support CSS3 Images values for the image-rendering property
+ https://bugs.webkit.org/show_bug.cgi?id=153556
+
+ Reviewed by Dean Jackson.
+
+ Update for new values. Add a new SVG shape-rendering test which would have
+ detected a bug I caused with an earlier patch.
+
+ * fast/css/image-rendering-parsing-expected.txt:
+ * fast/css/script-tests/image-rendering-parsing.js:
+ * svg/css/script-tests/shape-rendering-parsing.js: Added.
+ * svg/css/shape-rendering-parsing.html: Added.
+
</ins><span class="cx"> 2016-01-27 Brady Eidson <beidson@apple.com>
</span><span class="cx">
</span><span class="cx"> Modern IDB: Fix many Index tests.
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssimagerenderingparsingexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css/image-rendering-parsing-expected.txt (195698 => 195699)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/image-rendering-parsing-expected.txt        2016-01-27 23:12:31 UTC (rev 195698)
+++ trunk/LayoutTests/fast/css/image-rendering-parsing-expected.txt        2016-01-27 23:31:38 UTC (rev 195699)
</span><span class="lines">@@ -7,11 +7,17 @@
</span><span class="cx"> PASS div.style.getPropertyValue('image-rendering') is "auto"
</span><span class="cx"> PASS getComputedStyle(div).getPropertyValue('image-rendering') is "auto"
</span><span class="cx"> PASS div.style.getPropertyCSSValue('image-rendering').cssValueType is CSSValue.CSS_PRIMITIVE_VALUE
</span><ins>+PASS div.style.getPropertyValue('image-rendering') is "crisp-edges"
+PASS getComputedStyle(div).getPropertyValue('image-rendering') is "crisp-edges"
+PASS div.style.getPropertyCSSValue('image-rendering').cssValueType is CSSValue.CSS_PRIMITIVE_VALUE
+PASS div.style.getPropertyValue('image-rendering') is "pixelated"
+PASS getComputedStyle(div).getPropertyValue('image-rendering') is "pixelated"
+PASS div.style.getPropertyCSSValue('image-rendering').cssValueType is CSSValue.CSS_PRIMITIVE_VALUE
</ins><span class="cx"> PASS div.style.getPropertyValue('image-rendering') is "-webkit-crisp-edges"
</span><del>-PASS getComputedStyle(div).getPropertyValue('image-rendering') is "-webkit-crisp-edges"
</del><ins>+PASS getComputedStyle(div).getPropertyValue('image-rendering') is "crisp-edges"
</ins><span class="cx"> PASS div.style.getPropertyCSSValue('image-rendering').cssValueType is CSSValue.CSS_PRIMITIVE_VALUE
</span><span class="cx"> PASS div.style.getPropertyValue('image-rendering') is "-webkit-optimize-contrast"
</span><del>-PASS getComputedStyle(div).getPropertyValue('image-rendering') is "-webkit-crisp-edges"
</del><ins>+PASS getComputedStyle(div).getPropertyValue('image-rendering') is "crisp-edges"
</ins><span class="cx"> PASS div.style.getPropertyCSSValue('image-rendering').cssValueType is CSSValue.CSS_PRIMITIVE_VALUE
</span><span class="cx"> PASS div.style.getPropertyValue('image-rendering') is "optimizespeed"
</span><span class="cx"> PASS getComputedStyle(div).getPropertyValue('image-rendering') is "optimizespeed"
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssscripttestsimagerenderingparsingjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css/script-tests/image-rendering-parsing.js (195698 => 195699)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/script-tests/image-rendering-parsing.js        2016-01-27 23:12:31 UTC (rev 195698)
+++ trunk/LayoutTests/fast/css/script-tests/image-rendering-parsing.js        2016-01-27 23:31:38 UTC (rev 195699)
</span><span class="lines">@@ -14,8 +14,10 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> testImageRendering('auto', 'auto');
</span><del>-testImageRendering('-webkit-crisp-edges', '-webkit-crisp-edges');
-testImageRendering('-webkit-optimize-contrast', '-webkit-crisp-edges');
</del><ins>+testImageRendering('crisp-edges', 'crisp-edges');
+testImageRendering('pixelated', 'pixelated');
+testImageRendering('-webkit-crisp-edges', 'crisp-edges');
+testImageRendering('-webkit-optimize-contrast', 'crisp-edges');
</ins><span class="cx"> testImageRendering('optimizespeed', 'optimizespeed');
</span><span class="cx"> testImageRendering('optimizequality', 'optimizequality');
</span><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestssvgcssscripttestsshaperenderingparsingjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/svg/css/script-tests/shape-rendering-parsing.js (0 => 195699)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/css/script-tests/shape-rendering-parsing.js         (rev 0)
+++ trunk/LayoutTests/svg/css/script-tests/shape-rendering-parsing.js        2016-01-27 23:31:38 UTC (rev 195699)
</span><span class="lines">@@ -0,0 +1,24 @@
</span><ins>+description("Tests the parsing of shape-rendering property values")
+createSVGTestCase();
+
+var group = createSVGElement("g");
+rootSVGElement.appendChild(group);
+
+// Test initial value of font-length.
+shouldBeEqualToString("document.defaultView.getComputedStyle(group, null).shapeRendering", "auto");
+
+group.setAttribute("shape-rendering", "crispEdges");
+shouldBeEqualToString("document.defaultView.getComputedStyle(group, null).shapeRendering", "crispedges");
+
+group.setAttribute("shape-rendering", "crispedges");
+shouldBeEqualToString("document.defaultView.getComputedStyle(group, null).shapeRendering", "crispedges");
+
+group.setAttribute("shape-rendering", "optimizeSpeed");
+shouldBeEqualToString("document.defaultView.getComputedStyle(group, null).shapeRendering", "optimizespeed");
+
+group.setAttribute("shape-rendering", "geometricPrecision");
+shouldBeEqualToString("document.defaultView.getComputedStyle(group, null).shapeRendering", "geometricprecision");
+
+var successfullyParsed = true;
+
+completeTest();
</ins></span></pre></div>
<a id="trunkLayoutTestssvgcssshaperenderingparsingexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/svg/css/shape-rendering-parsing-expected.txt (0 => 195699)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/css/shape-rendering-parsing-expected.txt         (rev 0)
+++ trunk/LayoutTests/svg/css/shape-rendering-parsing-expected.txt        2016-01-27 23:31:38 UTC (rev 195699)
</span><span class="lines">@@ -0,0 +1,14 @@
</span><ins>+Tests the parsing of shape-rendering property values
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS document.defaultView.getComputedStyle(group, null).shapeRendering is "auto"
+PASS document.defaultView.getComputedStyle(group, null).shapeRendering is "crispedges"
+PASS document.defaultView.getComputedStyle(group, null).shapeRendering is "crispedges"
+PASS document.defaultView.getComputedStyle(group, null).shapeRendering is "optimizespeed"
+PASS document.defaultView.getComputedStyle(group, null).shapeRendering is "geometricprecision"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestssvgcssshaperenderingparsinghtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/svg/css/shape-rendering-parsing.html (0 => 195699)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/css/shape-rendering-parsing.html         (rev 0)
+++ trunk/LayoutTests/svg/css/shape-rendering-parsing.html        2016-01-27 23:31:38 UTC (rev 195699)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+<script src="../../svg/dynamic-updates/resources/SVGTestCase.js"></script>
+<script src="../../resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/shape-rendering-parsing.js"></script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (195698 => 195699)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-01-27 23:12:31 UTC (rev 195698)
+++ trunk/Source/WebCore/ChangeLog        2016-01-27 23:31:38 UTC (rev 195699)
</span><span class="lines">@@ -1,3 +1,39 @@
</span><ins>+2016-01-27 Simon Fraser <simon.fraser@apple.com>
+
+ Support CSS3 Images values for the image-rendering property
+ https://bugs.webkit.org/show_bug.cgi?id=153556
+
+ Reviewed by Dean Jackson.
+
+ CSS3 Images has the following values for image-rendering:
+ auto, crisp-edges, pixelated
+
+ The old code supported:
+ optimizeSpeed, optimizeQuality, -webkit-crisp-edges, -webkit-optimize-contrast
+
+ Add support for the new values without prefixes. Map -webkit-crisp-edges to crisp-edges,
+ and -webkit-optimize-contrast to crisp-edges. Support pixelated which behaves like
+ crisp-edges (a low quality scale).
+
+ The spec says that optimizeQuality should behave like 'auto', but that would be
+ a behavior change since ImageQualityController::shouldPaintAtLowQuality() currently
+ uses it as a trigger to avoid low quality scaling, so don't change that for now.
+
+ No new tests, covered by fast/css/script-tests/image-rendering-parsing.js
+
+ * css/CSSParser.cpp:
+ (WebCore::isValidKeywordPropertyAndValue):
+ * css/CSSPrimitiveValueMappings.h:
+ (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
+ (WebCore::CSSPrimitiveValue::operator EImageRendering):
+ * css/CSSValueKeywords.in:
+ * rendering/ImageQualityController.cpp:
+ (WebCore::ImageQualityController::shouldPaintAtLowQuality):
+ * rendering/RenderHTMLCanvas.cpp:
+ (WebCore::RenderHTMLCanvas::paintReplaced):
+ * rendering/style/RenderStyleConstants.h:
+ * rendering/style/StyleRareInheritedData.h: Need another bit.
+
</ins><span class="cx"> 2016-01-27 Anders Carlsson <andersca@apple.com>
</span><span class="cx">
</span><span class="cx"> Add WebKitAdditions extension points to WebCore, WebKit and WebKitLegacy
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSParser.cpp (195698 => 195699)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSParser.cpp        2016-01-27 23:12:31 UTC (rev 195698)
+++ trunk/Source/WebCore/css/CSSParser.cpp        2016-01-27 23:31:38 UTC (rev 195699)
</span><span class="lines">@@ -706,9 +706,10 @@
</span><span class="cx"> if (valueID == CSSValueNormal || valueID == CSSValueItalic || valueID == CSSValueOblique)
</span><span class="cx"> return true;
</span><span class="cx"> break;
</span><del>- case CSSPropertyImageRendering: // auto | optimizeSpeed | optimizeQuality | -webkit-crisp-edges | -webkit-optimize-contrast
</del><ins>+ case CSSPropertyImageRendering: // auto | optimizeSpeed | optimizeQuality | -webkit-crisp-edges | -webkit-optimize-contrast | crisp-edges | pixelated
+ // optimizeSpeed and optimizeQuality are deprecated; a user agent must accept them as valid values but must treat them as having the same behavior as pixelated and auto respectively.
</ins><span class="cx"> if (valueID == CSSValueAuto || valueID == CSSValueOptimizespeed || valueID == CSSValueOptimizequality
</span><del>- || valueID == CSSValueWebkitCrispEdges || valueID == CSSValueWebkitOptimizeContrast)
</del><ins>+ || valueID == CSSValueWebkitCrispEdges || valueID == CSSValueWebkitOptimizeContrast || valueID == CSSValueCrispEdges || valueID == CSSValuePixelated)
</ins><span class="cx"> return true;
</span><span class="cx"> break;
</span><span class="cx"> case CSSPropertyListStylePosition: // inside | outside | inherit
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSPrimitiveValueMappingsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h (195698 => 195699)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h        2016-01-27 23:12:31 UTC (rev 195698)
+++ trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h        2016-01-27 23:31:38 UTC (rev 195699)
</span><span class="lines">@@ -4321,17 +4321,20 @@
</span><span class="cx"> return BorderFitLines;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EImageRendering e)
</del><ins>+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EImageRendering imageRendering)
</ins><span class="cx"> : CSSValue(PrimitiveClass)
</span><span class="cx"> {
</span><span class="cx"> m_primitiveUnitType = CSS_VALUE_ID;
</span><del>- switch (e) {
</del><ins>+ switch (imageRendering) {
</ins><span class="cx"> case ImageRenderingAuto:
</span><span class="cx"> m_value.valueID = CSSValueAuto;
</span><span class="cx"> break;
</span><span class="cx"> case ImageRenderingCrispEdges:
</span><del>- m_value.valueID = CSSValueWebkitCrispEdges;
</del><ins>+ m_value.valueID = CSSValueCrispEdges;
</ins><span class="cx"> break;
</span><ins>+ case ImageRenderingPixelated:
+ m_value.valueID = CSSValuePixelated;
+ break;
</ins><span class="cx"> case ImageRenderingOptimizeSpeed:
</span><span class="cx"> m_value.valueID = CSSValueOptimizespeed;
</span><span class="cx"> break;
</span><span class="lines">@@ -4349,8 +4352,11 @@
</span><span class="cx"> case CSSValueAuto:
</span><span class="cx"> return ImageRenderingAuto;
</span><span class="cx"> case CSSValueWebkitOptimizeContrast:
</span><ins>+ case CSSValueCrispEdges:
</ins><span class="cx"> case CSSValueWebkitCrispEdges:
</span><span class="cx"> return ImageRenderingCrispEdges;
</span><ins>+ case CSSValuePixelated:
+ return ImageRenderingPixelated;
</ins><span class="cx"> case CSSValueOptimizespeed:
</span><span class="cx"> return ImageRenderingOptimizeSpeed;
</span><span class="cx"> case CSSValueOptimizequality:
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSValueKeywordsin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSValueKeywords.in (195698 => 195699)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSValueKeywords.in        2016-01-27 23:12:31 UTC (rev 195698)
+++ trunk/Source/WebCore/css/CSSValueKeywords.in        2016-01-27 23:31:38 UTC (rev 195699)
</span><span class="lines">@@ -1050,8 +1050,10 @@
</span><span class="cx">
</span><span class="cx"> // image-rendering
</span><span class="cx"> // auto
</span><del>-// optimizeSpeed
-optimizeQuality
</del><ins>+// optimizeSpeed (deprecated)
+optimizeQuality // ( deprecated)
+crisp-edges
+pixelated
</ins><span class="cx"> -webkit-crisp-edges
</span><span class="cx"> -webkit-optimize-contrast
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingImageQualityControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/ImageQualityController.cpp (195698 => 195699)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/ImageQualityController.cpp        2016-01-27 23:12:31 UTC (rev 195698)
+++ trunk/Source/WebCore/rendering/ImageQualityController.cpp        2016-01-27 23:31:38 UTC (rev 195699)
</span><span class="lines">@@ -109,9 +109,10 @@
</span><span class="cx"> switch (object->style().imageRendering()) {
</span><span class="cx"> case ImageRenderingOptimizeSpeed:
</span><span class="cx"> case ImageRenderingCrispEdges:
</span><ins>+ case ImageRenderingPixelated:
</ins><span class="cx"> return true;
</span><span class="cx"> case ImageRenderingOptimizeQuality:
</span><del>- return false;
</del><ins>+ return false; // FIXME: CSS 3 Images says that optimizeQuality should behave like 'auto', but that prevents authors from overriding this low quality rendering behavior.
</ins><span class="cx"> case ImageRenderingAuto:
</span><span class="cx"> break;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderHTMLCanvascpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderHTMLCanvas.cpp (195698 => 195699)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderHTMLCanvas.cpp        2016-01-27 23:12:31 UTC (rev 195698)
+++ trunk/Source/WebCore/rendering/RenderHTMLCanvas.cpp        2016-01-27 23:31:38 UTC (rev 195699)
</span><span class="lines">@@ -84,7 +84,7 @@
</span><span class="cx"> page->addRelevantRepaintedObject(this, intersection(replacedContentRect, contentBoxRect));
</span><span class="cx"> }
</span><span class="cx">
</span><del>- bool useLowQualityScale = style().imageRendering() == ImageRenderingCrispEdges || style().imageRendering() == ImageRenderingOptimizeSpeed;
</del><ins>+ bool useLowQualityScale = style().imageRendering() == ImageRenderingCrispEdges || style().imageRendering() == ImageRenderingPixelated || style().imageRendering() == ImageRenderingOptimizeSpeed;
</ins><span class="cx"> canvasElement().paint(context, replacedContentRect, useLowQualityScale);
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleRenderStyleConstantsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/RenderStyleConstants.h (195698 => 195699)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/RenderStyleConstants.h        2016-01-27 23:12:31 UTC (rev 195698)
+++ trunk/Source/WebCore/rendering/style/RenderStyleConstants.h        2016-01-27 23:31:38 UTC (rev 195699)
</span><span class="lines">@@ -593,7 +593,13 @@
</span><span class="cx">
</span><span class="cx"> enum TextOverflow { TextOverflowClip = 0, TextOverflowEllipsis };
</span><span class="cx">
</span><del>-enum EImageRendering { ImageRenderingAuto = 0, ImageRenderingOptimizeSpeed, ImageRenderingOptimizeQuality, ImageRenderingCrispEdges };
</del><ins>+enum EImageRendering {
+ ImageRenderingAuto = 0,
+ ImageRenderingOptimizeSpeed,
+ ImageRenderingOptimizeQuality,
+ ImageRenderingCrispEdges,
+ ImageRenderingPixelated
+};
</ins><span class="cx">
</span><span class="cx"> enum ImageResolutionSource { ImageResolutionSpecified = 0, ImageResolutionFromImage };
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleStyleRareInheritedDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/StyleRareInheritedData.h (195698 => 195699)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/StyleRareInheritedData.h        2016-01-27 23:12:31 UTC (rev 195698)
+++ trunk/Source/WebCore/rendering/style/StyleRareInheritedData.h        2016-01-27 23:31:38 UTC (rev 195699)
</span><span class="lines">@@ -110,7 +110,7 @@
</span><span class="cx"> #if ENABLE(CSS_IMAGE_ORIENTATION)
</span><span class="cx"> unsigned m_imageOrientation : 4; // ImageOrientationEnum
</span><span class="cx"> #endif
</span><del>- unsigned m_imageRendering : 2; // EImageRendering
</del><ins>+ unsigned m_imageRendering : 3; // EImageRendering
</ins><span class="cx"> unsigned m_lineSnap : 2; // LineSnap
</span><span class="cx"> unsigned m_lineAlign : 1; // LineAlign
</span><span class="cx"> #if ENABLE(ACCELERATED_OVERFLOW_SCROLLING)
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/ChangeLog (195698 => 195699)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/ChangeLog        2016-01-27 23:12:31 UTC (rev 195698)
+++ trunk/Source/WebInspectorUI/ChangeLog        2016-01-27 23:31:38 UTC (rev 195699)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2016-01-27 Simon Fraser <simon.fraser@apple.com>
+
+ Support CSS3 Images values for the image-rendering property
+ https://bugs.webkit.org/show_bug.cgi?id=153556
+
+ Reviewed by Dean Jackson.
+
+ Add "crisp-edges", "pixelated" to the suggestions for image-rendering.
+
+ * UserInterface/Models/CSSKeywordCompletions.js:
+
</ins><span class="cx"> 2016-01-26 Joseph Pecoraro <pecoraro@apple.com>
</span><span class="cx">
</span><span class="cx"> Web Inspector: Remove unused FramesLarge.png variants, only the smaller Frames icon is used for the Rendering Frames timeline
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceModelsCSSKeywordCompletionsjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Models/CSSKeywordCompletions.js (195698 => 195699)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Models/CSSKeywordCompletions.js        2016-01-27 23:12:31 UTC (rev 195698)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/CSSKeywordCompletions.js        2016-01-27 23:31:38 UTC (rev 195699)
</span><span class="lines">@@ -392,7 +392,7 @@
</span><span class="cx"> "flex", "inline-flex", "-webkit-grid", "-webkit-inline-grid"
</span><span class="cx"> ],
</span><span class="cx"> "image-rendering": [
</span><del>- "auto", "optimizeSpeed", "optimizeQuality", "-webkit-crisp-edges", "-webkit-optimize-contrast"
</del><ins>+ "auto", "optimizeSpeed", "optimizeQuality", "-webkit-crisp-edges", "-webkit-optimize-contrast", "crisp-edges", "pixelated"
</ins><span class="cx"> ],
</span><span class="cx"> "alignment-baseline": [
</span><span class="cx"> "baseline", "middle", "auto", "before-edge", "after-edge", "central", "text-before-edge", "text-after-edge",
</span></span></pre>
</div>
</div>
</body>
</html>