Title: [221407] trunk/Source/WebKit
Revision
221407
Author
[email protected]
Date
2017-08-30 16:43:39 -0700 (Wed, 30 Aug 2017)

Log Message

REGRESSION (r221068): Graphics corruption when dragging images on iOS
https://bugs.webkit.org/show_bug.cgi?id=176132
<rdar://problem/34142983>

Reviewed by Dean Jackson.

* Shared/mac/ColorSpaceData.mm:
(WebKit::ColorSpaceData::encode):
Color space encoding was entirely disabled on iOS, so after r221068,
ShareableBitmap would make different decisions about image format
on both sides of the wire.

Enable color space encoding on iOS (decoding is already implemented)
by moving some ifdefs around.

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (221406 => 221407)


--- trunk/Source/WebKit/ChangeLog	2017-08-30 23:20:58 UTC (rev 221406)
+++ trunk/Source/WebKit/ChangeLog	2017-08-30 23:43:39 UTC (rev 221407)
@@ -1,3 +1,20 @@
+2017-08-30  Tim Horton  <[email protected]>
+
+        REGRESSION (r221068): Graphics corruption when dragging images on iOS
+        https://bugs.webkit.org/show_bug.cgi?id=176132
+        <rdar://problem/34142983>
+
+        Reviewed by Dean Jackson.
+
+        * Shared/mac/ColorSpaceData.mm:
+        (WebKit::ColorSpaceData::encode):
+        Color space encoding was entirely disabled on iOS, so after r221068,
+        ShareableBitmap would make different decisions about image format
+        on both sides of the wire.
+
+        Enable color space encoding on iOS (decoding is already implemented)
+        by moving some ifdefs around.
+
 2017-08-30  Youenn Fablet  <[email protected]>
 
         [Cache API] Support cache names persistency

Modified: trunk/Source/WebKit/Shared/mac/ColorSpaceData.mm (221406 => 221407)


--- trunk/Source/WebKit/Shared/mac/ColorSpaceData.mm	2017-08-30 23:20:58 UTC (rev 221406)
+++ trunk/Source/WebKit/Shared/mac/ColorSpaceData.mm	2017-08-30 23:43:39 UTC (rev 221407)
@@ -40,7 +40,6 @@
 
 void ColorSpaceData::encode(IPC::Encoder& encoder) const
 {
-#if !PLATFORM(IOS)
     if (cgColorSpace) {
         // Try to encode the name.
         if (RetainPtr<CFStringRef> name = adoptCF(CGColorSpaceCopyName(cgColorSpace.get()))) {
@@ -50,7 +49,7 @@
         }
 
         // Failing that, just encode the ICC data.
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
+#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200) || PLATFORM(IOS)
         RetainPtr<CFDataRef> profileData = adoptCF(CGColorSpaceCopyICCData(cgColorSpace.get()));
 #else
         RetainPtr<CFDataRef> profileData = adoptCF(CGColorSpaceCopyICCProfile(cgColorSpace.get()));
@@ -61,7 +60,6 @@
             return;
         }
     }
-#endif // !PLATFORM(IOS)
 
     // The color space was null or failed to be encoded.
     encoder.encodeEnum(Null);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to