WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
192002
Serialize and deserialize editable image strokes
https://bugs.webkit.org/show_bug.cgi?id=192002
Summary
Serialize and deserialize editable image strokes
Tim Horton
Reported
2018-11-27 02:37:32 PST
Serialize and deserialize editable image strokes
Attachments
Patch
(26.03 KB, patch)
2018-11-27 02:37 PST
,
Tim Horton
no flags
Details
Formatted Diff
Diff
Patch
(26.00 KB, patch)
2018-11-27 11:46 PST
,
Tim Horton
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Tim Horton
Comment 1
2018-11-27 02:37:45 PST
Created
attachment 355718
[details]
Patch
Tim Horton
Comment 2
2018-11-27 02:37:47 PST
<
rdar://problem/30900149
>
EWS Watchlist
Comment 3
2018-11-27 02:39:29 PST
Attachment 355718
[details]
did not pass style-queue: ERROR: Source/WebKit/Platform/spi/ios/PencilKitSPI.h:31: Alphabetical sorting problem. [build/include_order] [4] Total errors found: 1 in 16 files If any of these errors are false positives, please file a bug against check-webkit-style.
Tim Horton
Comment 4
2018-11-27 02:41:10 PST
(In reply to Build Bot from
comment #3
)
>
Attachment 355718
[details]
did not pass style-queue: > > > ERROR: Source/WebKit/Platform/spi/ios/PencilKitSPI.h:31: Alphabetical > sorting problem. [build/include_order] [4] > Total errors found: 1 in 16 files > > > If any of these errors are false positives, please file a bug against > check-webkit-style.
Silly stylebot.
Wenson Hsieh
Comment 5
2018-11-27 09:29:27 PST
Comment on
attachment 355718
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=355718&action=review
> Source/WebKit/UIProcess/ios/EditableImageController.mm:144 > + attachmentBacksEditableImage = true;
Can we just return `WebPageProxy::ShouldUpdateAttachmentAttributes::No` here, or do we anticipate an API::Attachment identifier mapping to more than one editable image?
> Source/WebKit/UIProcess/ios/WKDrawingView.mm:126 > + (__bridge NSString *)kCGImagePropertyExifUserComment : base64Drawing
From what I can tell, base64Drawing should always exist because [drawing serialize] is never nil. But it might still be a good idea to bail if !base64Drawing, since this might not be the case in the future.
Dean Jackson
Comment 6
2018-11-27 10:40:28 PST
Comment on
attachment 355718
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=355718&action=review
> Source/WebKit/ChangeLog:41 > + Serialize strokes into the EXIF User Comment field.
Wow.
> Source/WebKit/UIProcess/WebPageProxy.cpp:8102 > +WebPageProxy::ShouldUpdateAttachmentAttributes WebPageProxy::willUpdateAttachmentAttributes(const API::Attachment& attachment)
Do you need the WebPageProxy:: namespace on ShouldUpdateAttachmentAttributes here?
Tim Horton
Comment 7
2018-11-27 11:39:07 PST
(In reply to Wenson Hsieh from
comment #5
)
> Comment on
attachment 355718
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=355718&action=review
> > > Source/WebKit/UIProcess/ios/EditableImageController.mm:144 > > + attachmentBacksEditableImage = true; > > Can we just return `WebPageProxy::ShouldUpdateAttachmentAttributes::No` > here, or do we anticipate an API::Attachment identifier mapping to more than > one editable image?
I think that’s fine, you’re right. Of course the thing I was worried about /was/ multiple editable images with the same API::Attachment, but your deduplicate-on-insert code should handle that.
> > Source/WebKit/UIProcess/ios/WKDrawingView.mm:126 > > + (__bridge NSString *)kCGImagePropertyExifUserComment : base64Drawing > > From what I can tell, base64Drawing should always exist because [drawing > serialize] is never nil. But it might still be a good idea to bail if > !base64Drawing, since this might not be the case in the future.
Yeah, I think so. (In reply to Dean Jackson from
comment #6
)
> Comment on
attachment 355718
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=355718&action=review
> > > Source/WebKit/UIProcess/WebPageProxy.cpp:8102 > > +WebPageProxy::ShouldUpdateAttachmentAttributes WebPageProxy::willUpdateAttachmentAttributes(const API::Attachment& attachment) > > Do you need the WebPageProxy:: namespace on ShouldUpdateAttachmentAttributes > here?
Shouldn’t, I think that’s just a copy-paste-o.
Tim Horton
Comment 8
2018-11-27 11:43:01 PST
(In reply to Tim Horton from
comment #7
)
> (In reply to Dean Jackson from
comment #6
) > > Comment on
attachment 355718
[details]
> > Patch > > > > View in context: > >
https://bugs.webkit.org/attachment.cgi?id=355718&action=review
> > > > > Source/WebKit/UIProcess/WebPageProxy.cpp:8102 > > > +WebPageProxy::ShouldUpdateAttachmentAttributes WebPageProxy::willUpdateAttachmentAttributes(const API::Attachment& attachment) > > > > Do you need the WebPageProxy:: namespace on ShouldUpdateAttachmentAttributes > > here? > > Shouldn’t, I think that’s just a copy-paste-o.
Nope, definitely need that.
Tim Horton
Comment 9
2018-11-27 11:46:36 PST
Created
attachment 355754
[details]
Patch
EWS Watchlist
Comment 10
2018-11-27 11:50:37 PST
Attachment 355754
[details]
did not pass style-queue: ERROR: Source/WebKit/Platform/spi/ios/PencilKitSPI.h:31: Alphabetical sorting problem. [build/include_order] [4] Total errors found: 1 in 16 files If any of these errors are false positives, please file a bug against check-webkit-style.
WebKit Commit Bot
Comment 11
2018-11-27 12:20:27 PST
Comment on
attachment 355754
[details]
Patch Clearing flags on attachment: 355754 Committed
r238566
: <
https://trac.webkit.org/changeset/238566
>
WebKit Commit Bot
Comment 12
2018-11-27 12:20:29 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug