<template> should be expandable in the 'elements' tab and it should contain a single '#document-fragment' child whose children are expandable.
Created attachment 180901 [details] Patch
Here is the start of a patch for this. The main problem is that when anything in the templateContent changes, it is not updated in the UI. I believe this is because there isn't an associated instrumenting agent with the owner document of the content or its children. Pavel, a little background: The template element's content document fragment is "inert" (images don't load, script doesn't run, etc...). The way this is accomplished is that it is owned by a different document which doesn't have a browsing context (frame). Unfortunately. this means that instrumentingAgentsForDocument() currently always returns 0; What's the best way to approach this?
Comment on attachment 180901 [details] Patch Attachment 180901 [details] did not pass qt-ews (qt): Output: http://queues.webkit.org/results/15549924
Comment on attachment 180901 [details] Patch Attachment 180901 [details] did not pass qt-wk2-ews (qt): Output: http://queues.webkit.org/results/15559831
Comment on attachment 180901 [details] Patch Attachment 180901 [details] did not pass efl-ews (efl): Output: http://queues.webkit.org/results/15587019
Comment on attachment 180901 [details] Patch Attachment 180901 [details] did not pass mac-ews (mac): Output: http://queues.webkit.org/results/15550992
Comment on attachment 180901 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=180901&action=review > Source/WebCore/inspector/InspectorDOMAgent.cpp:1300 > + if (element->hasTagName(HTMLNames::templateTag)) #if ENABLE(TEMPLATE_ELEMENT) > Source/WebCore/inspector/front-end/DOMAgent.js:78 > + if (payload.templateContent) { No need for {} around one line block.
> Pavel, a little background: The template element's content document fragment is "inert" (images don't load, script doesn't run, etc...). The way this is accomplished is that it is owned by a different document which doesn't have a browsing context (frame). > > Unfortunately. this means that instrumentingAgentsForDocument() currently always returns 0; > > What's the best way to approach this? Could we do something like m_templateContentsOwnerDocument->setTemplateContentsOwnerDocumentParent(this); in modify Document::templateContentsOwnerDocument()? Then instrumentingAgentsForDocument would follow that link and fetch appropriate page.
Comment on attachment 180901 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=180901&action=review >> Source/WebCore/inspector/InspectorDOMAgent.cpp:1300 >> + if (element->hasTagName(HTMLNames::templateTag)) > > #if ENABLE(TEMPLATE_ELEMENT) done >> Source/WebCore/inspector/front-end/DOMAgent.js:78 >> + if (payload.templateContent) { > > No need for {} around one line block. done
Created attachment 181119 [details] Patch
Ok, trying Pavel's suggestion.
Comment on attachment 181119 [details] Patch Attachment 181119 [details] did not pass qt-ews (qt): Output: http://queues.webkit.org/results/15625750
Comment on attachment 181119 [details] Patch Attachment 181119 [details] did not pass qt-wk2-ews (qt): Output: http://queues.webkit.org/results/15636645
Comment on attachment 181119 [details] Patch Attachment 181119 [details] did not pass mac-ews (mac): Output: http://queues.webkit.org/results/15630745
Comment on attachment 181119 [details] Patch Attachment 181119 [details] did not pass win-ews (win): Output: http://queues.webkit.org/results/15628765
Created attachment 181141 [details] Patch
Comment on attachment 181141 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=181141&action=review > Source/WebCore/dom/Document.cpp:616 > + m_inertDocument.clear(); This will happen on its own. > Source/WebCore/dom/Document.cpp:5949 > +Document* Document::inertDocument() I don't find the new name self-explanatory, I'd rather leave it as is. r- is for this, otherwise lgtm.
Comment on attachment 181141 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=181141&action=review >> Source/WebCore/dom/Document.cpp:616 >> + m_inertDocument.clear(); > > This will happen on its own. done >> Source/WebCore/dom/Document.cpp:5949 >> +Document* Document::inertDocument() > > I don't find the new name self-explanatory, I'd rather leave it as is. r- is for this, otherwise lgtm. I renamed this one to avoid having to call the back pointer "templateContentsOwnerDocumentOwner" (what is currently "inertDocumentCreator"). I suppose I could go with "templateContentsOwner" and "templateContentsOwnerCreator"? ("Document" is implied in the type). Thoughts?
Created attachment 181180 [details] Patch
How ya like me now?
Created attachment 181384 [details] Patch
New patch resolves merge conflicts. Pavel: ping?
Created attachment 181776 [details] Patch for landing
Comment on attachment 181776 [details] Patch for landing Clearing flags on attachment: 181776 Committed r139132: <http://trac.webkit.org/changeset/139132>
All reviewed patches have been landed. Closing bug.