WebCore/ChangeLog

 12009-05-28 Jacob Refstrup <jacob.refstrup@hp.com>
 2
 3 Reviewed by TBD.
 4
 5 https://bugs.webkit.org/show_bug.cgi?id=16148
 6
 7 Test: fast/css/float-overflow-hidden.html
 8 * rendering/RenderBlock.cpp:
 9 (WebCore::RenderBlock::calcPrefWidths):
 10 Compare fixed width using >= 0 rather than > 0 as the block
 11 otherwise gets the size of it's content.
 12
1132009-05-28 Simon Fraser <simon.fraser@apple.com>
214
315 Reviewed by Oliver Hunt.
44236

WebCore/rendering/RenderBlock.cpp

@@void RenderBlock::calcPrefWidths()
38683868
38693869 updateFirstLetter();
38703870
3871  if (!isTableCell() && style()->width().isFixed() && style()->width().value() > 0)
 3871 if (!isTableCell() && style()->width().isFixed() && style()->width().value() >= 0)
38723872 m_minPrefWidth = m_maxPrefWidth = calcContentBoxWidth(style()->width().value());
38733873 else {
38743874 m_minPrefWidth = 0;
44236

LayoutTests/ChangeLog

 12009-05-28 Jacob Refstrup <jacob.refstrup@hp.com>
 2
 3 Reviewed by TBD.
 4
 5 https://bugs.webkit.org/show_bug.cgi?id=16148
 6
 7 * fast/css/float-overflow-hidden.html: Added.
 8 * platform/mac/fast/css/float-overflow-hidden-expected.txt: Added.
 9
1102009-05-28 Simon Fraser <simon.fraser@apple.com>
211
312 Reviewed by Oliver Hunt.
44236

LayoutTests/fast/css/float-overflow-hidden.html

 1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 3
 4<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 5<head>
 6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
 7
 8 <title>overflow hidden with float left test</title>
 9
 10</head>
 11
 12<body>
 13
 14 <div id="wrapper" style="background: #aaa; float:left">
 15 <div id="container1" style="overflow:hidden; width:200px; height:400px; float: left">
 16 <div style="background:#ff0000; width:200px; height:400px">test div 1</div>
 17 <div style="background:#00ff00; width:200px; height:400px">test div 2</div>
 18 </div>
 19 <div id="container2" style="overflow:hidden; width:0px; height:400px; float: left">
 20 <div style="background:#aa0000; width:200px; height:400px">test div 3</div>
 21 <div style="background:#00ff00; width:200px; height:400px">test div 4</div>
 22 </div>
 23 <div id="container3" style="overflow:hidden; width:200px; height:400px; float: left">
 24 <div style="background:#880000; width:200px; height:400px">test div 5</div>
 25 <div style="background:#00ff00; width:200px; height:400px">test div 6</div>
 26 </div>
 27 </div>
 28
 29 <div style="background:#0000ff; width:200px; height:400px; float: left">
 30 when rendered correctly, you should not see a grey box
 31 </div>
 32
 33</body>
 34</html>
0

LayoutTests/platform/mac/fast/css/float-overflow-hidden-expected.txt

 1layer at (0,0) size 800x600
 2 RenderView at (0,0) size 800x600
 3layer at (0,0) size 800x408
 4 RenderBlock {HTML} at (0,0) size 800x8
 5 RenderBody {BODY} at (8,8) size 784x0
 6 RenderBlock (floating) {DIV} at (0,0) size 400x400 [bgcolor=#AAAAAA]
 7 RenderBlock (floating) {DIV} at (400,0) size 200x400 [bgcolor=#0000FF]
 8 RenderText {#text} at (0,0) size 185x36
 9 text run at (0,0) width 185: "when rendered correctly, you"
 10 text run at (0,18) width 161: "should not see a grey box"
 11layer at (8,8) size 200x400 scrollHeight 800
 12 RenderBlock (floating) {DIV} at (0,0) size 200x400
 13 RenderBlock {DIV} at (0,0) size 200x400 [bgcolor=#FF0000]
 14 RenderText {#text} at (0,0) size 57x18
 15 text run at (0,0) width 57: "test div 1"
 16 RenderBlock {DIV} at (0,400) size 200x400 [bgcolor=#00FF00]
 17 RenderText {#text} at (0,0) size 57x18
 18 text run at (0,0) width 57: "test div 2"
 19layer at (208,8) size 200x400 scrollHeight 800
 20 RenderBlock (floating) {DIV} at (200,0) size 200x400
 21 RenderBlock {DIV} at (0,0) size 200x400 [bgcolor=#880000]
 22 RenderText {#text} at (0,0) size 57x18
 23 text run at (0,0) width 57: "test div 5"
 24 RenderBlock {DIV} at (0,400) size 200x400 [bgcolor=#00FF00]
 25 RenderText {#text} at (0,0) size 57x18
 26 text run at (0,0) width 57: "test div 6"
0