Bug 7452

Summary: <wbr> in <pre> causes some new lines to be ignored
Product: WebKit Reporter: Sam Weinig <sam>
Component: DOMAssignee: Darin Adler <darin>
Status: RESOLVED FIXED    
Severity: Normal CC: ian, mitz
Priority: P2 Keywords: GoogleBug, HasReduction, InRadar
Version: 420+   
Hardware: Mac   
OS: OS X 10.4   
Attachments:
Description Flags
test case
none
patch that implements proper parsing and rendering for <wbr> mitz: review+

Description Sam Weinig 2006-02-24 18:06:06 PST
If you get the automatic commit emails from [webkit-changes] on Gmail you probably will have seen this bug.  Since the switch to the fancy formatting for the emails many lines have gone way off the page due to not line breaking, making it a pain to read.  The culprit it seems, is that when the <wbr> tag is inside a <pre>, useful for, among other things, breaking long paths nicely, line endings are ignored until the end of the <pre> or another <wbr> is found.
Comment 1 Sam Weinig 2006-02-24 18:07:26 PST
Created attachment 6709 [details]
test case

Test case showing bad behavior.  In Firefox, the line break is made.
Comment 2 mitz 2006-08-31 10:25:23 PDT
See also bug 10657.
Comment 3 Darin Adler 2007-05-09 15:36:07 PDT
<rdar://problem/3211749>
Comment 4 Darin Adler 2007-05-09 18:03:23 PDT
Created attachment 14449 [details]
patch that implements proper parsing and rendering for <wbr>
Comment 5 mitz 2007-05-10 13:41:52 PDT
Comment on attachment 14449 [details]
patch that implements proper parsing and rendering for <wbr>

+++ WebCore/dom/Node.cpp	(working copy)

Please include the changes to Node.cpp in the change log. Did you actually hit a case where createRenderer() returned 0 despite rendererIsNeeded() returning true? If not, can you replace or augment the if(r) with an ASSERT(r)?

What's the following all about?

Property changes on: LayoutTests/fast/text/wbr.html
___________________________________________________________________
Name: svn:executable
   + *

r=me
Comment 6 Darin Adler 2007-05-10 13:54:47 PDT
> Please include the changes to Node.cpp in the change log. Did you actually hit
> a case where createRenderer() returned 0 despite rendererIsNeeded() returning
> true? If not, can you replace or augment the if(r) with an ASSERT(r)?

I crashed while running layout tests. I didn't investigate this in great detail, and I forgot about it completely!

I thought it was an obvious mistake that there was a null check on one line and no null check on the next line.

> What's the following all about? [executable flag on some files]

Not sure -- obviously my mistake.
Comment 7 Darin Adler 2007-05-11 09:11:52 PDT
Committed revision 21405.