REGRESSION (r155700): Pasting an image into content-editable regions is broken
1. Create a page with a content editable region
2. Open an image in Preview.app
3. Copy that image onto your pasteboard (so your pasteboard has *only* an image type on it)
4. Select-all in the content editable region, then paste.
You see the broken image icon instead of the image you pasted.
In radar <rdar://problem/16654156>
This happens because 155700 reorders the "get document fragment from image resource" code to add the image resource to the DocumentLoader *after* creating the document fragment that uses it.
Previously we added it before.
Attaching the small patch that fixes the bug by restoring the previous behavior.
Seems like this can be layout testable, but I don't have the cycles to follow through with the test today.
Created attachment 229648 [details]
Fix without test
I've messed around trying to get a test for this for about 3 hours so I could land it. The test obviously works in the browser. But no matter what I do I can't get it to work in TestWebKitAPI.
I literally can't spend anymore time on this right now. It'd be awesome if somebody could figure it out to land.
Created attachment 229669 [details]
Fix with attempted test.
We should land this without the test for now. The fix is restoring old working behavior, and this bug is blocking more important work.
r? on the first patch.
Please add the ChangeLog
Landed the fix itself in https://trac.webkit.org/changeset/167517
Will leave this bug open for future exploration into getting the test working.
Comment on attachment 229648 [details]
Fix without test
Cleared Enrica Casucci's review+ from obsolete attachment 229648 [details] so that this bug does not appear in http://webkit.org/pending-commit.