Bug 13864

Summary: REGRESSION: Uninitialized value in RenderBlock::calcInlinePrefWidths()
Product: WebKit Reporter: Eli Fidler <efidler>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Severity: Normal CC: ariya.hidayat, bdakin, dacarson, hyatt, kbalazs, mitz, staikos
Priority: P1 Keywords: InRadar, Regression
Version: 523.x (Safari 3)   
Hardware: All   
OS: All   
Description Flags
All-whitespace text test case
Patch sam: review+

Description Eli Fidler 2007-05-24 13:44:28 PDT
For text blocks that are just whitespace and stripFrontSpaces=true, when checking if the block should be considered for breaking, beginWS and endWS are used, but are uninitialized (RenderBlock.cpp:3741).

They don't get initialized in RenderText::trimmedPrefWidths() since it returns early.

I'm not sure if such blocks should be considered for breaking, so I don't know what values to initialize beginWS and endWS to.
Comment 1 Dave Hyatt 2007-05-24 16:02:27 PDT
Confirming.  This is a regression from newly-added code.
Comment 2 mitz 2007-08-17 08:25:19 PDT
Created attachment 16009 [details]
All-whitespace text test case

I think the code in RenderBlock::calcInlinePrefWidths is wrong anyway as demonstrated by this test case.
Comment 3 Adele Peterson 2007-08-30 14:38:39 PDT
Comment 4 Adele Peterson 2007-08-30 14:40:09 PDT
What kind of effects could we see on real-world sites from this bug?
Comment 5 mitz 2007-12-12 23:50:59 PST
*** Bug 16414 has been marked as a duplicate of this bug. ***
Comment 6 Ariya Hidayat 2008-05-15 12:14:53 PDT
*** Bug 19083 has been marked as a duplicate of this bug. ***
Comment 7 Mark Rowe (bdash) 2008-07-28 08:22:43 PDT
*** Bug 20194 has been marked as a duplicate of this bug. ***
Comment 8 mitz 2008-08-24 01:35:50 PDT
Created attachment 22959 [details]
Comment 9 mitz 2008-08-24 02:19:03 PDT
Fixed in <http://trac.webkit.org/changeset/35902>.