[webkit-dev] Question about return values of RenderObject:localToAbsolute()
Lucius Fox
lucius.fox08 at gmail.com
Tue Jun 9 22:47:18 PDT 2009
Hi,
I use the dumpRenderTree to dump out the absolute co-ordinates of the
Render Tree of www.google.com. I put the absolute x, y result at the
end marked by "{" and "}".
And www.google.com, the first text is 'Web" followed by "Images"
followed by "Video" followed by "Maps".
But what I don't understand is (from the output below), all the
absolute coordinates of those text are x = 8.0 and y = 3.0. But
visually, they are next to each other horizontally. So the y values
should be the same but the x values should be different. Can someone
please help me understand the result?
Thank you.
Here is the output:
RenderInline {B} at (0,0) size 27x15 {8.00,3.00}
RenderText {#text} at (0,1) size 27x15 {8.00,3.00}
text run at (0,1) width 27: "Web"
RenderText {#text} at (33,1) size 4x15 {8.00,3.00}
text run at (33,1) width 4: " "
RenderInline {A} at (0,0) size 43x15 [color=#0000CC] {8.00,3.00}
RenderText {#text} at (37,1) size 43x15 {8.00,3.00}
text run at (37,1) width 43: "Images"
RenderText {#text} at (86,1) size 4x15 {8.00,3.00}
text run at (86,1) width 4: " "
RenderInline {A} at (0,0) size 33x15 [color=#0000CC] {8.00,3.00}
RenderText {#text} at (90,1) size 33x15 {8.00,3.00}
text run at (90,1) width 33: "Video"
RenderText {#text} at (129,1) size 4x15 {8.00,3.00}
text run at (129,1) width 4: " "
RenderInline {A} at (0,0) size 32x15 [color=#0000CC] {8.00,3.00}
RenderText {#text} at (133,1) size 32x15 {8.00,3.00}
text run at (133,1) width 32: "Maps"
RenderText {#text} at (171,1) size 4x15 {8.00,3.00}
text run at (171,1) width 4: " "
RenderInline {A} at (0,0) size 32x15 [color=#0000CC] {8.00,3.00}
RenderText {#text} at (175,1) size 32x15 {8.00,3.00}
text run at (175,1) width 32: "News"
RenderText {#text} at (213,1) size 4x15 {8.00,3.00}
text run at (213,1) width 4: " "
RenderInline {A} at (0,0) size 54x15 [color=#0000CC] {8.00,3.00}
RenderText {#text} at (217,1) size 54x15 {8.00,3.00}
text run at (217,1) width 54: "Shopping"
RenderText {#text} at (277,1) size 4x15 {8.00,3.00}
text run at (277,1) width 4: " "
RenderInline {A} at (0,0) size 34x15 [color=#0000CC] {8.00,3.00}
RenderText {#text} at (281,1) size 34x15 {8.00,3.00}
text run at (281,1) width 34: "Gmail"
RenderText {#text} at (321,1) size 4x15 {8.00,3.00}
text run at (321,1) width 4: " "
RenderInline {A} at (0,0) size 44x15 [color=#0000CC] {8.00,3.00}
RenderInline {U} at (0,0) size 29x15 {8.00,3.00}
RenderText {#text} at (325,1) size 29x15 {8.00,3.00}
text run at (325,1) width 29: "more"
More information about the webkit-dev
mailing list