WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 105839
[HTMLTemplateElement] Allow <template> content to be inspected
https://bugs.webkit.org/show_bug.cgi?id=105839
Summary
[HTMLTemplateElement] Allow <template> content to be inspected
Rafael Weinstein
Reported
2012-12-28 14:34:55 PST
<template> should be expandable in the 'elements' tab and it should contain a single '#document-fragment' child whose children are expandable.
Attachments
Patch
(5.45 KB, patch)
2012-12-28 14:36 PST
,
Rafael Weinstein
no flags
Details
Formatted Diff
Diff
Patch
(11.10 KB, patch)
2013-01-02 17:39 PST
,
Rafael Weinstein
no flags
Details
Formatted Diff
Diff
Patch
(11.13 KB, patch)
2013-01-02 20:45 PST
,
Rafael Weinstein
no flags
Details
Formatted Diff
Diff
Patch
(11.20 KB, patch)
2013-01-03 09:48 PST
,
Rafael Weinstein
no flags
Details
Formatted Diff
Diff
Patch
(12.77 KB, patch)
2013-01-04 15:04 PST
,
Rafael Weinstein
no flags
Details
Formatted Diff
Diff
Patch for landing
(13.03 KB, patch)
2013-01-08 14:59 PST
,
Rafael Weinstein
no flags
Details
Formatted Diff
Diff
Show Obsolete
(5)
View All
Add attachment
proposed patch, testcase, etc.
Rafael Weinstein
Comment 1
2012-12-28 14:36:51 PST
Created
attachment 180901
[details]
Patch
Rafael Weinstein
Comment 2
2012-12-28 14:40:09 PST
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?
Early Warning System Bot
Comment 3
2012-12-28 14:50:33 PST
Comment on
attachment 180901
[details]
Patch
Attachment 180901
[details]
did not pass qt-ews (qt): Output:
http://queues.webkit.org/results/15549924
Early Warning System Bot
Comment 4
2012-12-28 14:51:44 PST
Comment on
attachment 180901
[details]
Patch
Attachment 180901
[details]
did not pass qt-wk2-ews (qt): Output:
http://queues.webkit.org/results/15559831
EFL EWS Bot
Comment 5
2012-12-28 14:54:56 PST
Comment on
attachment 180901
[details]
Patch
Attachment 180901
[details]
did not pass efl-ews (efl): Output:
http://queues.webkit.org/results/15587019
Build Bot
Comment 6
2012-12-28 15:27:15 PST
Comment on
attachment 180901
[details]
Patch
Attachment 180901
[details]
did not pass mac-ews (mac): Output:
http://queues.webkit.org/results/15550992
Pavel Feldman
Comment 7
2012-12-29 03:05:25 PST
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 Feldman
Comment 8
2012-12-29 03:16:17 PST
> 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.
Rafael Weinstein
Comment 9
2013-01-02 17:36:28 PST
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
Rafael Weinstein
Comment 10
2013-01-02 17:39:00 PST
Created
attachment 181119
[details]
Patch
Rafael Weinstein
Comment 11
2013-01-02 17:40:36 PST
Ok, trying Pavel's suggestion.
Early Warning System Bot
Comment 12
2013-01-02 17:50:51 PST
Comment on
attachment 181119
[details]
Patch
Attachment 181119
[details]
did not pass qt-ews (qt): Output:
http://queues.webkit.org/results/15625750
Early Warning System Bot
Comment 13
2013-01-02 17:52:29 PST
Comment on
attachment 181119
[details]
Patch
Attachment 181119
[details]
did not pass qt-wk2-ews (qt): Output:
http://queues.webkit.org/results/15636645
Build Bot
Comment 14
2013-01-02 18:47:43 PST
Comment on
attachment 181119
[details]
Patch
Attachment 181119
[details]
did not pass mac-ews (mac): Output:
http://queues.webkit.org/results/15630745
Build Bot
Comment 15
2013-01-02 19:24:42 PST
Comment on
attachment 181119
[details]
Patch
Attachment 181119
[details]
did not pass win-ews (win): Output:
http://queues.webkit.org/results/15628765
Rafael Weinstein
Comment 16
2013-01-02 20:45:32 PST
Created
attachment 181141
[details]
Patch
Pavel Feldman
Comment 17
2013-01-03 00:46:32 PST
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.
Rafael Weinstein
Comment 18
2013-01-03 06:48:09 PST
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?
Rafael Weinstein
Comment 19
2013-01-03 09:48:41 PST
Created
attachment 181180
[details]
Patch
Rafael Weinstein
Comment 20
2013-01-03 09:48:55 PST
How ya like me now?
Rafael Weinstein
Comment 21
2013-01-04 15:04:57 PST
Created
attachment 181384
[details]
Patch
Rafael Weinstein
Comment 22
2013-01-04 15:05:19 PST
New patch resolves merge conflicts. Pavel: ping?
Rafael Weinstein
Comment 23
2013-01-08 14:59:34 PST
Created
attachment 181776
[details]
Patch for landing
WebKit Review Bot
Comment 24
2013-01-08 16:44:14 PST
Comment on
attachment 181776
[details]
Patch for landing Clearing flags on attachment: 181776 Committed
r139132
: <
http://trac.webkit.org/changeset/139132
>
WebKit Review Bot
Comment 25
2013-01-08 16:44:19 PST
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.
Top of Page
Format For Printing
XML
Clone This Bug