<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@apple.com" title="Chris Dumez <cdumez@apple.com>"> <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">> In EditorMac.mm:
> Editor::createFragmentAndAddResources(NSAttributedString *string)
>
> We:
> 1. Defer loading
> 2. Create a DocumentFragment as a list of resources from the DTFD Data
> 3. Register the resources with the DocumentLoader (in this case, there is
> one resource with a webkit-fake-url and its associated data)
> 4. Stop load deferring
>
> However, with WebKit2, I see the following
> Calling createFragment()
> WebLoaderStrategy::scheduleLoad(webkit-fake-url://36D48F33-17C4-4958-8856-
> 569F23B788CE/_91448609_rosetta_crash_land_624_v3.png)
> DocumentLoader::scheduleArchiveLoad(webkit-fake-url://36D48F33-17C4-4958-
> 8856-569F23B788CE/_91448609_rosetta_crash_land_624_v3.png)
> Adding archive resource to loader, url:
> webkit-fake-url://36D48F33-17C4-4958-8856-569F23B788CE/
> _91448609_rosetta_crash_land_624_v3.png // Too late
>
> So load deferring seems to fail we try to load
> webkit-fake-url://36D48F33-17C4-4958-8856-569F23B788CE/
> _91448609_rosetta_crash_land_624_v3.png *before* we had a chance registering
> it with the DocumentLoader.</span >
Call track that causes the load to start:
1 0x105125d03 WebKit::WebLoaderStrategy::loadResource(WebCore::Frame&, WebCore::CachedResource&, WebCore::ResourceRequest const&, WebCore::ResourceLoaderOptions const&)
2 0x1089b892e WebCore::CachedResource::load(WebCore::CachedResourceLoader&)
3 0x1089bde4c WebCore::CachedResourceLoader::requestResource(WebCore::CachedResource::Type, WebCore::CachedResourceRequest&&)
4 0x1089bcb79 WebCore::CachedResourceLoader::requestImage(WebCore::CachedResourceRequest&&)
5 0x108eb322b WebCore::ImageLoader::updateFromElement()
6 0x108dd7316 WebCore::HTMLImageElement::selectImageSource()
7 0x108c43ced WebCore::Element::attributeChanged(WebCore::QualifiedName const&, WTF::AtomicString const&, WTF::AtomicString const&, WebCore::Element::AttributeModificationReason)
8 0x108c44709 WebCore::Element::parserSetAttributes(WTF::Vector<WebCore::Attribute, 0ul, WTF::CrashOnOverflow, 16ul> const&)
9 0x108da3038 WebCore::HTMLConstructionSite::createHTMLElementOrFindCustomElementInterface(WebCore::AtomicHTMLToken&, WebCore::JSCustomElementInterface**)
10 0x108da338d WebCore::HTMLConstructionSite::insertSelfClosingHTMLElement(WebCore::AtomicHTMLToken&)
11 0x108e4de00 WebCore::HTMLTreeBuilder::processStartTagForInBody(WebCore::AtomicHTMLToken&)
12 0x108e4a79a WebCore::HTMLTreeBuilder::processStartTag(WebCore::AtomicHTMLToken&)
13 0x108e49a18 WebCore::HTMLTreeBuilder::constructTree(WebCore::AtomicHTMLToken&)
14 0x108db6356 WebCore::HTMLDocumentParser::constructTreeFromHTMLToken(WebCore::HTMLTokenizer::TokenPtr&)
15 0x108db617c WebCore::HTMLDocumentParser::pumpTokenizerLoop(WebCore::HTMLDocumentParser::SynchronousMode, bool, WebCore::PumpSession&)
16 0x108db5b83 WebCore::HTMLDocumentParser::pumpTokenizer(WebCore::HTMLDocumentParser::SynchronousMode)
17 0x108db6432 WebCore::HTMLDocumentParser::insert(WebCore::SegmentedString const&)
18 0x108db6e28 WebCore::HTMLDocumentParser::parseDocumentFragment(WTF::String const&, WebCore::DocumentFragment&, WebCore::Element&, WebCore::ParserContentPolicy)
19 0x1093e0a53 WebCore::createFragmentForInnerOuterHTML(WebCore::Element&, WTF::String const&, WebCore::ParserContentPolicy, int&)
20 0x108c494db WebCore::Element::setInnerHTML(WTF::String const&, int&)
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>