Bug 13373

Summary: Premature line break in heading at openclipart.org
Product: WebKit Reporter: mitz
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal Keywords: HasReduction
Priority: P2    
Version: 523.x (Safari 3)   
Hardware: Mac   
OS: OS X 10.4   
URL: http://www.openclipart.org/
Attachments:
Description Flags
Reduction
none
Patch that fixes the reduction bdakin: review+

Description mitz 2007-04-17 07:02:35 PDT
When the site is loads, the heading "Open Clip Art Library" has a line break after "Art". Choosing View > Make Text Bigger and then View > Make Text Smaller makes the heading stay on a single line.

Same in Safari 2.0.4.
Comment 1 mitz 2007-04-17 07:19:39 PDT
Created attachment 14060 [details]
Reduction
Comment 2 mitz 2007-04-25 13:24:42 PDT
<http://trac.webkit.org/projects/webkit/changeset/21093> (bug 13431) fixed the site but not the reduction.
Comment 3 Dave Hyatt 2007-04-25 14:12:38 PDT
The maxwidth is definitely larger now after my change.  The padding appears to be growing the maxwidth.  Need to understand why.
Comment 4 Dave Hyatt 2007-04-25 14:20:54 PDT
Ah, I understand.  The width of the positioned block's container has been computed by the time calcPrefWidths gets called.  That means the padding can actually respect the width of the containing block.  A nice improvement!

Some interesting observations if we want to fully support this system:
(1) An object with percentage padding actually needs to recompute its min/max width if the width of its container changes in addition to receiving a relayout.
(2) A container with percentage padding needs to set relayoutChildren to true in situations where its contentWidth changes.
Comment 5 Dave Hyatt 2007-04-25 14:44:27 PDT
Created attachment 14189 [details]
Patch that fixes the reduction
Comment 6 Beth Dakin 2007-04-25 14:56:30 PDT
Comment on attachment 14189 [details]
Patch that fixes the reduction

Looks good!
Comment 7 Dave Hyatt 2007-04-25 14:57:23 PDT
I will land the reduction as a test case.
Comment 8 Dave Hyatt 2007-04-25 15:06:44 PDT
r21098 and r21099.