Bug 180892 - [Attachment Support] Support representing pasted or dropped content using attachment elements
Summary: [Attachment Support] Support representing pasted or dropped content using att...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Wenson Hsieh
URL:
Keywords: InRadar
Depends on: 180853
Blocks: 180924
  Show dependency treegraph
 
Reported: 2017-12-15 16:36 PST by Wenson Hsieh
Modified: 2017-12-18 20:05 PST (History)
5 users (show)

See Also:


Attachments
Depends on https://bugs.webkit.org/show_bug.cgi?id=180853 (28.07 KB, patch)
2017-12-15 22:44 PST, Wenson Hsieh
thorton: review+
Details | Formatted Diff | Diff
Rebase on master (25.25 KB, patch)
2017-12-18 16:35 PST, Wenson Hsieh
no flags Details | Formatted Diff | Diff
Rebase on master again (25.21 KB, patch)
2017-12-18 18:49 PST, Wenson Hsieh
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Wenson Hsieh 2017-12-15 16:36:45 PST
<rdar://problem/36064210>
Comment 1 Wenson Hsieh 2017-12-15 22:44:23 PST
Created attachment 329561 [details]
Depends on https://bugs.webkit.org/show_bug.cgi?id=180853
Comment 2 Tim Horton 2017-12-18 13:18:56 PST
Comment on attachment 329561 [details]
Depends on https://bugs.webkit.org/show_bug.cgi?id=180853

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

> Source/WebCore/ChangeLog:10
> +        replaceRichContentWithAttachmentsIfNecessary to replace object elements with attachments; see comments below for

Still slightly concerned about all <object>s becoming <attachment>s.

> Source/WebCore/ChangeLog:28
> +        of generating markup from NSTextAttachments; this currently causes the web process to crash on an unrecognized
> +        selector.

Crazy
Comment 3 Wenson Hsieh 2017-12-18 13:49:08 PST
Comment on attachment 329561 [details]
Depends on https://bugs.webkit.org/show_bug.cgi?id=180853

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

>> Source/WebCore/ChangeLog:10
>> +        replaceRichContentWithAttachmentsIfNecessary to replace object elements with attachments; see comments below for
> 
> Still slightly concerned about all <object>s becoming <attachment>s.

True, it's...kinda weird.

One caveat is that we only do this replacement for objects whose `data` have already been replaced by blob URLs. And for pasted/dropped <object>s that don't have data URLs or haven't been blob-replaced, we'll simply remove them from the inserted fragment.

>> Source/WebCore/ChangeLog:28
>> +        selector.
> 
> Crazy

🙃

Thankfully less so after this change.
Comment 4 Wenson Hsieh 2017-12-18 16:35:16 PST
Created attachment 329707 [details]
Rebase on master
Comment 5 Wenson Hsieh 2017-12-18 18:49:00 PST
Created attachment 329724 [details]
Rebase on master again
Comment 6 WebKit Commit Bot 2017-12-18 20:03:25 PST
Comment on attachment 329724 [details]
Rebase on master again

Clearing flags on attachment: 329724

Committed r226093: <https://trac.webkit.org/changeset/226093>