Title: [193416] branches/safari-601-branch

Diff

Modified: branches/safari-601-branch/LayoutTests/ChangeLog (193415 => 193416)


--- branches/safari-601-branch/LayoutTests/ChangeLog	2015-12-04 13:16:05 UTC (rev 193415)
+++ branches/safari-601-branch/LayoutTests/ChangeLog	2015-12-04 17:10:19 UTC (rev 193416)
@@ -1,3 +1,26 @@
+2015-12-03  Matthew Hanson  <matthew_han...@apple.com>
+
+        Merge r188194. rdar://problem/23732393
+
+    2015-08-08  Dean Jackson  <d...@apple.com>
+
+            Remove the webkit prefix from CanvasRenderingContext2D imageSmoothingEnabled
+            https://bugs.webkit.org/show_bug.cgi?id=147803
+            <rdar://problem/22200553>
+
+            Reviewed by Sam Weinig.
+
+            Use the standard version of imageSmoothingEnabled rather than
+            the prefixed version.
+
+            * fast/canvas/canvas-imageSmoothingEnabled-expected.txt:
+            * fast/canvas/canvas-imageSmoothingEnabled-patterns.html:
+            * fast/canvas/canvas-imageSmoothingEnabled-zero-size.html:
+            * fast/canvas/script-tests/canvas-imageSmoothingEnabled-repaint.js:
+            (draw):
+            * fast/canvas/script-tests/canvas-imageSmoothingEnabled.js: Add some tests
+            to make sure the prefixed version correctly maps to the standard version.
+
 2015-12-03  Timothy Hatcher  <timo...@apple.com>
 
         Skip Inspector tests because the new test harness does not work on the branch currently.

Modified: branches/safari-601-branch/LayoutTests/fast/canvas/canvas-imageSmoothingEnabled-expected.txt (193415 => 193416)


--- branches/safari-601-branch/LayoutTests/fast/canvas/canvas-imageSmoothingEnabled-expected.txt	2015-12-04 13:16:05 UTC (rev 193415)
+++ branches/safari-601-branch/LayoutTests/fast/canvas/canvas-imageSmoothingEnabled-expected.txt	2015-12-04 17:10:19 UTC (rev 193416)
@@ -4,11 +4,11 @@
 
 
 Test that the default value is true.
-PASS ctx.webkitImageSmoothingEnabled is true
+PASS ctx.imageSmoothingEnabled is true
 Test that false is returned after a the attribute is set to false.
-PASS ctx.webkitImageSmoothingEnabled is false
+PASS ctx.imageSmoothingEnabled is false
 Test that restore works. We save a false state; create, then save a true state; and then finally restore.
-PASS ctx.webkitImageSmoothingEnabled is false
+PASS ctx.imageSmoothingEnabled is false
 New canvas element created.
 Test that the image is smoothed by default. We check by making sure the pixel just to the left of the middle line is not completely black.
 PASS left_of_center_pixel.data[0] !== 0 is true
@@ -26,6 +26,15 @@
 PASS left_of_center_pixel.data[0] is 0
 PASS left_of_center_pixel.data[1] is 0
 PASS left_of_center_pixel.data[2] is 0
+Test that the prefixed attribute mirrors the unprefixed attribute.
+PASS ctx.imageSmoothingEnabled is false
+PASS ctx.webkitImageSmoothingEnabled is false
+PASS ctx.imageSmoothingEnabled is true
+PASS ctx.webkitImageSmoothingEnabled is true
+PASS ctx.imageSmoothingEnabled is false
+PASS ctx.webkitImageSmoothingEnabled is false
+PASS ctx.imageSmoothingEnabled is true
+PASS ctx.webkitImageSmoothingEnabled is true
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: branches/safari-601-branch/LayoutTests/fast/canvas/canvas-imageSmoothingEnabled-patterns.html (193415 => 193416)


--- branches/safari-601-branch/LayoutTests/fast/canvas/canvas-imageSmoothingEnabled-patterns.html	2015-12-04 13:16:05 UTC (rev 193415)
+++ branches/safari-601-branch/LayoutTests/fast/canvas/canvas-imageSmoothingEnabled-patterns.html	2015-12-04 17:10:19 UTC (rev 193416)
@@ -30,7 +30,7 @@
         var ctx = canvas.getContext('2d');
         var pattern = ctx.createPattern(image, "repeat");
         ctx.fillStyle = pattern;
-        ctx.webkitImageSmoothingEnabled = smoothing;
+        ctx.imageSmoothingEnabled = smoothing;
         ctx.scale(10, 10);
         ctx.fillRect(0, 0, canvas.width, canvas.height);
     }
@@ -39,7 +39,7 @@
         var ctx = canvas.getContext('2d');
         var pattern = ctx.createPattern(image, "repeat");
         ctx.fillStyle = pattern;
-        ctx.webkitImageSmoothingEnabled = smoothing;
+        ctx.imageSmoothingEnabled = smoothing;
         ctx.scale(10, 10);
         ctx.beginPath();
         ctx.moveTo(0,0);
@@ -53,7 +53,7 @@
         var pattern = ctx.createPattern(image, "repeat");
         ctx.strokeStyle = pattern;
         ctx.lineWidth = 5;
-        ctx.webkitImageSmoothingEnabled = smoothing;
+        ctx.imageSmoothingEnabled = smoothing;
         ctx.scale(10, 10);
         ctx.beginPath();
         ctx.moveTo(0,0);

Modified: branches/safari-601-branch/LayoutTests/fast/canvas/canvas-imageSmoothingEnabled-zero-size.html (193415 => 193416)


--- branches/safari-601-branch/LayoutTests/fast/canvas/canvas-imageSmoothingEnabled-zero-size.html	2015-12-04 13:16:05 UTC (rev 193415)
+++ branches/safari-601-branch/LayoutTests/fast/canvas/canvas-imageSmoothingEnabled-zero-size.html	2015-12-04 17:10:19 UTC (rev 193416)
@@ -8,11 +8,11 @@
         testRunner.dumpAsText();
     }
     window._onload_ = function () {
-    	var canvas = document.createElement('canvas');
-		canvas.width = 0;
-		canvas.height = 0;
-		var context = canvas.getContext('2d');
-		if(context.webkitImageSmoothingEnabled) {context.webkitImageSmoothingEnabled = false;}
+        var canvas = document.createElement('canvas');
+        canvas.width = 0;
+        canvas.height = 0;
+        var context = canvas.getContext('2d');
+        if(context.imageSmoothingEnabled) {context.imageSmoothingEnabled = false;}
     };
     </script>
   </body>

Modified: branches/safari-601-branch/LayoutTests/fast/canvas/script-tests/canvas-imageSmoothingEnabled-repaint.js (193415 => 193416)


--- branches/safari-601-branch/LayoutTests/fast/canvas/script-tests/canvas-imageSmoothingEnabled-repaint.js	2015-12-04 13:16:05 UTC (rev 193415)
+++ branches/safari-601-branch/LayoutTests/fast/canvas/script-tests/canvas-imageSmoothingEnabled-repaint.js	2015-12-04 17:10:19 UTC (rev 193416)
@@ -17,7 +17,7 @@
     srcCtx.fillRect(0, 0, 1, 1);
     srcCtx.fillStyle = "rgb(0, 255, 0)";
     srcCtx.fillRect(1, 0, 1, 1);
-    dstCtx.webkitImageSmoothingEnabled = false;
+    dstCtx.imageSmoothingEnabled = false;
     dstCtx.drawImage(srcCanvas, 0, 0, 2, 1, 0, 0, 300, 300);
 }
 

Modified: branches/safari-601-branch/LayoutTests/fast/canvas/script-tests/canvas-imageSmoothingEnabled.js (193415 => 193416)


--- branches/safari-601-branch/LayoutTests/fast/canvas/script-tests/canvas-imageSmoothingEnabled.js	2015-12-04 13:16:05 UTC (rev 193415)
+++ branches/safari-601-branch/LayoutTests/fast/canvas/script-tests/canvas-imageSmoothingEnabled.js	2015-12-04 17:10:19 UTC (rev 193416)
@@ -2,17 +2,17 @@
 var ctx = document.createElement('canvas').getContext('2d');
 
 debug("Test that the default value is true.");
-shouldBe("ctx.webkitImageSmoothingEnabled", "true");
+shouldBe("ctx.imageSmoothingEnabled", "true");
 
 debug("Test that false is returned after a the attribute is set to false.");
-ctx.webkitImageSmoothingEnabled = false;
-shouldBe("ctx.webkitImageSmoothingEnabled", "false");
+ctx.imageSmoothingEnabled = false;
+shouldBe("ctx.imageSmoothingEnabled", "false");
 
 debug("Test that restore works. We save a false state; create, then save a true state; and then finally restore.");
 ctx.save();
-ctx.webkitImageSmoothingEnabled = true;
+ctx.imageSmoothingEnabled = true;
 ctx.restore();
-shouldBe("ctx.webkitImageSmoothingEnabled", "false");
+shouldBe("ctx.imageSmoothingEnabled", "false");
 
 var image = document.createElement('canvas');
 image.width = 2;
@@ -49,7 +49,7 @@
 shouldBe("left_of_center_pixel.data[1] !== 0", "true");
 shouldBe("left_of_center_pixel.data[2] !== 0", "true");
 
-ctx.webkitImageSmoothingEnabled = false;
+ctx.imageSmoothingEnabled = false;
 ctx.drawImage(image, 0, 0, canvas.width, canvas.height);
 left_of_center_pixel = ctx.getImageData(1, 0, 1, 1);
 debug("Test that nearest neighbour is used when imageSmoothingEnabled is set to false. We check this by making sure the pixel just to the left of the middle line is completely black.");
@@ -57,7 +57,7 @@
 shouldBe("left_of_center_pixel.data[1]", "0");
 shouldBe("left_of_center_pixel.data[2]", "0");
 
-ctx.webkitImageSmoothingEnabled = true;
+ctx.imageSmoothingEnabled = true;
 ctx.drawImage(image, 0, 0, canvas.width, canvas.height);
 left_of_center_pixel = ctx.getImageData(1, 0, 1, 1);
 debug("Test that the image is smoothed when imageSmoothingEnabled is set to true.");
@@ -66,9 +66,9 @@
 shouldBe("left_of_center_pixel.data[2] !== 0", "true");
 
 debug("Test that restoring actually changes smoothing and not just the attribute value. We are restoring to a point where imageSmoothingEnabled is set to false.");
-ctx.webkitImageSmoothingEnabled = false;
+ctx.imageSmoothingEnabled = false;
 ctx.save();
-ctx.webkitImageSmoothingEnabled = true;
+ctx.imageSmoothingEnabled = true;
 ctx.restore();
 ctx.drawImage(image, 0, 0, canvas.width, canvas.height);
 left_of_center_pixel = ctx.getImageData(1, 0, 1, 1);
@@ -76,3 +76,16 @@
 shouldBe("left_of_center_pixel.data[1]", "0");
 shouldBe("left_of_center_pixel.data[2]", "0");
 
+debug("Test that the prefixed attribute mirrors the unprefixed attribute.");
+ctx.imageSmoothingEnabled = false;
+shouldBe("ctx.imageSmoothingEnabled", "false");
+shouldBe("ctx.webkitImageSmoothingEnabled", "false");
+ctx.imageSmoothingEnabled = true;
+shouldBe("ctx.imageSmoothingEnabled", "true");
+shouldBe("ctx.webkitImageSmoothingEnabled", "true");
+ctx.webkitImageSmoothingEnabled = false;
+shouldBe("ctx.imageSmoothingEnabled", "false");
+shouldBe("ctx.webkitImageSmoothingEnabled", "false");
+ctx.webkitImageSmoothingEnabled = true;
+shouldBe("ctx.imageSmoothingEnabled", "true");
+shouldBe("ctx.webkitImageSmoothingEnabled", "true");

Modified: branches/safari-601-branch/Source/WebCore/ChangeLog (193415 => 193416)


--- branches/safari-601-branch/Source/WebCore/ChangeLog	2015-12-04 13:16:05 UTC (rev 193415)
+++ branches/safari-601-branch/Source/WebCore/ChangeLog	2015-12-04 17:10:19 UTC (rev 193416)
@@ -1,3 +1,29 @@
+2015-12-03  Matthew Hanson  <matthew_han...@apple.com>
+
+        Merge r188194. rdar://problem/23732393
+
+    2015-08-08  Dean Jackson  <d...@apple.com>
+
+            Remove the webkit prefix from CanvasRenderingContext2D imageSmoothingEnabled
+            https://bugs.webkit.org/show_bug.cgi?id=147803
+            <rdar://problem/22200553>
+
+            Reviewed by Sam Weinig.
+
+            Rename webkitImageSmoothingEnabled to imageSmoothingEnabled.
+
+            Updated existing tests, and made sure that the prefixed version is
+            identical to the standard version.
+
+            * html/canvas/CanvasRenderingContext2D.cpp:
+            (WebCore::CanvasRenderingContext2D::imageSmoothingEnabled): Renamed from webkitImageSmoothingEnabled.
+            (WebCore::CanvasRenderingContext2D::setImageSmoothingEnabled): Renamed from setWebkitImageSmoothingEnabled.
+            (WebCore::CanvasRenderingContext2D::webkitImageSmoothingEnabled): Deleted.
+            (WebCore::CanvasRenderingContext2D::setWebkitImageSmoothingEnabled): Deleted.
+            * html/canvas/CanvasRenderingContext2D.h: Rename the methods.
+            * html/canvas/CanvasRenderingContext2D.idl: Add the non-prefixed form, and mark is as the
+            implementation of the prefixed form.
+
 2015-12-03  Timothy Hatcher  <timo...@apple.com>
 
         Merge r192592. rdar://problem/23221163

Modified: branches/safari-601-branch/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp (193415 => 193416)


--- branches/safari-601-branch/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp	2015-12-04 13:16:05 UTC (rev 193415)
+++ branches/safari-601-branch/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp	2015-12-04 17:10:19 UTC (rev 193416)
@@ -2526,12 +2526,12 @@
 }
 #endif
 
-bool CanvasRenderingContext2D::webkitImageSmoothingEnabled() const
+bool CanvasRenderingContext2D::imageSmoothingEnabled() const
 {
     return state().m_imageSmoothingEnabled;
 }
 
-void CanvasRenderingContext2D::setWebkitImageSmoothingEnabled(bool enabled)
+void CanvasRenderingContext2D::setImageSmoothingEnabled(bool enabled)
 {
     if (enabled == state().m_imageSmoothingEnabled)
         return;

Modified: branches/safari-601-branch/Source/WebCore/html/canvas/CanvasRenderingContext2D.h (193415 => 193416)


--- branches/safari-601-branch/Source/WebCore/html/canvas/CanvasRenderingContext2D.h	2015-12-04 13:16:05 UTC (rev 193415)
+++ branches/safari-601-branch/Source/WebCore/html/canvas/CanvasRenderingContext2D.h	2015-12-04 17:10:19 UTC (rev 193416)
@@ -225,8 +225,8 @@
     LineCap getLineCap() const { return state().m_lineCap; }
     LineJoin getLineJoin() const { return state().m_lineJoin; }
 
-    bool webkitImageSmoothingEnabled() const;
-    void setWebkitImageSmoothingEnabled(bool);
+    bool imageSmoothingEnabled() const;
+    void setImageSmoothingEnabled(bool);
 
 private:
     enum class Direction {

Modified: branches/safari-601-branch/Source/WebCore/html/canvas/CanvasRenderingContext2D.idl (193415 => 193416)


--- branches/safari-601-branch/Source/WebCore/html/canvas/CanvasRenderingContext2D.idl	2015-12-04 13:16:05 UTC (rev 193415)
+++ branches/safari-601-branch/Source/WebCore/html/canvas/CanvasRenderingContext2D.idl	2015-12-04 17:10:19 UTC (rev 193416)
@@ -186,6 +186,7 @@
 
     readonly attribute float webkitBackingStorePixelRatio;
 
-    attribute boolean webkitImageSmoothingEnabled;
+    attribute boolean imageSmoothingEnabled;
+    [ImplementedAs=imageSmoothingEnabled] attribute boolean webkitImageSmoothingEnabled;
 };
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to