Bug 42285 - LegacyHTMLTreeBuilder inserts extra RenderText {#text} at (0,0) size 0x0 for newlines at end of document
Summary: LegacyHTMLTreeBuilder inserts extra RenderText {#text} at (0,0) size 0x0 for ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 41123
  Show dependency treegraph
 
Reported: 2010-07-14 13:28 PDT by Eric Seidel (no email)
Modified: 2010-07-19 13:38 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2010-07-14 13:28:44 PDT
LegacyHTMLTreeBuilder inserts extra RenderText {#text} at (0,0) size 0x0 for newlines at end of document

Document:
<img>
</body>
</html>

(note newline after </html>)

LegacyHTMLTreeBuilder rendering tree:
  RenderBlock {HTML} at (0,0) size 800x600
    RenderBody {BODY} at (8,8) size 784x584
      RenderImage {IMG} at (0,0) size 0x0
      RenderText {#text} at (0,0) size 0x0
      RenderText {#text} at (0,0) size 0x0
      RenderText {#text} at (0,0) size 0x0

HTML5 HTMLTreeBuilder rendering tree:
  RenderBlock {HTML} at (0,0) size 800x600
    RenderBody {BODY} at (8,8) size 784x584
      RenderImage {IMG} at (0,0) size 0x0
      RenderText {#text} at (0,0) size 0x0

This affects several hundred tests.

I suspect the HTML5 tree builder is immune to this because it has code to coalesce text nodes
Comment 1 Adam Barth 2010-07-19 13:38:57 PDT
Eric fixed this in another bug.