RESOLVED FIXED132612
"Flash of content without image" when pasting a raw image from the pasteboard
https://bugs.webkit.org/show_bug.cgi?id=132612
Summary "Flash of content without image" when pasting a raw image from the pasteboard
Brady Eidson
Reported 2014-05-06 09:54:15 PDT
"Flash of content without image" when pasting a raw image from the pasteboard The sequence of events goes like this: -EditorMac has an ArchiveResource for the raw image and puts it in the document loader. -Editor inserts the new document fragment with the <img> element for the raw image -CachedResourceLoader is asked for the CachedImage for the new image -Because a CachedImage doesn't exist yet, a "substitute resource delivery" is scheduled, where the ArchiveResource will be loaded after a zero-delay -But before it is loaded, a layout and paint happens with the image resource missing, causing a radical change in layout and a "flash of content without image" that is quite noticeable. I have a simple patch which lets certain flagged ArchiveResources load into a CachedResource synchronously. It's a little deficient in that the load does not go through ResourceLoader and therefore doesn't get load callbacks. In this case (pasting a raw image from the pasteboard that has a webkit-fake-url: url) the tradeoff seems fine... but going forward we really need a better solution for this type of problem. <rdar://problem/16826199>
Attachments
Patch v1 (5.26 KB, patch)
2014-05-06 10:15 PDT, Brady Eidson
thorton: review-
thorton: commit-queue-
Patch v2 - Only in the "paste a single raw image" case (5.74 KB, patch)
2014-05-06 12:02 PDT, Brady Eidson
no flags
Brady Eidson
Comment 1 2014-05-06 10:15:13 PDT
Created attachment 230916 [details] Patch v1
Tim Horton
Comment 2 2014-05-06 10:56:45 PDT
It would be good if alexey or someone could peek at this too.
Tim Horton
Comment 3 2014-05-06 10:57:43 PDT
r- because this affects more than just the single image case as discussed on IRC
Brady Eidson
Comment 4 2014-05-06 12:02:59 PDT
Created attachment 230922 [details] Patch v2 - Only in the "paste a single raw image" case
WebKit Commit Bot
Comment 5 2014-05-06 13:10:30 PDT
Comment on attachment 230922 [details] Patch v2 - Only in the "paste a single raw image" case Clearing flags on attachment: 230922 Committed r168376: <http://trac.webkit.org/changeset/168376>
WebKit Commit Bot
Comment 6 2014-05-06 13:10:33 PDT
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.