Bug 143042 - iOS file upload panel menu items need icons
Summary: iOS file upload panel menu items need icons
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jon Honeycutt
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-03-25 01:03 PDT by Jon Honeycutt
Modified: 2015-03-26 19:25 PDT (History)
3 users (show)

See Also:


Attachments
Patch (3.46 KB, patch)
2015-03-25 01:07 PDT, Jon Honeycutt
no flags Details | Formatted Diff | Diff
Patch (3.76 KB, patch)
2015-03-26 16:27 PDT, Jon Honeycutt
aestes: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jon Honeycutt 2015-03-25 01:03:52 PDT
The new iOS file upload panel menu items need icons for "Photo Library" and "Take a Photo or Video."

<rdar://problem/20178678>
Comment 1 Jon Honeycutt 2015-03-25 01:07:38 PDT
Created attachment 249390 [details]
Patch
Comment 2 Jon Honeycutt 2015-03-26 16:27:00 PDT
Created attachment 249538 [details]
Patch
Comment 3 Andy Estes 2015-03-26 17:06:43 PDT
Comment on attachment 249538 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=249538&action=review

r=me

> Source/WebKit2/ChangeLog:11
> +        Declare new SPI methods +_webkit_takePhotoOrVideoIcon and
> +        +_webkit_photoLibraryIcon on UIDocumentMenuViewController.

_UIImageGetWebKitTakePhotoOrVideoIcon and _UIImageGetWebKitPhotoLibraryIcon().

> Source/WebKit2/Platform/spi/ios/UIKitSPI.h:40
> +#import <UIKit/UIInterface_Private.h>

You should go ahead and add function declarations to the !USE(APPLE_INTERNAL_SDK) block. Otherwise, there'll be a compiler error lurking that we won't catch until someone tries to build against the iOS 9 public SDK.

> Source/WebKit2/UIProcess/ios/forms/WKFileUploadPanel.mm:62
> +static UIImage *photoLibraryIcon()

static inline?

> Source/WebKit2/UIProcess/ios/forms/WKFileUploadPanel.mm:72
> +static UIImage *cameraIcon()

static inline?
Comment 4 Andy Estes 2015-03-26 17:32:14 PDT
Comment on attachment 249538 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=249538&action=review

>> Source/WebKit2/Platform/spi/ios/UIKitSPI.h:40
>> +#import <UIKit/UIInterface_Private.h>
> 
> You should go ahead and add function declarations to the !USE(APPLE_INTERNAL_SDK) block. Otherwise, there'll be a compiler error lurking that we won't catch until someone tries to build against the iOS 9 public SDK.

Actually, I forgot an important detail about C functions. Instead of declaring them only in the !USE(APPLE_INTERNAL_SDK) condition, you should declare them unconditionally. This allows us to catch cases where UIKit changes a function declaration in a source-compatible but binary-incompatible way (thanks to the One Definition Rule). In fact, we already do that for other functions in this file (see _UIApplicationLoadWebKit()).
Comment 5 Jon Honeycutt 2015-03-26 19:25:39 PDT
Committed r182049: <http://trac.webkit.org/changeset/182049>