Title: [188996] branches/safari-601.1.46-branch

Diff

Modified: branches/safari-601.1.46-branch/LayoutTests/ChangeLog (188995 => 188996)


--- branches/safari-601.1.46-branch/LayoutTests/ChangeLog	2015-08-26 22:15:02 UTC (rev 188995)
+++ branches/safari-601.1.46-branch/LayoutTests/ChangeLog	2015-08-26 22:20:03 UTC (rev 188996)
@@ -1,3 +1,20 @@
+2015-08-26  Babak Shafiei  <bshaf...@apple.com>
+
+        Merge r188271.
+
+    2015-08-11  Said Abou-Hallawa  <sabouhall...@apple.com>
+
+            feMorphology is not rendered correctly on Retina display
+            https://bugs.webkit.org/show_bug.cgi?id=147589
+
+            Reviewed by Dean Jackson.
+
+            Ensure we take the filter scale factor into consideration when applying
+            the FEMorphology.
+
+            * fast/hidpi/filters-morphology-expected.html: Added.
+            * fast/hidpi/filters-morphology.html: Added.
+
 2015-08-21  Babak Shafiei  <bshaf...@apple.com>
 
         Merge r188340.

Copied: branches/safari-601.1.46-branch/LayoutTests/fast/hidpi/filters-morphology-expected.html (from rev 188271, trunk/LayoutTests/fast/hidpi/filters-morphology-expected.html) (0 => 188996)


--- branches/safari-601.1.46-branch/LayoutTests/fast/hidpi/filters-morphology-expected.html	                        (rev 0)
+++ branches/safari-601.1.46-branch/LayoutTests/fast/hidpi/filters-morphology-expected.html	2015-08-26 22:20:03 UTC (rev 188996)
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <script src=""
+  <style>
+    div {
+      width: 120px;
+      height: 120px;
+      margin: 10px 10px 10px 10px;
+      border: none;
+      display: inline-block;
+      background-color: lime;
+    }
+  </style>
+</head>
+<body>
+  <div></div>
+</body>
+</html>

Copied: branches/safari-601.1.46-branch/LayoutTests/fast/hidpi/filters-morphology.html (from rev 188271, trunk/LayoutTests/fast/hidpi/filters-morphology.html) (0 => 188996)


--- branches/safari-601.1.46-branch/LayoutTests/fast/hidpi/filters-morphology.html	                        (rev 0)
+++ branches/safari-601.1.46-branch/LayoutTests/fast/hidpi/filters-morphology.html	2015-08-26 22:20:03 UTC (rev 188996)
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <script src=""
+  <style>
+    div {
+      width: 100px;
+      height: 100px;
+      margin: 20px 20px 20px 16px;
+      border: none;
+      display: inline-block;
+      background-color: lime;
+    }
+  </style>
+</head>
+<body>
+  <svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="0" height="0">
+    <defs>
+	  <filter id="filter" primitiveUnits="userSpaceOnUse">
+		<feMorphology in="SourceGraphic" operator="dilate" radius="10"/>
+	  </filter>
+	</defs>
+  </svg>
+  <div style="-webkit-filter: url('#filter'); filter: url('#filter');"></div>
+</body>
+</html>

Modified: branches/safari-601.1.46-branch/Source/WebCore/ChangeLog (188995 => 188996)


--- branches/safari-601.1.46-branch/Source/WebCore/ChangeLog	2015-08-26 22:15:02 UTC (rev 188995)
+++ branches/safari-601.1.46-branch/Source/WebCore/ChangeLog	2015-08-26 22:20:03 UTC (rev 188996)
@@ -1,3 +1,23 @@
+2015-08-26  Babak Shafiei  <bshaf...@apple.com>
+
+        Merge r188271.
+
+    2015-08-11  Said Abou-Hallawa  <sabouhall...@apple.com>
+
+            feMorphology is not rendered correctly on Retina display
+            https://bugs.webkit.org/show_bug.cgi?id=147589
+
+            Reviewed by Dean Jackson.
+
+            The result ImageBuffer of any FilterEffect is already scaled up for 2x
+            display. The FEMorphology needs to fix its painting data dimension and
+            radius by multiplying them by the filter scale factor.
+
+            Test: fast/hidpi/filters-morphology.html
+
+            * platform/graphics/filters/FEMorphology.cpp:
+            (WebCore::FEMorphology::platformApplySoftware):
+
 2015-08-21  Babak Shafiei  <bshaf...@apple.com>
 
         Merge r188659.

Modified: branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/filters/FEMorphology.cpp (188995 => 188996)


--- branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/filters/FEMorphology.cpp	2015-08-26 22:15:02 UTC (rev 188995)
+++ branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/filters/FEMorphology.cpp	2015-08-26 22:20:03 UTC (rev 188996)
@@ -238,10 +238,10 @@
     PaintingData paintingData;
     paintingData.srcPixelArray = srcPixelArray.get();
     paintingData.dstPixelArray = dstPixelArray;
-    paintingData.width = effectDrawingRect.width();
-    paintingData.height = effectDrawingRect.height();
-    paintingData.radiusX = radiusX;
-    paintingData.radiusY = radiusY;
+    paintingData.width = ceilf(effectDrawingRect.width() * filter.filterScale());
+    paintingData.height = ceilf(effectDrawingRect.height() * filter.filterScale());
+    paintingData.radiusX = ceilf(radiusX * filter.filterScale());
+    paintingData.radiusY = ceilf(radiusY * filter.filterScale());
 
     platformApply(&paintingData);
 }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to