Bug 181637

Summary: Add injected bundle SPI to replace subresource URLs when dropping or pasting rich content
Product: WebKit Reporter: Wenson Hsieh <wenson_hsieh>
Component: HTML EditingAssignee: Wenson Hsieh <wenson_hsieh>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, mitz, rniwa, thorton, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
First pass
none
Try to fix Windows builds
thorton: review+
Bump WKBundlePageEditorClient version
none
Bump WKBundlePageEditorClient version none

Wenson Hsieh
Reported Sunday, January 14, 2018 8:43:47 PM UTC
Attachments
First pass (38.00 KB, patch)
2018-01-14 13:24 PST, Wenson Hsieh
no flags
Try to fix Windows builds (40.43 KB, patch)
2018-01-14 14:27 PST, Wenson Hsieh
thorton: review+
Bump WKBundlePageEditorClient version (41.49 KB, patch)
2018-01-16 19:19 PST, Wenson Hsieh
no flags
Bump WKBundlePageEditorClient version (41.85 KB, patch)
2018-01-16 19:29 PST, Wenson Hsieh
no flags
Wenson Hsieh
Comment 1 Sunday, January 14, 2018 9:24:38 PM UTC
Created attachment 331309 [details] First pass
Wenson Hsieh
Comment 2 Sunday, January 14, 2018 10:27:43 PM UTC
Created attachment 331312 [details] Try to fix Windows builds
Tim Horton
Comment 3 Wednesday, January 17, 2018 12:53:38 AM UTC
Comment on attachment 331312 [details] Try to fix Windows builds View in context: https://bugs.webkit.org/attachment.cgi?id=331312&action=review > Source/WebCore/editing/cocoa/WebContentReaderCocoa.mm:293 > + HashMap<AtomicString, AtomicString> subresourceURLToClientURLMap; Don’t see the need for AtomicString? > Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePageEditorClient.h:110 > + WKBundlePageReplacementURLForResource replacementURLForResource; This is a big no-no. You need to make a new version and append this to the bottom.
Wenson Hsieh
Comment 4 Wednesday, January 17, 2018 3:09:09 AM UTC
Comment on attachment 331312 [details] Try to fix Windows builds View in context: https://bugs.webkit.org/attachment.cgi?id=331312&action=review >> Source/WebCore/editing/cocoa/WebContentReaderCocoa.mm:293 >> + HashMap<AtomicString, AtomicString> subresourceURLToClientURLMap; > > Don’t see the need for AtomicString? Just spoke with Ryosuke about this — since the keys and values of this dictionary are either element attribute values or going to become attribute values after replacement, we'll end up making AtomicStrings for these anyways. For this reason, the existing blobURLMaps also in this file are HashMap<AtomicString, AtomicString>, so it seems like this should also be a HashMap<AtomicString, AtomicString>. >> Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePageEditorClient.h:110 >> + WKBundlePageReplacementURLForResource replacementURLForResource; > > This is a big no-no. You need to make a new version and append this to the bottom. Got it — fixed!
Wenson Hsieh
Comment 5 Wednesday, January 17, 2018 3:19:40 AM UTC
Created attachment 331450 [details] Bump WKBundlePageEditorClient version
Wenson Hsieh
Comment 6 Wednesday, January 17, 2018 3:29:00 AM UTC
Created attachment 331452 [details] Bump WKBundlePageEditorClient version
WebKit Commit Bot
Comment 7 Wednesday, January 17, 2018 5:07:51 PM UTC
Comment on attachment 331452 [details] Bump WKBundlePageEditorClient version Clearing flags on attachment: 331452 Committed r227068: <https://trac.webkit.org/changeset/227068>
Note You need to log in before you can comment on or make changes to this bug.