[webkit-help] Get src and element from render object in dump tree

Lihuan Xie asuratse at hotmail.com
Sat Apr 10 13:44:21 PDT 2010


Is the question too stupid...?

From: asuratse at hotmail.com
To: webkit-help at lists.webkit.org
Date: Fri, 9 Apr 2010 18:48:51 -0500
Subject: [webkit-help] Get src and element from render object in dump tree








Dear everyone, 
    I am new to study Webkit for Chrome. In short, I used dump render tree for Google page: http://www.google.com : 
layer at (0,0) size 800x600 
  RenderView at (0,0) size 800x600 
layer at (0,0) size 800x371 
  RenderBlock {HTML} at (0,0) size 800x371 
    RenderBody {BODY} at (8,3) size 784x352 [bgcolor=#FFFFFF] 
      RenderBlock {DIV} at (0,0) size 784x24 
        RenderBlock (floating) {DIV} at (0,0) size 377x23 
          RenderInline {NOBR} at (0,0) size 377x16 
            RenderInline {B} at (0,0) size 29x16 
              RenderText {#text} at (0,1) size 29x16 
                text run at (0,1) width 29: "Web" 
            RenderText {#text} at (35,1) size 4x16 
              text run at (35,1) width 4: " " 
            RenderInline {A} at (0,0) size 42x16 [color=#0000CC] 
              RenderText {#text} at (39,1) size 42x16 
                text run at (39,1) width 42: "Images" 
            RenderText {#text} at (87,1) size 4x16 
              text run at (87,1) width 4: " " 
            RenderInline {A} at (0,0) size 40x16 [color=#0000CC] 
              RenderText {#text} at (91,1) size 40x16 
                text run at (91,1) width 40: "Videos" 
            RenderText {#text} at (137,1) size 4x16 
              text run at (137,1) width 4: " " 
            RenderInline {A} at (0,0) size 32x16 [color=#0000CC] 
              RenderText {#text} at (141,1) size 32x16 
                text run at (141,1) width 32: "Maps" 
            RenderText {#text} at (179,1) size 4x16 
              text run at (179,1) width 4: " " 
            RenderInline {A} at (0,0) size 32x16 [color=#0000CC] 
              RenderText {#text} at (183,1) size 32x16 
                text run at (183,1) width 32: "News" 
            RenderText {#text} at (221,1) size 4x16 
              text run at (221,1) width 4: " " 
            RenderInline {A} at (0,0) size 54x16 [color=#0000CC] 
              RenderText {#text} at (225,1) size 54x16 
                text run at (225,1) width 54: "Shopping" 
            RenderText {#text} at (285,1) size 4x16 
              text run at (285,1) width 4: " " 
            RenderInline {A} at (0,0) size 34x16 [color=#0000CC] 
              RenderText {#text} at (289,1) size 34x16 
                text run at (289,1) width 34: "Gmail" 
            RenderText {#text} at (329,1) size 4x16 
              text run at (329,1) width 4: " " 
            RenderInline {A} at (0,0) size 44x16 [color=#0000CC] 
              RenderInline {U} at (0,0) size 29x16 
                RenderText {#text} at (333,1) size 29x16 
                  text run at (333,1) width 29: "more" 
              RenderText {#text} at (362,1) size 4x16 
                text run at (362,1) width 4: " " 
              RenderInline {SMALL} at (0,0) size 11x14 
                RenderText {#text} at (366,3) size 11x14 
                  text run at (366,3) width 11: "\x{25BC}" 
        RenderBlock {DIV} at (0,0) size 784x24 
          RenderInline {NOBR} at (0,0) size 197x16 
            RenderInline {SPAN} at (0,0) size 0x0 
            RenderInline {SPAN} at (0,0) size 0x0 
            RenderInline {SPAN} at (0,0) size 55x16 
              RenderInline {A} at (0,0) size 44x16 [color=#0000CC] 
                RenderText {#text} at (587,1) size 44x16 
                  text run at (587,1) width 44: "iGoogle" 
              RenderText {#text} at (631,1) size 11x16 
                text run at (631,1) width 11: " | " 
            RenderInline {A} at (0,0) size 91x16 [color=#0000CC] 
              RenderText {#text} at (642,1) size 91x16 
                text run at (642,1) width 91: "Search settings" 
            RenderText {#text} at (733,1) size 11x16 
              text run at (733,1) width 11: " | " 
            RenderInline {A} at (0,0) size 40x16 [color=#0000CC] 
              RenderText {#text} at (744,1) size 40x16 
                text run at (744,1) width 40: "Sign in" 
      RenderBlock {CENTER} at (0,24) size 784x328 
        RenderBlock (anonymous) at (0,0) size 784x152 
          RenderBR {BR} at (392,0) size 0x18 
          RenderImage {IMG} at (254,19) size 276x110 
          RenderBR {BR} at (530,114) size 0x18 
          RenderBR {BR} at (392,133) size 0x18 
        RenderBlock {FORM} at (0,152) size 784x64 
          RenderTable {TABLE} at (0,0) size 784x64 
            RenderTableSection {TBODY} at (0,0) size 784x64 
              RenderTableRow {TR} at (0,0) size 784x64 
                RenderTableCell {TD} at (0,0) size 134x12 [r=0 c=0 rs=1 cs=1] 
                  RenderText {#text} at (0,-3) size 4x18 
                    text run at (0,-3) width 4: " " 
//......


I would like to know how could I inspect and access the element member in each of the render object? 
Like, how can I get the image object and the src from RenderImage? What functions I could use? 

Thank you very much. 

Riku 		 	   		  
The New Busy is not the old busy. Search, chat and e-mail from your inbox. Get started. 		 	   		  
_________________________________________________________________
Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-help/attachments/20100410/a01063bd/attachment.html>


More information about the webkit-help mailing list