Images shared to photos via action menu are padded with zeroes at the end
[WebKit-https.git] / Source / WebKit2 / ChangeLog
index cdcae9a540b5437e2d0c03b4fd4330cf10421385..fabdb42d9055513d13ddb5b4c64d8e262ecd653f 100644 (file)
@@ -1,3 +1,25 @@
+2015-03-23  Tim Horton  <timothy_horton@apple.com>
+
+        Images shared to photos via action menu are padded with zeroes at the end
+        https://bugs.webkit.org/show_bug.cgi?id=142985
+
+        Reviewed by Anders Carlsson.
+
+        * Shared/mac/ActionMenuHitTestResult.h:
+        * Shared/mac/ActionMenuHitTestResult.mm:
+        (WebKit::ActionMenuHitTestResult::encode):
+        (WebKit::ActionMenuHitTestResult::decode):
+        * WebProcess/WebPage/mac/WebPageMac.mm:
+        (WebKit::WebPage::performActionMenuHitTestAtLocation):
+        Send the size of the image separately from the SharedMemory.
+        The SharedMemory's size can be rounded up, so we need to keep the original
+        size around in order to write the data to disk.
+
+        * UIProcess/mac/WKActionMenuController.mm:
+        (-[WKActionMenuController _hitTestResultImage]):
+        (-[WKActionMenuController _addImageToPhotos:]):
+        Use the image size instead of the SharedMemory size.
+
 2015-03-23  Enrica Casucci  <enrica@apple.com>
 
         [iOS] WebContent crash attempting to select text with a gesture at RenderObject::absoluteBoundingBoxRect.