The following perl script outputs an html file that should be rendered as three lines inside a <pre> block. When opened in Safari ( 4.0.3 (531.9.1) ) or in Google Chrome (3.0.195.21), the first and third lines are blank for the first 65536 characters. The middle line, slightly shorter than 65536 characters, is rendered in full. #! /usr/bin/perl print '<html> <head> <title>Long lines, bad webkit</title> </head> <body> <pre> '; print "$_ " for (1..12_774); print '<br>'; print "$_ " for (1..12_773); print '<br>'; print "$_ " for (1..12_775); print ' </pre></body> </html> ';
I think this is Windows' text drawing command rejecting a string that's "too long." The way to fix it would be to get a conservative estimate of what text actually appears in the current clip, and only draw those characters.
I'm also seeing this bug on Safari running on MacOS, so I don't think it's a windows bug.
See also bug 28201 (probably same root cause).
*** Bug 88996 has been marked as a duplicate of this bug. ***
Created attachment 152227 [details] Patch
Comment on attachment 152227 [details] Patch Attachment 152227 [details] did not pass mac-ews (mac): Output: http://queues.webkit.org/results/13239079
Comment on attachment 152227 [details] Patch Attachment 152227 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/13240083
Okay.. I understand the problem that the typecasting will bring here. Need to check further on this.
Created attachment 152498 [details] Patch
Changing the datatype of m_len can obviously have its many typecasting ramifications. Have currently made m_len as an integer (similar to m_start). This would probably have issues too (typecasting to unsigned) but since we don't expect length to be negative, this can perhaps be ignored.(?) Also, this would have an additional overhead of increasing the size of our InlineTextBox by 2bytes.
Comment on attachment 152498 [details] Patch I would expect this to be a large increase in memory usage for WebKit. I'm surprised there is not a COMPILE_ASSERT to verify the size of InlineTextBox.
*** Bug 90739 has been marked as a duplicate of this bug. ***
*** Bug 51168 has been marked as a duplicate of this bug. ***