Bug 79351 - [Shadow DOM] Make Node::showTreeForThis dump multiple shadow roots.
Summary: [Shadow DOM] Make Node::showTreeForThis dump multiple shadow roots.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Hayato Ito
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-23 02:10 PST by Hayato Ito
Modified: 2012-02-24 04:01 PST (History)
6 users (show)

See Also:


Attachments
dump multi (5.05 KB, patch)
2012-02-23 02:13 PST, Hayato Ito
no flags Details | Formatted Diff | Diff
dump multi (5.79 KB, patch)
2012-02-23 03:04 PST, Hayato Ito
no flags Details | Formatted Diff | Diff
Patch for landing (5.83 KB, patch)
2012-02-23 19:50 PST, Hayato Ito
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Hayato Ito 2012-02-23 02:10:58 PST
Make Node::showTreeForThis (and showTreeForThisAcrossFrame) dump multiple shadow roots.
The current implementation dumps only the first shadow root. Which is not useful for debugging an element which has multiple shadow roots.
Comment 1 Hayato Ito 2012-02-23 02:13:39 PST
Created attachment 128439 [details]
dump multi
Comment 2 Hayato Ito 2012-02-23 02:18:15 PST
The sample output is here:

*			DIV	0x7fffe377c080 CLASS=shadowHost
				#shadow-root	0x7fffe4221400
					#shadow-root	0x7fffe3793000
						DIV	0x7fffe3794300 CLASS=class1
							DIV	0x7fffe3794180 CLASS=class3
							SHADOW	0x7fffe3794200 CLASS=shadow
							DIV	0x7fffe3794280 CLASS=class3
					DIV	0x7fffe377c200 CLASS=class1
						DIV	0x7fffe377c100 CLASS=class2
						CONTENT	0x7fffe37a45a0 CLASS=content
						DIV	0x7fffe377c180 CLASS=class2
				DIV	0x7fffe3812880 CLASS=lightChild1
				DIV	0x7fffe377c000 CLASS=lightChild2


The younger shadowRoot is displayed as a child of olderShadowRoot, which fits my mental model.
It also matchs the relation between shadowHost and shadowRoot. A child is always rendered earlier than the parent.
Comment 3 Hayato Ito 2012-02-23 03:04:01 PST
Created attachment 128448 [details]
dump multi
Comment 4 Hayato Ito 2012-02-23 03:06:20 PST
I wrongly committed the parts of this patch with http://trac.webkit.org/changeset/108605.
Which was unintentional.

This patch includes the updated version.
Comment 5 Dimitri Glazkov (Google) 2012-02-23 09:12:34 PST
Comment on attachment 128448 [details]
dump multi

ok. Would love to have something more sophisticated in the future, like an ASCII-drawn tree stack, but this is totally fine.
Comment 6 WebKit Review Bot 2012-02-23 18:38:02 PST
Comment on attachment 128448 [details]
dump multi

Rejecting attachment 128448 [details] from commit-queue.

Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 1

ERROR: /mnt/git/webkit-commit-queue/Source/WebCore/ChangeLog neither lists a valid reviewer nor contains the string "Unreviewed" or "Rubber stamp" (case insensitive).

Full output: http://queues.webkit.org/results/11608585
Comment 7 Hayato Ito 2012-02-23 19:30:41 PST
Let me update the ChageLog, which misses a reviewer line.

(In reply to comment #6)
> (From update of attachment 128448 [details])
> Rejecting attachment 128448 [details] from commit-queue.
> 
> Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 1
> 
> ERROR: /mnt/git/webkit-commit-queue/Source/WebCore/ChangeLog neither lists a valid reviewer nor contains the string "Unreviewed" or "Rubber stamp" (case insensitive).
> 
> Full output: http://queues.webkit.org/results/11608585
Comment 8 Hayato Ito 2012-02-23 19:50:29 PST
Created attachment 128634 [details]
Patch for landing
Comment 9 WebKit Review Bot 2012-02-24 03:59:45 PST
The commit-queue encountered the following flaky tests while processing attachment 128634 [details]:

perf/object-keys.html bug 63769 (author: ojan@chromium.org)
The commit-queue is continuing to process your patch.
Comment 10 WebKit Review Bot 2012-02-24 04:01:53 PST
Comment on attachment 128634 [details]
Patch for landing

Clearing flags on attachment: 128634

Committed r108770: <http://trac.webkit.org/changeset/108770>
Comment 11 WebKit Review Bot 2012-02-24 04:01:58 PST
All reviewed patches have been landed.  Closing bug.