<!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>[193418] branches/safari-601-branch</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/193418">193418</a></dd>
<dt>Author</dt> <dd>matthew_hanson@apple.com</dd>
<dt>Date</dt> <dd>2015-12-04 09:10:26 -0800 (Fri, 04 Dec 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Merge <a href="http://trac.webkit.org/projects/webkit/changeset/190383">r190383</a>. rdar://problem/23732393</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari601branchLayoutTestsChangeLog">branches/safari-601-branch/LayoutTests/ChangeLog</a></li>
<li><a href="#branchessafari601branchSourceWebCoreChangeLog">branches/safari-601-branch/Source/WebCore/ChangeLog</a></li>
<li><a href="#branchessafari601branchSourceWebCorehtmlcanvasCanvasRenderingContext2Dcpp">branches/safari-601-branch/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp</a></li>
<li><a href="#branchessafari601branchSourceWebCorehtmlcanvasCanvasRenderingContext2Dh">branches/safari-601-branch/Source/WebCore/html/canvas/CanvasRenderingContext2D.h</a></li>
<li><a href="#branchessafari601branchSourceWebCorehtmlcanvasCanvasRenderingContext2Didl">branches/safari-601-branch/Source/WebCore/html/canvas/CanvasRenderingContext2D.idl</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#branchessafari601branchLayoutTestsfastcanvascanvasimageSmoothingQualityexpectedtxt">branches/safari-601-branch/LayoutTests/fast/canvas/canvas-imageSmoothingQuality-expected.txt</a></li>
<li><a href="#branchessafari601branchLayoutTestsfastcanvascanvasimageSmoothingQualityhtml">branches/safari-601-branch/LayoutTests/fast/canvas/canvas-imageSmoothingQuality.html</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari601branchLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/LayoutTests/ChangeLog (193417 => 193418)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/LayoutTests/ChangeLog        2015-12-04 17:10:22 UTC (rev 193417)
+++ branches/safari-601-branch/LayoutTests/ChangeLog        2015-12-04 17:10:26 UTC (rev 193418)
</span><span class="lines">@@ -1,5 +1,22 @@
</span><span class="cx"> 2015-12-03 Matthew Hanson <matthew_hanson@apple.com>
</span><span class="cx">
</span><ins>+ Merge r190383. rdar://problem/23732393
+
+ 2015-09-30 Katlyn Graff <kgraff@apple.com>
+
+ Tests support for imageSmoothingQuality attribute of Canvas element.
+ https://bugs.webkit.org/show_bug.cgi?id=149541
+
+ Reviewed by Ryosuke Niwa.
+
+ Tests low, medium, high, and default values, value persistence when
+ imageSmoothingEnabled is changed, and invalid input.
+
+ * fast/canvas/canvas-imageSmoothingQuality-expected.txt: Added.
+ * fast/canvas/canvas-imageSmoothingQuality.html: Added.
+
+2015-12-03 Matthew Hanson <matthew_hanson@apple.com>
+
</ins><span class="cx"> Merge r188194. rdar://problem/23732393
</span><span class="cx">
</span><span class="cx"> 2015-08-08 Dean Jackson <dino@apple.com>
</span></span></pre></div>
<a id="branchessafari601branchLayoutTestsfastcanvascanvasimageSmoothingQualityexpectedtxt"></a>
<div class="addfile"><h4>Added: branches/safari-601-branch/LayoutTests/fast/canvas/canvas-imageSmoothingQuality-expected.txt (0 => 193418)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/LayoutTests/fast/canvas/canvas-imageSmoothingQuality-expected.txt         (rev 0)
+++ branches/safari-601-branch/LayoutTests/fast/canvas/canvas-imageSmoothingQuality-expected.txt        2015-12-04 17:10:26 UTC (rev 193418)
</span><span class="lines">@@ -0,0 +1,40 @@
</span><ins>+Tests for the imageSmoothingQuality attribute.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+
+PASS lowContext.imageSmoothingQuality is 'low'
+PASS mediumContext.imageSmoothingQuality is 'medium'
+PASS highContext.imageSmoothingQuality is 'high'
+
+PASS lowData is not mediumData
+PASS mediumData is not highData
+PASS lowData is not highData
+
+PASS sampleAlpha(lowData) is >= sampleAlpha(mediumData)
+PASS sampleAlpha(mediumData) is >= sampleAlpha(highData)
+
+PASS defaultContext.imageSmoothingQuality is 'low'
+
+PASS highContext.imageSmoothingEnabled = false; highContext.imageSmoothingQuality is 'high'
+PASS highContext.imageSmoothingQuality = 'medium'; highContext.imageSmoothingQuality is 'medium'
+
+highContext.imageSmoothingEnabled = true; highContext.imageSmoothingQuality = 'high';
+PASS scaleImageData(highCanvas, '3223') did not throw exception.
+PASS highContext.imageSmoothingQuality is 'high'
+PASS scaleImageData(highCanvas, 'bad_input') did not throw exception.
+PASS highContext.imageSmoothingQuality is 'high'
+PASS scaleImageData(highCanvas, 'LOW') did not throw exception.
+PASS highContext.imageSmoothingQuality is 'high'
+PASS scaleImageData(highCanvas, 'Medium') did not throw exception.
+PASS highContext.imageSmoothingQuality is 'high'
+
+highContext.save(); highContext.imageSmoothingQuality = 'medium';
+PASS highContext.restore(); highContext.imageSmoothingQuality is 'high'
+PASS scaleImageData(highCanvas, highCanvas.imageSmoothingQuality); is highData
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="branchessafari601branchLayoutTestsfastcanvascanvasimageSmoothingQualityhtml"></a>
<div class="addfile"><h4>Added: branches/safari-601-branch/LayoutTests/fast/canvas/canvas-imageSmoothingQuality.html (0 => 193418)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/LayoutTests/fast/canvas/canvas-imageSmoothingQuality.html         (rev 0)
+++ branches/safari-601-branch/LayoutTests/fast/canvas/canvas-imageSmoothingQuality.html        2015-12-04 17:10:26 UTC (rev 193418)
</span><span class="lines">@@ -0,0 +1,114 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<body>
+
+<script src="../../resources/js-test.js"></script>
+<canvas id="source"></canvas>
+
+<script>
+
+description("Tests for the imageSmoothingQuality attribute.");
+
+if (window.testRunner)
+ testRunner.overridePreference("WebKitCanvasUsesAcceleratedDrawing", 0);
+
+var source = document.getElementById("source");
+source.width = 60;
+source.height = 12;
+var sourceContext = source.getContext("2d");
+var sourceImage = sourceContext.createImageData(source.width, source.height);
+
+function drawBlackDot(x, y) {
+ var offset = y * 4 * source.width + x * 4;
+ sourceImage.data[offset + 0] = 0; // R
+ sourceImage.data[offset + 1] = 0; // G
+ sourceImage.data[offset + 2] = 0; // B
+ sourceImage.data[offset + 3] = 255; // Alpha
+}
+
+for (var x = 0; x < source.width; x++) {
+ drawBlackDot(x, 1)
+ drawBlackDot(x, 2);
+}
+
+sourceContext.putImageData(sourceImage, 0, 0);
+
+function scaleTestResults(quality){
+        var canvas = document.createElement("canvas");
+        canvas.id = quality + "Canvas";
+        document.body.appendChild(canvas);
+        canvas.width = sourceImage.width / 4;
+ canvas.height = sourceImage.height / 4;
+ return scaleImageData(canvas, quality);
+}
+
+function scaleImageData(destinationCanvas, quality) {
+ var context = destinationCanvas.getContext("2d");
+
+ if (quality)
+ context.imageSmoothingQuality = quality;
+
+ context.drawImage(source, 0, 0, destinationCanvas.width, destinationCanvas.height);
+ var data = context.getImageData(0, 0, 1, 1).data;
+ context.clearRect(0, 0, destinationCanvas.width, destinationCanvas.height);
+ return JSON.stringify(data);
+}
+
+function testInvalidInput(badInput){
+        shouldNotThrow(badInput);
+        shouldBe("highContext.imageSmoothingQuality", "'high'");
+}
+
+function sampleAlpha(data){
+        return data[3];
+}
+
+debug("");
+
+var lowData = scaleTestResults("low");
+var lowContext = document.getElementById("lowCanvas").getContext('2d');
+shouldBe("lowContext.imageSmoothingQuality", "'low'");
+
+var mediumData = scaleTestResults("medium");
+var mediumContext = document.getElementById("mediumCanvas").getContext('2d');
+shouldBe("mediumContext.imageSmoothingQuality", "'medium'");
+
+var highData = scaleTestResults("high");
+var highContext = document.getElementById("highCanvas").getContext('2d');
+shouldBe("highContext.imageSmoothingQuality", "'high'");
+
+debug("");
+shouldNotBe("lowData", "mediumData");
+shouldNotBe("mediumData", "highData");
+shouldNotBe("lowData", "highData");
+
+debug("");
+shouldBeGreaterThanOrEqual("sampleAlpha(lowData)", "sampleAlpha(mediumData)");
+shouldBeGreaterThanOrEqual("sampleAlpha(mediumData)", "sampleAlpha(highData)");
+
+debug("");
+var defaultContext = sourceContext;
+shouldBe("defaultContext.imageSmoothingQuality", "'low'");
+
+debug("");
+shouldBe("highContext.imageSmoothingEnabled = false; highContext.imageSmoothingQuality", "'high'");
+shouldBe("highContext.imageSmoothingQuality = 'medium'; highContext.imageSmoothingQuality", "'medium'");
+
+debug("");
+evalAndLog("highContext.imageSmoothingEnabled = true; highContext.imageSmoothingQuality = 'high';");
+var highCanvas = document.getElementById("highCanvas");
+testInvalidInput("scaleImageData(highCanvas, '3223')");
+testInvalidInput("scaleImageData(highCanvas, 'bad_input')");
+testInvalidInput("scaleImageData(highCanvas, 'LOW')");
+testInvalidInput("scaleImageData(highCanvas, 'Medium')");
+
+debug("");
+evalAndLog("highContext.save(); highContext.imageSmoothingQuality = 'medium';");
+shouldBe("highContext.restore(); highContext.imageSmoothingQuality", "'high'");
+shouldBe("scaleImageData(highCanvas, highCanvas.imageSmoothingQuality);", "highData");
+
+debug("");
+
+</script>
+</body>
+</html>
</ins></span></pre></div>
<a id="branchessafari601branchSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/ChangeLog (193417 => 193418)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/ChangeLog        2015-12-04 17:10:22 UTC (rev 193417)
+++ branches/safari-601-branch/Source/WebCore/ChangeLog        2015-12-04 17:10:26 UTC (rev 193418)
</span><span class="lines">@@ -1,5 +1,33 @@
</span><span class="cx"> 2015-12-03 Matthew Hanson <matthew_hanson@apple.com>
</span><span class="cx">
</span><ins>+ Merge r190383. rdar://problem/23732393
+
+ 2015-09-30 Katlyn Graff <kgraff@apple.com>
+
+ Add support for the imageSmoothingQuality property for CanvasRenderingContext2D.
+ https://bugs.webkit.org/show_bug.cgi?id=149541
+
+ Reviewed by Ryosuke Niwa.
+
+ As documented here: https://html.spec.whatwg.org/multipage/scripting.html#image-smoothing
+ Exposes the smooothing quality of algorithms used for scaling images. Valid input
+ values are low, medium, and high: associated algorithms are expected to vary for
+ differing hardware. setImageSmoothingQuality provides a handle into CGInterpolationQuality.
+
+ Test: fast/canvas/canvas-imageSmoothingQuality.html
+
+ * html/canvas/CanvasRenderingContext2D.cpp:
+ (WebCore::CanvasRenderingContext2D::State::State):
+ (WebCore::CanvasRenderingContext2D::State::operator=):
+ (WebCore::smoothingToInterpolationQuality):
+ (WebCore::CanvasRenderingContext2D::imageSmoothingQuality):
+ (WebCore::CanvasRenderingContext2D::setImageSmoothingQuality):
+ (WebCore::CanvasRenderingContext2D::setImageSmoothingEnabled):
+ * html/canvas/CanvasRenderingContext2D.h:
+ * html/canvas/CanvasRenderingContext2D.idl:
+
+2015-12-03 Matthew Hanson <matthew_hanson@apple.com>
+
</ins><span class="cx"> Merge r189427. rdar://problem/23732393
</span><span class="cx">
</span><span class="cx"> 2015-09-04 Myles C. Maxfield <mmaxfield@apple.com>
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCorehtmlcanvasCanvasRenderingContext2Dcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp (193417 => 193418)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp        2015-12-04 17:10:22 UTC (rev 193417)
+++ branches/safari-601-branch/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp        2015-12-04 17:10:26 UTC (rev 193418)
</span><span class="lines">@@ -42,7 +42,6 @@
</span><span class="cx"> #include "DOMPath.h"
</span><span class="cx"> #include "ExceptionCodePlaceholder.h"
</span><span class="cx"> #include "FloatQuad.h"
</span><del>-#include "GraphicsContext.h"
</del><span class="cx"> #include "HTMLImageElement.h"
</span><span class="cx"> #include "HTMLVideoElement.h"
</span><span class="cx"> #include "ImageData.h"
</span><span class="lines">@@ -173,6 +172,7 @@
</span><span class="cx"> , hasInvertibleTransform(true)
</span><span class="cx"> , lineDashOffset(0)
</span><span class="cx"> , imageSmoothingEnabled(true)
</span><ins>+ , imageSmoothingQuality(SmoothingQuality::Low)
</ins><span class="cx"> , textAlign(StartTextAlign)
</span><span class="cx"> , textBaseline(AlphabeticTextBaseline)
</span><span class="cx"> , direction(Direction::Inherit)
</span><span class="lines">@@ -199,6 +199,7 @@
</span><span class="cx"> , hasInvertibleTransform(other.hasInvertibleTransform)
</span><span class="cx"> , lineDashOffset(other.lineDashOffset)
</span><span class="cx"> , imageSmoothingEnabled(other.imageSmoothingEnabled)
</span><ins>+ , imageSmoothingQuality(other.imageSmoothingQuality)
</ins><span class="cx"> , textAlign(other.textAlign)
</span><span class="cx"> , textBaseline(other.textBaseline)
</span><span class="cx"> , direction(other.direction)
</span><span class="lines">@@ -229,6 +230,7 @@
</span><span class="cx"> transform = other.transform;
</span><span class="cx"> hasInvertibleTransform = other.hasInvertibleTransform;
</span><span class="cx"> imageSmoothingEnabled = other.imageSmoothingEnabled;
</span><ins>+ imageSmoothingQuality = other.imageSmoothingQuality;
</ins><span class="cx"> textAlign = other.textAlign;
</span><span class="cx"> textBaseline = other.textBaseline;
</span><span class="cx"> direction = other.direction;
</span><span class="lines">@@ -2526,6 +2528,63 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+static InterpolationQuality smoothingToInterpolationQuality(CanvasRenderingContext2D::SmoothingQuality quality)
+{
+ switch (quality) {
+ case CanvasRenderingContext2D::SmoothingQuality::Low:
+ return InterpolationLow;
+ case CanvasRenderingContext2D::SmoothingQuality::Medium:
+ return InterpolationMedium;
+ case CanvasRenderingContext2D::SmoothingQuality::High:
+ return InterpolationHigh;
+ }
+
+ ASSERT_NOT_REACHED();
+ return InterpolationLow;
+};
+
+String CanvasRenderingContext2D::imageSmoothingQuality() const
+{
+ switch (state().imageSmoothingQuality) {
+ case SmoothingQuality::Low:
+ return ASCIILiteral("low");
+ case SmoothingQuality::Medium:
+ return ASCIILiteral("medium");
+ case SmoothingQuality::High:
+ return ASCIILiteral("high");
+ }
+
+ ASSERT_NOT_REACHED();
+ return ASCIILiteral("low");
+}
+
+void CanvasRenderingContext2D::setImageSmoothingQuality(const String& smoothingQualityString)
+{
+ SmoothingQuality quality;
+ if (smoothingQualityString == "low")
+ quality = SmoothingQuality::Low;
+ else if (smoothingQualityString == "medium")
+ quality = SmoothingQuality::Medium;
+ else if (smoothingQualityString == "high")
+ quality = SmoothingQuality::High;
+ else {
+ ASSERT_NOT_REACHED();
+ return;
+ }
+
+ if (quality == state().imageSmoothingQuality)
+ return;
+
+ realizeSaves();
+ modifiableState().imageSmoothingQuality = quality;
+
+ if (!modifiableState().imageSmoothingEnabled)
+ return;
+
+ if (auto* context = drawingContext())
+ context->setImageInterpolationQuality(smoothingToInterpolationQuality(quality));
+}
+
</ins><span class="cx"> bool CanvasRenderingContext2D::imageSmoothingEnabled() const
</span><span class="cx"> {
</span><span class="cx"> return state().imageSmoothingEnabled;
</span><span class="lines">@@ -2540,7 +2599,7 @@
</span><span class="cx"> modifiableState().imageSmoothingEnabled = enabled;
</span><span class="cx"> GraphicsContext* c = drawingContext();
</span><span class="cx"> if (c)
</span><del>- c->setImageInterpolationQuality(enabled ? DefaultInterpolationQuality : InterpolationNone);
</del><ins>+ c->setImageInterpolationQuality(enabled ? smoothingToInterpolationQuality(state().imageSmoothingQuality) : InterpolationNone);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCorehtmlcanvasCanvasRenderingContext2Dh"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/html/canvas/CanvasRenderingContext2D.h (193417 => 193418)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/html/canvas/CanvasRenderingContext2D.h        2015-12-04 17:10:22 UTC (rev 193417)
+++ branches/safari-601-branch/Source/WebCore/html/canvas/CanvasRenderingContext2D.h        2015-12-04 17:10:26 UTC (rev 193418)
</span><span class="lines">@@ -34,6 +34,7 @@
</span><span class="cx"> #include "ColorSpace.h"
</span><span class="cx"> #include "FloatSize.h"
</span><span class="cx"> #include "FontCascade.h"
</span><ins>+#include "GraphicsContext.h"
</ins><span class="cx"> #include "GraphicsTypes.h"
</span><span class="cx"> #include "ImageBuffer.h"
</span><span class="cx"> #include "Path.h"
</span><span class="lines">@@ -228,6 +229,15 @@
</span><span class="cx"> bool imageSmoothingEnabled() const;
</span><span class="cx"> void setImageSmoothingEnabled(bool);
</span><span class="cx">
</span><ins>+ String imageSmoothingQuality() const;
+ void setImageSmoothingQuality(const String&);
+
+ enum class SmoothingQuality {
+ Low,
+ Medium,
+ High
+ };
+
</ins><span class="cx"> private:
</span><span class="cx"> enum class Direction {
</span><span class="cx"> Inherit,
</span><span class="lines">@@ -281,6 +291,7 @@
</span><span class="cx"> Vector<float> lineDash;
</span><span class="cx"> float lineDashOffset;
</span><span class="cx"> bool imageSmoothingEnabled;
</span><ins>+ SmoothingQuality imageSmoothingQuality;
</ins><span class="cx">
</span><span class="cx"> // Text state.
</span><span class="cx"> TextAlign textAlign;
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCorehtmlcanvasCanvasRenderingContext2Didl"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/html/canvas/CanvasRenderingContext2D.idl (193417 => 193418)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/html/canvas/CanvasRenderingContext2D.idl        2015-12-04 17:10:22 UTC (rev 193417)
+++ branches/safari-601-branch/Source/WebCore/html/canvas/CanvasRenderingContext2D.idl        2015-12-04 17:10:26 UTC (rev 193418)
</span><span class="lines">@@ -23,6 +23,7 @@
</span><span class="cx"> * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx"> */
</span><span class="cx">
</span><ins>+enum ImageSmoothingQuality { "low", "medium", "high" };
</ins><span class="cx"> enum CanvasWindingRule { "nonzero", "evenodd" };
</span><span class="cx">
</span><span class="cx"> interface CanvasRenderingContext2D : CanvasRenderingContext {
</span><span class="lines">@@ -188,5 +189,6 @@
</span><span class="cx">
</span><span class="cx"> attribute boolean imageSmoothingEnabled;
</span><span class="cx"> [ImplementedAs=imageSmoothingEnabled] attribute boolean webkitImageSmoothingEnabled;
</span><ins>+ attribute ImageSmoothingQuality imageSmoothingQuality;
</ins><span class="cx"> };
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>