Title: [214872] branches/safari-603-branch/Source/WebKit2

Diff

Modified: branches/safari-603-branch/Source/WebKit2/ChangeLog (214871 => 214872)


--- branches/safari-603-branch/Source/WebKit2/ChangeLog	2017-04-04 07:31:23 UTC (rev 214871)
+++ branches/safari-603-branch/Source/WebKit2/ChangeLog	2017-04-04 08:00:24 UTC (rev 214872)
@@ -1,3 +1,23 @@
+2017-04-03  Jason Marcell  <[email protected]>
+
+        Cherry-pick r211601. rdar://problem/31387958
+
+    2017-02-02  Megan Gardner  <[email protected]>
+
+            Don't attempt wide gammut on older OSes
+            https://bugs.webkit.org/show_bug.cgi?id=167754
+            <rdar://problem/29931587>
+
+            Reviewed by Tim Horton.
+
+            We need to guard our extended color checks the same way throughout the code, or we will attempt to set up
+            support for wide gamut partially, which causes crashes when using sharable bitmap.
+
+            * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
+            (WebKit::convertImageToBitmap):
+            * WebProcess/WebPage/ios/WebPageIOS.mm:
+            (WebKit::WebPage::getPositionInformation):
+
 2017-04-02  Jason Marcell  <[email protected]>
 
         Cherry-pick r214559. rdar://problem/31371683

Modified: branches/safari-603-branch/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm (214871 => 214872)


--- branches/safari-603-branch/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm	2017-04-04 07:31:23 UTC (rev 214871)
+++ branches/safari-603-branch/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm	2017-04-04 08:00:24 UTC (rev 214872)
@@ -56,8 +56,10 @@
 static PassRefPtr<ShareableBitmap> convertImageToBitmap(NSImage *image, const IntSize& size, Frame& frame)
 {
     ShareableBitmap::Flags flags = ShareableBitmap::SupportsAlpha;
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
     if (screenSupportsExtendedColor(frame.mainFrame().view()))
         flags |= ShareableBitmap::SupportsExtendedColor;
+#endif
     auto bitmap = ShareableBitmap::createShareable(size, flags);
     if (!bitmap)
         return nullptr;

Modified: branches/safari-603-branch/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm (214871 => 214872)


--- branches/safari-603-branch/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm	2017-04-04 07:31:23 UTC (rev 214871)
+++ branches/safari-603-branch/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm	2017-04-04 08:00:24 UTC (rev 214872)
@@ -2404,7 +2404,9 @@
                                     FloatSize bitmapSize = scaledSize.width() < image->size().width() ? scaledSize : image->size();
                                     // FIXME: Only select ExtendedColor on images known to need wide gamut
                                     ShareableBitmap::Flags flags = ShareableBitmap::SupportsAlpha;
+#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 100000
                                     flags |= screenSupportsExtendedColor() ? ShareableBitmap::SupportsExtendedColor : 0;
+#endif
                                     if (RefPtr<ShareableBitmap> sharedBitmap = ShareableBitmap::createShareable(IntSize(bitmapSize), flags)) {
                                         auto graphicsContext = sharedBitmap->createGraphicsContext();
                                         graphicsContext->drawImage(*image, FloatRect(0, 0, bitmapSize.width(), bitmapSize.height()));
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to