Title: [281682] trunk
Revision
281682
Author
[email protected]
Date
2021-08-26 20:48:31 -0700 (Thu, 26 Aug 2021)

Log Message

Remove some historical iOS CGContext flipping
https://bugs.webkit.org/show_bug.cgi?id=229589

Reviewed by Tim Horton.

Source/WebCore:

Remove some iOS-only code that flipped the CGContext CTM for pattern drawing. Back
in the mists of time there were some iOS-only differences in image flipping, but those
have long since disappeared.

* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::drawPatternCallback):
(WebCore::GraphicsContextCG::drawPattern):

LayoutTests:

Mark some iOS tests as passing now. A couple of tests that were skipped everywhere now
only fail on macOS.

* TestExpectations:
* platform/ios-wk2/TestExpectations:
* platform/ios/TestExpectations:
* platform/mac/TestExpectations:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (281681 => 281682)


--- trunk/LayoutTests/ChangeLog	2021-08-27 03:37:05 UTC (rev 281681)
+++ trunk/LayoutTests/ChangeLog	2021-08-27 03:48:31 UTC (rev 281682)
@@ -1,3 +1,18 @@
+2021-08-26  Simon Fraser  <[email protected]>
+
+        Remove some historical iOS CGContext flipping
+        https://bugs.webkit.org/show_bug.cgi?id=229589
+
+        Reviewed by Tim Horton.
+
+        Mark some iOS tests as passing now. A couple of tests that were skipped everywhere now
+        only fail on macOS.
+
+        * TestExpectations:
+        * platform/ios-wk2/TestExpectations:
+        * platform/ios/TestExpectations:
+        * platform/mac/TestExpectations:
+
 2021-08-26  Myles C. Maxfield  <[email protected]>
 
         [Cocoa] Enforce the policy against WebKit causing Core Text font download prompts in WebKit1

Modified: trunk/LayoutTests/TestExpectations (281681 => 281682)


--- trunk/LayoutTests/TestExpectations	2021-08-27 03:37:05 UTC (rev 281681)
+++ trunk/LayoutTests/TestExpectations	2021-08-27 03:48:31 UTC (rev 281682)
@@ -3837,12 +3837,10 @@
 webkit.org/b/206753 imported/w3c/web-platform-tests/css/css-backgrounds/border-image-width-007.xht [ ImageOnlyFailure ]
 webkit.org/b/206753 imported/w3c/web-platform-tests/css/css-backgrounds/border-image-width-008.html [ ImageOnlyFailure ]
 webkit.org/b/206753 imported/w3c/web-platform-tests/css/css-backgrounds/css-border-radius-001.html [ ImageOnlyFailure ]
-webkit.org/b/206753 imported/w3c/web-platform-tests/css/css-backgrounds/css3-border-image-repeat-repeat.html [ ImageOnlyFailure ]
 webkit.org/b/206753 imported/w3c/web-platform-tests/css/css-backgrounds/first-letter-space-not-selected.html [ ImageOnlyFailure ]
 
 webkit.org/b/206753 imported/w3c/web-platform-tests/css/css-backgrounds/animations/background-color-animation-fallback-additive-keyframe.html [ ImageOnlyFailure ]
 webkit.org/b/206753 imported/w3c/web-platform-tests/css/css-backgrounds/background-attachment-fixed-inside-transform-1.html [ ImageOnlyFailure ]
-webkit.org/b/206753 imported/w3c/web-platform-tests/css/css-backgrounds/background-clip-content-box-002.html [ ImageOnlyFailure ]
 webkit.org/b/206753 imported/w3c/web-platform-tests/css/css-backgrounds/background-size-041.html [ ImageOnlyFailure ]
 webkit.org/b/206753 imported/w3c/web-platform-tests/css/css-backgrounds/background-size-042.html [ ImageOnlyFailure ]
 webkit.org/b/206753 imported/w3c/web-platform-tests/css/css-backgrounds/background-size-043.html [ ImageOnlyFailure ]
@@ -3866,7 +3864,6 @@
 webkit.org/b/206753 imported/w3c/web-platform-tests/css/css-backgrounds/border-width-small-values-001-d.html [ ImageOnlyFailure ]
 webkit.org/b/206753 imported/w3c/web-platform-tests/css/css-backgrounds/border-width-small-values-001-e.html [ ImageOnlyFailure ]
 webkit.org/b/206753 imported/w3c/web-platform-tests/css/css-backgrounds/box-shadow-currentcolor.html [ ImageOnlyFailure ]
-webkit.org/b/206753 imported/w3c/web-platform-tests/css/css-backgrounds/box-shadow-overlapping-001.html [ ImageOnlyFailure ]
 webkit.org/b/206753 imported/w3c/web-platform-tests/css/css-backgrounds/box-shadow-radius-000.html [ ImageOnlyFailure ]
 webkit.org/b/206753 imported/w3c/web-platform-tests/css/css-backgrounds/box-shadow-radius-001.html [ ImageOnlyFailure ]
 

Modified: trunk/LayoutTests/platform/ios/TestExpectations (281681 => 281682)


--- trunk/LayoutTests/platform/ios/TestExpectations	2021-08-27 03:37:05 UTC (rev 281681)
+++ trunk/LayoutTests/platform/ios/TestExpectations	2021-08-27 03:48:31 UTC (rev 281682)
@@ -2248,7 +2248,6 @@
 fast/backgrounds/background-image-large-float-intrinsic-ratio.html [ ImageOnlyFailure ]
 fast/block/positioning/fixed-container-with-relative-parent.html [ ImageOnlyFailure ]
 fast/borders/border-image-fill-inline-no-border.html [ ImageOnlyFailure ]
-fast/borders/border-image-space.html [ ImageOnlyFailure ]
 fast/css-generated-content/initial-letter-first-line-wrapping.html [ ImageOnlyFailure ]
 fast/css/pseudo-visited-background-color-on-input.html [ ImageOnlyFailure ]
 fast/forms/select-size.html [ ImageOnlyFailure ]

Modified: trunk/LayoutTests/platform/ios-wk2/TestExpectations (281681 => 281682)


--- trunk/LayoutTests/platform/ios-wk2/TestExpectations	2021-08-27 03:37:05 UTC (rev 281681)
+++ trunk/LayoutTests/platform/ios-wk2/TestExpectations	2021-08-27 03:48:31 UTC (rev 281682)
@@ -1822,8 +1822,6 @@
 webkit.org/b/214382 [ Release ] imported/w3c/web-platform-tests/websockets/remove-own-iframe-during-onerror.window.html [ Pass Failure ]
 
 webkit.org/b/214468 imported/w3c/web-platform-tests/css/css-backgrounds/background-position-subpixel-at-border.tentative.html [ ImageOnlyFailure ]
-webkit.org/b/214468 imported/w3c/web-platform-tests/css/css-backgrounds/border-image-repeat-space-7.html [ ImageOnlyFailure ]
-webkit.org/b/214468 imported/w3c/web-platform-tests/css/css-backgrounds/css3-border-image-repeat-stretch.html [ ImageOnlyFailure ]
 webkit.org/b/214468 imported/w3c/web-platform-tests/css/css-backgrounds/background-repeat-space-8.html [ ImageOnlyFailure ]
 webkit.org/b/214468 imported/w3c/web-platform-tests/css/css-backgrounds/simple-bg-color.html [ ImageOnlyFailure ]
 webkit.org/b/214468 imported/w3c/web-platform-tests/css/css-fonts/font-language-override-02.html [ ImageOnlyFailure ]

Modified: trunk/LayoutTests/platform/mac/TestExpectations (281681 => 281682)


--- trunk/LayoutTests/platform/mac/TestExpectations	2021-08-27 03:37:05 UTC (rev 281681)
+++ trunk/LayoutTests/platform/mac/TestExpectations	2021-08-27 03:48:31 UTC (rev 281682)
@@ -1945,6 +1945,9 @@
 [ arm64 ] imported/w3c/web-platform-tests/css/css-backgrounds/background-size/vector/wide--contain--height.html [ ImageOnlyFailure ]
 [ arm64 ] imported/w3c/web-platform-tests/css/css-backgrounds/background-size/vector/wide--contain--width.html [ ImageOnlyFailure ]
 
+webkit.org/b/206753 imported/w3c/web-platform-tests/css/css-backgrounds/background-clip-content-box-002.html [ ImageOnlyFailure ]
+webkit.org/b/206753 imported/w3c/web-platform-tests/css/css-backgrounds/css3-border-image-repeat-repeat.html [ ImageOnlyFailure ]
+
 # rdar://66661355 ([ASi Layout Tests] 3 compositing tests failing with 0.01% diffs)
 [ arm64 ] compositing/backgrounds/fixed-background-on-descendant.html [ ImageOnlyFailure ]
 [ arm64 ] compositing/backgrounds/fixed-backgrounds.html [ ImageOnlyFailure ]

Modified: trunk/Source/WebCore/ChangeLog (281681 => 281682)


--- trunk/Source/WebCore/ChangeLog	2021-08-27 03:37:05 UTC (rev 281681)
+++ trunk/Source/WebCore/ChangeLog	2021-08-27 03:48:31 UTC (rev 281682)
@@ -1,3 +1,18 @@
+2021-08-26  Simon Fraser  <[email protected]>
+
+        Remove some historical iOS CGContext flipping
+        https://bugs.webkit.org/show_bug.cgi?id=229589
+
+        Reviewed by Tim Horton.
+
+        Remove some iOS-only code that flipped the CGContext CTM for pattern drawing. Back
+        in the mists of time there were some iOS-only differences in image flipping, but those
+        have long since disappeared.
+
+        * platform/graphics/cg/GraphicsContextCG.cpp:
+        (WebCore::drawPatternCallback):
+        (WebCore::GraphicsContextCG::drawPattern):
+
 2021-08-26  Myles C. Maxfield  <[email protected]>
 
         [Cocoa] Enforce the policy against WebKit causing Core Text font download prompts in WebKit1

Modified: trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp (281681 => 281682)


--- trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp	2021-08-27 03:37:05 UTC (rev 281681)
+++ trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp	2021-08-27 03:48:31 UTC (rev 281682)
@@ -376,10 +376,6 @@
 {
     CGImageRef image = (CGImageRef)info;
     CGFloat height = CGImageGetHeight(image);
-#if PLATFORM(IOS_FAMILY)
-    CGContextScaleCTM(context, 1, -1);
-    CGContextTranslateCTM(context, 0, -height);
-#endif
     CGContextDrawImage(context, GraphicsContextCG(context).roundToDevicePixels(FloatRect(0, 0, CGImageGetWidth(image), height)), image);
 }
 
@@ -438,10 +434,6 @@
         matrix = CGAffineTransformConcat(matrix, CGContextGetCTM(context));
         // The top of a partially-decoded image is drawn at the bottom of the tile. Map it to the top.
         matrix = CGAffineTransformTranslate(matrix, 0, imageSize.height() - h);
-#if PLATFORM(IOS_FAMILY)
-        matrix = CGAffineTransformScale(matrix, 1, -1);
-        matrix = CGAffineTransformTranslate(matrix, 0, -h);
-#endif
         CGImageRef platformImage = CGImageRetain(subImage.get());
         RetainPtr<CGPatternRef> pattern = adoptCF(CGPatternCreate(platformImage, CGRectMake(0, 0, tileRect.width(), tileRect.height()), matrix,
             tileRect.width() + spacing.width() * (1 / narrowPrecisionToFloat(patternTransform.a())),
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to