<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_UNCONFIRMED "
   title="UNCONFIRMED - use data uri instead of webkit-fake-url for contentEditable"
   href="https://bugs.webkit.org/show_bug.cgi?id=49141#c18">Comment # 18</a>
              on <a class="bz_bug_link 
          bz_status_UNCONFIRMED "
   title="UNCONFIRMED - use data uri instead of webkit-fake-url for contentEditable"
   href="https://bugs.webkit.org/show_bug.cgi?id=49141">bug 49141</a>
              from <span class="vcard"><a class="email" href="mailto:cdumez&#64;apple.com" title="Chris Dumez &lt;cdumez&#64;apple.com&gt;"> <span class="fn">Chris Dumez</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=49141#c17">comment #17</a>)
<span class="quote">&gt; In EditorMac.mm:
&gt; Editor::createFragmentAndAddResources(NSAttributedString *string)
&gt; 
&gt; We:
&gt; 1. Defer loading
&gt; 2. Create a DocumentFragment as a list of resources from the DTFD Data
&gt; 3. Register the resources with the DocumentLoader (in this case, there is
&gt; one resource with a webkit-fake-url and its associated data)
&gt; 4. Stop load deferring
&gt; 
&gt; However, with WebKit2, I see the following
&gt; Calling createFragment()
&gt; WebLoaderStrategy::scheduleLoad(webkit-fake-url://36D48F33-17C4-4958-8856-
&gt; 569F23B788CE/_91448609_rosetta_crash_land_624_v3.png)
&gt; DocumentLoader::scheduleArchiveLoad(webkit-fake-url://36D48F33-17C4-4958-
&gt; 8856-569F23B788CE/_91448609_rosetta_crash_land_624_v3.png)
&gt; Adding archive resource to loader, url:
&gt; webkit-fake-url://36D48F33-17C4-4958-8856-569F23B788CE/
&gt; _91448609_rosetta_crash_land_624_v3.png // Too late
&gt; 
&gt; So load deferring seems to fail we try to load
&gt; webkit-fake-url://36D48F33-17C4-4958-8856-569F23B788CE/
&gt; _91448609_rosetta_crash_land_624_v3.png *before* we had a chance registering
&gt; it with the DocumentLoader.</span >

Call track that causes the load to start:
1   0x105125d03 WebKit::WebLoaderStrategy::loadResource(WebCore::Frame&amp;, WebCore::CachedResource&amp;, WebCore::ResourceRequest const&amp;, WebCore::ResourceLoaderOptions const&amp;)
2   0x1089b892e WebCore::CachedResource::load(WebCore::CachedResourceLoader&amp;)
3   0x1089bde4c WebCore::CachedResourceLoader::requestResource(WebCore::CachedResource::Type, WebCore::CachedResourceRequest&amp;&amp;)
4   0x1089bcb79 WebCore::CachedResourceLoader::requestImage(WebCore::CachedResourceRequest&amp;&amp;)
5   0x108eb322b WebCore::ImageLoader::updateFromElement()
6   0x108dd7316 WebCore::HTMLImageElement::selectImageSource()
7   0x108c43ced WebCore::Element::attributeChanged(WebCore::QualifiedName const&amp;, WTF::AtomicString const&amp;, WTF::AtomicString const&amp;, WebCore::Element::AttributeModificationReason)
8   0x108c44709 WebCore::Element::parserSetAttributes(WTF::Vector&lt;WebCore::Attribute, 0ul, WTF::CrashOnOverflow, 16ul&gt; const&amp;)
9   0x108da3038 WebCore::HTMLConstructionSite::createHTMLElementOrFindCustomElementInterface(WebCore::AtomicHTMLToken&amp;, WebCore::JSCustomElementInterface**)
10  0x108da338d WebCore::HTMLConstructionSite::insertSelfClosingHTMLElement(WebCore::AtomicHTMLToken&amp;)
11  0x108e4de00 WebCore::HTMLTreeBuilder::processStartTagForInBody(WebCore::AtomicHTMLToken&amp;)
12  0x108e4a79a WebCore::HTMLTreeBuilder::processStartTag(WebCore::AtomicHTMLToken&amp;)
13  0x108e49a18 WebCore::HTMLTreeBuilder::constructTree(WebCore::AtomicHTMLToken&amp;)
14  0x108db6356 WebCore::HTMLDocumentParser::constructTreeFromHTMLToken(WebCore::HTMLTokenizer::TokenPtr&amp;)
15  0x108db617c WebCore::HTMLDocumentParser::pumpTokenizerLoop(WebCore::HTMLDocumentParser::SynchronousMode, bool, WebCore::PumpSession&amp;)
16  0x108db5b83 WebCore::HTMLDocumentParser::pumpTokenizer(WebCore::HTMLDocumentParser::SynchronousMode)
17  0x108db6432 WebCore::HTMLDocumentParser::insert(WebCore::SegmentedString const&amp;)
18  0x108db6e28 WebCore::HTMLDocumentParser::parseDocumentFragment(WTF::String const&amp;, WebCore::DocumentFragment&amp;, WebCore::Element&amp;, WebCore::ParserContentPolicy)
19  0x1093e0a53 WebCore::createFragmentForInnerOuterHTML(WebCore::Element&amp;, WTF::String const&amp;, WebCore::ParserContentPolicy, int&amp;)
20  0x108c494db WebCore::Element::setInnerHTML(WTF::String const&amp;, int&amp;)
21  0x105ae21c8 -[DOMElement setInnerHTML:]
22  0x7fffac179539 -[NSHTMLWriter readDocumentFragment:]
23  0x7fffac1795e5 -[NSHTMLWriter documentFragmentForDocument:]
24  0x7fffac17f795 -[NSAttributedString(NSAttributedStringUIFoundationAdditions) _documentFromRange:document:documentAttributes:subresources:]
25  0x105b6b898 _WebCreateFragment
26  0x108c346ce WebCore::Editor::createFragment(NSAttributedString*)
27  0x108c3c623 WebCore::Editor::createFragmentAndAddResources(NSAttributedString*)</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>