Summary: | Improve showRenderTree() output. | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | zalan <zalan> | ||||
Component: | Layout and Rendering | Assignee: | zalan <zalan> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | bjonesbe, commit-queue, dbates, esprehn+autocc, glenn, hyatt, kling, kondapallykalyan, mmaxfield, simon.fraser, thorton | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
zalan
2014-08-25 20:29:41 PDT
proposed output: has(L)ayer, (C)omposited, (D)irty layout, Dirty (S)tyle, (R)elative/Stick(Y)/A(B)solute/Fi(X)ed positioned, (O)verflow clipping, (A)nonymous, (G)enerated, (F)loating LCD----G- RenderView (0.00, 0.00) (1391.00, 711.00) renderer->(0x7fa782225b30) L-D------ HTML RenderBlock (0.00, 0.00) (1391.00, 711.00) renderer->(0x7fa780450630) node->(0x7fa78044af30) --D------ BODY RenderBody (0.00, 0.00) (1391.00, 711.00) renderer->(0x7fa780659110) node->(0x7fa780716450) L-D-R---- DIV RenderBlock (0.00, 0.00) (1391.00, 711.00) renderer->(0x7fa7806566c0) node->(0x7fa780716800) --D------ DIV RenderBlock (0.00, 0.00) (1391.00, 0.00) renderer->(0x7fa78064b010) node->(0x7fa780717bb0) L-D-B---- A RenderBlock (-13000.00, 0.00) (330.00, 15.00) renderer->(0x7fa780641220) node->(0x7fa78071ec80) --D------ #text RenderText renderer->(0x7fa7806574a0) node->(0x7fa78071e560) "Screen reader users, click here to turn off Google Instant." --D------ DIV RenderBlock (0.00, 0.00) (1391.00, 60.00) renderer->(0x7fa780654d40) node->(0x7fa780659940) L-D-B---- DIV RenderBlock (0.00, 0.00) (1391.00, 60.00) renderer->(0x7fa780648a00) node->(0x7fa780643970) L-D-R---- DIV RenderFlexibleBox (0.00, 0.00) (1391.00, 60.00) renderer->(0x7fa7806431e0) node->(0x7fa780641820) L-D-R---- DIV RenderFlexibleBox (0.00, 0.00) (1391.00, 60.00) renderer->(0x7fa78064a8b0) node->(0x7fa780642bc0) --D------ DIV RenderFlexibleBox (1065.06, 18.00) (181.59, 24.00) renderer->(0x7fa780649f60) node->(0x7fa78064b440) --D------ DIV RenderFlexibleBox (0.00, 0.00) (60.00, 24.00) renderer->(0x7fa7806576a0) node->(0x7fa7806474f0) L-D--O--- A RenderBlock (0.00, 0.00) (60.00, 24.00) renderer->(0x7fa780647db0) node->(0x7fa780643510) --------- RootInlineBox (30.47, 4.00) (29.53, 15.00) (0x7fa78226b4d0) --------- InlineTextBox (30.47, 4.00) (29.53, 15.00) (0x7fa78226b470) run(0, 4) "+You" --D------ #text RenderText renderer->(0x7fa780654750) node->(0x7fa7806436a0) "+You" (In reply to comment #1) > proposed output: > > has(L)ayer, (C)omposited, (D)irty layout, Dirty (S)tyle, (R)elative/Stick(Y)/A(B)solute/Fi(X)ed positioned, (O)verflow clipping, (A)nonymous, (G)enerated, (F)loating > LCD----G- RenderView (0.00, 0.00) (1391.00, 711.00) renderer->(0x7fa782225b30) > L-D------ HTML RenderBlock (0.00, 0.00) (1391.00, 711.00) renderer->(0x7fa780450630) node->(0x7fa78044af30) I think it would be useful to separate the dirty flags from the rest, and order things differently. How about: (R)elative/Stick(Y)/A(B)solute/Fi(X)ed positioned, (O)verflow clipping, (A)nonymous, (G)enerated, (F)loating has(L)ayer, (C)omposited [space] Dirty (S)tyle, (D)irty layout (In reply to comment #2) > (In reply to comment #1) > > proposed output: > > > > has(L)ayer, (C)omposited, (D)irty layout, Dirty (S)tyle, (R)elative/Stick(Y)/A(B)solute/Fi(X)ed positioned, (O)verflow clipping, (A)nonymous, (G)enerated, (F)loating > > LCD----G- RenderView (0.00, 0.00) (1391.00, 711.00) renderer->(0x7fa782225b30) > > L-D------ HTML RenderBlock (0.00, 0.00) (1391.00, 711.00) renderer->(0x7fa780450630) node->(0x7fa78044af30) > > I think it would be useful to separate the dirty flags from the rest, and order things differently. How about: > > (R)elative/Stick(Y)/A(B)solute/Fi(X)ed positioned, (O)verflow clipping, (A)nonymous, (G)enerated, (F)loating has(L)ayer, (C)omposited [space] Dirty (S)tyle, (D)irty layout Good idea! I completely forgot about proper ordering. Created attachment 237162 [details]
Patch
I looks like the class and style information is missing from the new dump. I have often found that information useful. Did you remove it deliberately? (In reply to comment #5) > I looks like the class and style information is missing from the new dump. I have often found that information useful. Did you remove it deliberately? Yes, I did. While I also find that info useful in certain scenarios, I think we should be using showNodeTree()/showNodeTreeForThis() to collect node related information instead. There's also a showLineTree()/showLineTreeForThis() helper to display inline content. I decided to include that in the showRenderTree() printout as I believe inlines should be part of the render tree output. I am also saddened by the removal of style and class information from the output of showRenderTreeForThis(). (In reply to comment #7) > I am also saddened by the removal of style and class information from the output of showRenderTreeForThis(). Disregard this comment. It's seems sufficient to use showNodeTreeForThis() to see this information. For some reason, I misread "showNodeTreeForThis()" as referring to Node::showTreeForThis() in comment 6 and thought it would be inconvenient in a debug session to have to explicitly call Node::showTreeForThis() on the renderer's node (RenderObject::m_node) as opposed to calling a function directly on a RenderObject to see a tree diagram with id and style information. Comment on attachment 237162 [details] Patch Clearing flags on attachment: 237162 Committed r173114: <http://trac.webkit.org/changeset/173114> All reviewed patches have been landed. Closing bug. |