Changeset 121789 in webkit
- Timestamp:
- Jul 3, 2012 10:41:35 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 43 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r121787 r121789 1 2012-07-03 Robert Hogan <robert@webkit.org> 2 3 CSS 2.1 failure: floats-wrap-top-below-inline-* fail 4 https://bugs.webkit.org/show_bug.cgi?id=88171 5 6 Reviewed by Eric Seidel. 7 8 * css2.1/20110323/floats-wrap-top-below-001l-expected.html: Added. 9 * css2.1/20110323/floats-wrap-top-below-001r-expected.html: Added. 10 * css2.1/20110323/floats-wrap-top-below-002l-expected.html: Added. 11 * css2.1/20110323/floats-wrap-top-below-002r-expected.html: Added. 12 * css2.1/20110323/floats-wrap-top-below-003l-expected.html: Added. 13 * css2.1/20110323/floats-wrap-top-below-003r-expected.html: Added. 14 * css2.1/20110323/floats-wrap-top-below-bfc-001l-expected.html: Added. 15 * css2.1/20110323/floats-wrap-top-below-bfc-001l.htm: Added. 16 * css2.1/20110323/floats-wrap-top-below-bfc-001r-expected.html: Added. 17 * css2.1/20110323/floats-wrap-top-below-bfc-001r.htm: Added. 18 * css2.1/20110323/floats-wrap-top-below-bfc-002l-expected.html: Added. 19 * css2.1/20110323/floats-wrap-top-below-bfc-002l.htm: Added. 20 * css2.1/20110323/floats-wrap-top-below-bfc-002r-expected.html: Added. 21 * css2.1/20110323/floats-wrap-top-below-bfc-002r.htm: Added. 22 * css2.1/20110323/floats-wrap-top-below-bfc-003l-expected.html: Added. 23 * css2.1/20110323/floats-wrap-top-below-bfc-003l.htm: Added. 24 * css2.1/20110323/floats-wrap-top-below-bfc-003r-expected.html: Added. 25 * css2.1/20110323/floats-wrap-top-below-bfc-003r.htm: Added. 26 * css2.1/20110323/floats-wrap-top-below-inline-001l-expected.html: Added. 27 * css2.1/20110323/floats-wrap-top-below-inline-001l.htm: Added. 28 * css2.1/20110323/floats-wrap-top-below-inline-001r-expected.html: Added. 29 * css2.1/20110323/floats-wrap-top-below-inline-001r.htm: Added. 30 * css2.1/20110323/floats-wrap-top-below-inline-002l-expected.html: Added. 31 * css2.1/20110323/floats-wrap-top-below-inline-002l.htm: Added. 32 * css2.1/20110323/floats-wrap-top-below-inline-002r-expected.html: Added. 33 * css2.1/20110323/floats-wrap-top-below-inline-002r.htm: Added. 34 * css2.1/20110323/floats-wrap-top-below-inline-003l-expected.html: Added. 35 * css2.1/20110323/floats-wrap-top-below-inline-003l.htm: Added. 36 * css2.1/20110323/floats-wrap-top-below-inline-003r-expected.html: Added. 37 * css2.1/20110323/floats-wrap-top-below-inline-003r.htm: Added. 38 * css2.1/20110323/floats-zero-height-wrap-001-expected.html: Added. 39 * css2.1/20110323/floats-zero-height-wrap-001.htm: Added. 40 * css2.1/20110323/floats-zero-height-wrap-002.htm: Added. 41 * css2.1/20110323/floats-zero-height-wrap-002-expected.html: Added. 42 All of these are taken from the CSS test suite, including the expected.html files which have been renamed 43 from *-ref.html so that new-run-webkit-tests will parse use them. 44 * fast/block/float/floats-wrap-inside-inline-001-expected.html: Added. 45 * fast/block/float/floats-wrap-inside-inline-001.htm: Added. 46 The span should avoid a float even when its top and bottom does not overlap with the top of the span. 47 In this test the float starts and ends inside the span's first linebox. 48 * fast/block/float/floats-wrap-inside-inline-002-expected.html: Added. 49 * fast/block/float/floats-wrap-inside-inline-002.htm: Added. 50 The span should avoid a float even when its top and bottom does not overlap with the top of the span. 51 In this test the float overlaps the bottom of the span, but is below the span's first linebox. 52 * fast/block/float/floats-wrap-inside-inline-003-expected.html: Added. 53 * fast/block/float/floats-wrap-inside-inline-003.htm: Added. 54 An inline span should avoid a float even when its top and bottom does not overlap with the top of the span. 55 In this test the float starts and ends inside the span's first linebox. 56 * fast/block/float/floats-wrap-inside-inline-004-expected.html: Added. 57 * fast/block/float/floats-wrap-inside-inline-004.htm: Added. 58 The span should avoid a float even when its top and bottom does not overlap with the top of the span. 59 In this test the float overlaps inside the span and the span has height set by its style. 60 * fast/block/float/floats-wrap-inside-inline-005-expected.html: Added. 61 * fast/block/float/floats-wrap-inside-inline-005.htm: Added. 62 In this test the float starts and ends inside the span's second linebox, so only the second linebox should avoid the float. 63 * platform/chromium-win/css1/formatting_model/floating_elements-expected.txt: 64 This is a progression due to lineboxes now avoiding floats they overlap. 65 1 66 2012-07-03 Emil A Eklund <eae@chromium.org> 2 67 -
trunk/LayoutTests/platform/chromium-win/css1/formatting_model/floating_elements-expected.txt
r117821 r121789 1 layer at (0,0) size 785x6 4411 layer at (0,0) size 785x6501 2 2 RenderView at (0,0) size 785x600 3 layer at (0,0) size 785x6 4414 RenderBlock {HTML} at (0,0) size 785x6 4415 RenderBody {BODY} at (8,8) size 769x64 25 [bgcolor=#CCCCCC]3 layer at (0,0) size 785x6501 4 RenderBlock {HTML} at (0,0) size 785x6501 5 RenderBody {BODY} at (8,8) size 769x6485 [bgcolor=#CCCCCC] 6 6 RenderBlock {P} at (0,0) size 769x20 7 7 RenderText {#text} at (0,0) size 337x19 … … 106 106 text run at (5,185) width 123: "be on the next \"line.\"" 107 107 RenderBlock {HR} at (24,992) size 579x2 [border: (1px inset #000000)] 108 RenderBlock {DIV} at (2,1018) size 314x3 50[border: (5px solid #800080)]108 RenderBlock {DIV} at (2,1018) size 314x364 [border: (5px solid #800080)] 109 109 RenderBlock (floating) {P} at (5,5) size 194x74 [bgcolor=#C0C0C0] [border: (1px solid #00FF00)] 110 110 RenderText {#text} at (17,17) size 159x39 … … 116 116 text run at (17,37) width 127: "paragraph (second in" 117 117 text run at (17,57) width 49: "source)." 118 RenderText {#text} at (199,5) size 303x3 39118 RenderText {#text} at (199,5) size 303x353 119 119 text run at (199,5) width 103: "This is text within" 120 120 text run at (199,25) width 57: "the DIV. " 121 121 text run at (256,25) width 23: "The" 122 122 text run at (199,45) width 99: "floating elements" 123 text run at (199,65) width 90: "within this DIV" 124 text run at (5,85) width 81: "should not go" 125 text run at (5,105) width 106: "beyond the left or" 126 text run at (5,125) width 108: "right inner edge of" 127 text run at (5,145) width 94: "this DIV, which" 128 text run at (5,165) width 86: "means that the" 129 text run at (5,185) width 303: "borders of the floating elements should not overlap" 130 text run at (5,205) width 283: "the top or side borders of the DIV in any way. " 131 text run at (288,205) width 12: "In" 132 text run at (5,225) width 302: "addition, they should not overlap each other in any" 133 text run at (5,245) width 238: "way, nor should the floated elements be" 134 text run at (5,265) width 174: "overwritten by the DIV text. " 135 text run at (179,265) width 90: "In addition, the" 136 text run at (5,285) width 288: "floated elements should not be side-by-side, but" 137 text run at (5,305) width 271: "instead the first should be floated left, and the" 138 text run at (5,325) width 249: "second floated to the right below the first." 139 RenderBlock {HR} at (364,1376) size 41x2 [border: (1px inset #000000)] 140 RenderBlock {DIV} at (2,1386) size 410x230 [border: (5px solid #800080)] 123 text run at (5,79) width 90: "within this DIV" 124 text run at (5,99) width 81: "should not go" 125 text run at (5,119) width 106: "beyond the left or" 126 text run at (5,139) width 108: "right inner edge of" 127 text run at (5,159) width 94: "this DIV, which" 128 text run at (5,179) width 278: "means that the borders of the floating elements" 129 text run at (5,199) width 291: "should not overlap the top or side borders of the" 130 text run at (5,219) width 103: "DIV in any way. " 131 text run at (108,219) width 163: "In addition, they should not" 132 text run at (5,239) width 273: "overlap each other in any way, nor should the" 133 text run at (5,259) width 290: "floated elements be overwritten by the DIV text." 134 text run at (5,279) width 276: "In addition, the floated elements should not be" 135 text run at (5,299) width 303: "side-by-side, but instead the first should be floated" 136 text run at (5,319) width 293: "left, and the second floated to the right below the" 137 text run at (5,339) width 26: "first." 138 RenderBlock {HR} at (364,1390) size 41x2 [border: (1px inset #000000)] 139 RenderBlock {DIV} at (2,1400) size 410x246 [border: (5px solid #800080)] 141 140 RenderImage {IMG} at (5,5) size 256x36 [border: (3px solid #000000)] 142 141 RenderImage {IMG} at (149,41) size 256x36 [border: (3px solid #000000)] 143 RenderText {#text} at (261,5) size 397x219142 RenderText {#text} at (261,5) size 400x235 144 143 text run at (261,5) width 125: "This is text within the" 145 text run at ( 261,25) width 35: "DIV. "146 text run at ( 296,25) width 70: "The floating"147 text run at (5, 45) width 135: "images within this DIV"148 text run at (5, 65) width 130: "should not go beyond"149 text run at (5, 85) width 357: "the left or right inner edge of this DIV, which means that the"150 text run at (5,1 05) width 383: "borders of the floating images should not overlap the top or side"151 text run at ( 5,125) width 192: "borders of the DIV in any way."152 text run at ( 197,125) width 163: "In addition, they should not"153 text run at (5,1 45) width 393: "overlap each other in any way, nor should the floated elements be"154 text run at ( 5,165) width 174: "overwritten by the DIV text."155 text run at ( 179,165) width 223: "In addition, the floated images should"156 text run at (5, 185) width 397: "not be side-by-side, but instead the first should be floated left, and"157 text run at (5,2 05) width 271: "the second floated to the right below thefirst."158 RenderBlock {HR} at (24,16 40) size 579x2 [border: (1px inset #000000)]159 RenderBlock {DIV} at (2,16 66) size 765x130 [border: (5px solid #800080)]144 text run at (5,41) width 35: "DIV. " 145 text run at (40,41) width 70: "The floating" 146 text run at (5,61) width 135: "images within this DIV" 147 text run at (5,81) width 362: "should not go beyond the left or right inner edge of this DIV," 148 text run at (5,101) width 372: "which means that the borders of the floating images should not" 149 text run at (5,121) width 332: "overlap the top or side borders of the DIV in any way. " 150 text run at (337,121) width 68: "In addition," 151 text run at (5,141) width 368: "they should not overlap each other in any way, nor should the" 152 text run at (5,161) width 294: "floated elements be overwritten by the DIV text. " 153 text run at (299,161) width 90: "In addition, the" 154 text run at (5,181) width 371: "floated images should not be side-by-side, but instead the first" 155 text run at (5,201) width 400: "should be floated left, and the second floated to the right below the" 156 text run at (5,221) width 26: "first." 157 RenderBlock {HR} at (24,1670) size 579x2 [border: (1px inset #000000)] 158 RenderBlock {DIV} at (2,1696) size 765x130 [border: (5px solid #800080)] 160 159 RenderBlock (floating) {P} at (566,5) size 194x74 [bgcolor=#C0C0C0] [border: (1px solid #00FF00)] 161 160 RenderText {#text} at (17,17) size 159x39 … … 176 175 text run at (199,85) width 551: "addition, the top of the left-floating box should not be higher than the top of the right-floating" 177 176 text run at (5,105) width 27: "box." 178 RenderBlock {HR} at (364,18 04) size 41x2 [border: (1px inset #000000)]179 RenderBlock {DIV} at (2,18 14) size 765x70 [border: (5px solid #800080)]177 RenderBlock {HR} at (364,1834) size 41x2 [border: (1px inset #000000)] 178 RenderBlock {DIV} at (2,1844) size 765x70 [border: (5px solid #800080)] 180 179 RenderImage {IMG} at (5,5) size 15x36 [border: (3px solid #000000)] 181 180 RenderImage {IMG} at (745,5) size 15x36 [border: (3px solid #000000)] … … 186 185 text run at (689,25) width 12: "In" 187 186 text run at (5,45) width 606: "addition, the top of the left-floating image should not be higher than the top of the right-floating image." 188 RenderBlock {HR} at (24,19 08) size 579x2 [border: (1px inset #000000)]189 RenderBlock {DIV} at (2,19 34) size 765x130 [border: (5px solid #800080)]187 RenderBlock {HR} at (24,1938) size 579x2 [border: (1px inset #000000)] 188 RenderBlock {DIV} at (2,1964) size 765x130 [border: (5px solid #800080)] 190 189 RenderText {#text} at (199,5) size 172x19 191 190 text run at (199,5) width 164: "This is text within the DIV. " … … 211 210 text run at (230,85) width 314: "In order to mark these points clearly, an asterisk has" 212 211 text run at (5,105) width 279: "been inserted just before each floated element." 213 RenderBlock {HR} at (364,2 073) size 41x2 [border: (1px inset #000000)]214 RenderBlock {DIV} at (2,2 083) size 765x90 [border: (5px solid #800080)]212 RenderBlock {HR} at (364,2103) size 41x2 [border: (1px inset #000000)] 213 RenderBlock {DIV} at (2,2113) size 765x90 [border: (5px solid #800080)] 215 214 RenderText {#text} at (20,5) size 172x19 216 215 text run at (20,5) width 164: "This is text within the DIV. " … … 227 226 text run at (565,45) width 175: "In order to mark these points" 228 227 text run at (5,65) width 407: "clearly, an asterisk has been inserted just before each floated image." 229 RenderBlock {HR} at (24,2 197) size 579x2 [border: (1px inset #000000)]230 RenderBlock {DIV} at (2,22 23) size 765x230 [border: (5px solid #800080)]228 RenderBlock {HR} at (24,2227) size 579x2 [border: (1px inset #000000)] 229 RenderBlock {DIV} at (2,2253) size 765x230 [border: (5px solid #800080)] 231 230 RenderText {#text} at (199,5) size 172x19 232 231 text run at (199,5) width 164: "This is text within the DIV. " … … 272 271 text run at (199,185) width 517: "float so that its top is aligned with the top of the line-box in which the asterisk appears." 273 272 text run at (199,205) width 380: "Otherwise, its top should align with the top of the next line-box." 274 RenderBlock {HR} at (364,24 62) size 41x2 [border: (1px inset #000000)]275 RenderBlock {DIV} at (2,2 472) size 765x130 [border: (5px solid #800080)]273 RenderBlock {HR} at (364,2492) size 41x2 [border: (1px inset #000000)] 274 RenderBlock {DIV} at (2,2502) size 765x130 [border: (5px solid #800080)] 276 275 RenderText {#text} at (20,5) size 172x19 277 276 text run at (20,5) width 164: "This is text within the DIV. " … … 298 297 text run at (5,85) width 693: "image, then the image should float so that its top is aligned with the top of the line-box in which the asterisk appears." 299 298 text run at (5,105) width 380: "Otherwise, its top should align with the top of the next line-box." 300 RenderBlock {HR} at (24,26 26) size 579x2 [border: (1px inset #000000)]301 RenderBlock {DIV} at (2,26 52) size 490x310 [border: (5px solid #800080)]299 RenderBlock {HR} at (24,2656) size 579x2 [border: (1px inset #000000)] 300 RenderBlock {DIV} at (2,2682) size 490x310 [border: (5px solid #800080)] 302 301 RenderText {#text} at (199,5) size 50x19 303 302 text run at (199,5) width 50: "This is *" … … 330 329 text run at (5,265) width 456: "of the floated element to avoid floating elements appearing before text which" 331 330 text run at (5,285) width 213: "precedes it in the source document." 332 RenderBlock {HR} at (364, 2970) size 41x2 [border: (1px inset #000000)]333 RenderBlock {DIV} at (2, 2980) size 490x230 [border: (5px solid #800080)]331 RenderBlock {HR} at (364,3000) size 41x2 [border: (1px inset #000000)] 332 RenderBlock {DIV} at (2,3010) size 490x230 [border: (5px solid #800080)] 334 333 RenderText {#text} at (20,5) size 50x19 335 334 text run at (20,5) width 50: "This is *" … … 353 352 text run at (5,185) width 479: "insertion point of the floated element to avoid floating elements appearing before" 354 353 text run at (5,205) width 278: "text which precedes it in the source document." 355 RenderBlock {HR} at (24,32 34) size 579x2 [border: (1px inset #000000)]356 RenderTable {TABLE} at (0,32 60) size 769x3165 [border: (1px outset #808080)]357 RenderTableSection {TBODY} at (1,1) size 767x31 63354 RenderBlock {HR} at (24,3264) size 579x2 [border: (1px inset #000000)] 355 RenderTable {TABLE} at (0,3290) size 769x3195 [border: (1px outset #808080)] 356 RenderTableSection {TBODY} at (1,1) size 767x3193 358 357 RenderTableRow {TR} at (0,0) size 767x28 359 358 RenderTableCell {TD} at (0,0) size 767x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=2] … … 361 360 RenderText {#text} at (4,4) size 159x19 362 361 text run at (4,4) width 159: "TABLE Testing Section" 363 RenderTableRow {TR} at (0,28) size 767x31 35364 RenderTableCell {TD} at (0,15 81) size 12x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]362 RenderTableRow {TR} at (0,28) size 767x3165 363 RenderTableCell {TD} at (0,1596) size 12x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1] 365 364 RenderText {#text} at (4,4) size 4x19 366 365 text run at (4,4) width 4: " " 367 RenderTableCell {TD} at (12,28) size 755x31 35 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]366 RenderTableCell {TD} at (12,28) size 755x3165 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1] 368 367 RenderBlock {P} at (4,4) size 747x40 369 368 RenderText {#text} at (0,0) size 731x39 … … 446 445 text run at (5,185) width 123: "be on the next \"line.\"" 447 446 RenderBlock {HR} at (28,804) size 563x2 [border: (1px inset #000000)] 448 RenderBlock {DIV} at (6,830) size 314x3 50[border: (5px solid #800080)]447 RenderBlock {DIV} at (6,830) size 314x364 [border: (5px solid #800080)] 449 448 RenderBlock (floating) {P} at (5,5) size 194x74 [bgcolor=#C0C0C0] [border: (1px solid #00FF00)] 450 449 RenderText {#text} at (17,17) size 159x39 … … 456 455 text run at (17,37) width 127: "paragraph (second in" 457 456 text run at (17,57) width 49: "source)." 458 RenderText {#text} at (199,5) size 303x3 39457 RenderText {#text} at (199,5) size 303x353 459 458 text run at (199,5) width 103: "This is text within" 460 459 text run at (199,25) width 57: "the DIV. " 461 460 text run at (256,25) width 23: "The" 462 461 text run at (199,45) width 99: "floating elements" 463 text run at (199,65) width 90: "within this DIV" 464 text run at (5,85) width 81: "should not go" 465 text run at (5,105) width 106: "beyond the left or" 466 text run at (5,125) width 108: "right inner edge of" 467 text run at (5,145) width 94: "this DIV, which" 468 text run at (5,165) width 86: "means that the" 469 text run at (5,185) width 303: "borders of the floating elements should not overlap" 470 text run at (5,205) width 283: "the top or side borders of the DIV in any way. " 471 text run at (288,205) width 12: "In" 472 text run at (5,225) width 302: "addition, they should not overlap each other in any" 473 text run at (5,245) width 238: "way, nor should the floated elements be" 474 text run at (5,265) width 174: "overwritten by the DIV text. " 475 text run at (179,265) width 90: "In addition, the" 476 text run at (5,285) width 288: "floated elements should not be side-by-side, but" 477 text run at (5,305) width 271: "instead the first should be floated left, and the" 478 text run at (5,325) width 249: "second floated to the right below the first." 479 RenderBlock {HR} at (357,1188) size 41x2 [border: (1px inset #000000)] 480 RenderBlock {DIV} at (6,1198) size 410x230 [border: (5px solid #800080)] 462 text run at (5,79) width 90: "within this DIV" 463 text run at (5,99) width 81: "should not go" 464 text run at (5,119) width 106: "beyond the left or" 465 text run at (5,139) width 108: "right inner edge of" 466 text run at (5,159) width 94: "this DIV, which" 467 text run at (5,179) width 278: "means that the borders of the floating elements" 468 text run at (5,199) width 291: "should not overlap the top or side borders of the" 469 text run at (5,219) width 103: "DIV in any way. " 470 text run at (108,219) width 163: "In addition, they should not" 471 text run at (5,239) width 273: "overlap each other in any way, nor should the" 472 text run at (5,259) width 290: "floated elements be overwritten by the DIV text." 473 text run at (5,279) width 276: "In addition, the floated elements should not be" 474 text run at (5,299) width 303: "side-by-side, but instead the first should be floated" 475 text run at (5,319) width 293: "left, and the second floated to the right below the" 476 text run at (5,339) width 26: "first." 477 RenderBlock {HR} at (357,1202) size 41x2 [border: (1px inset #000000)] 478 RenderBlock {DIV} at (6,1212) size 410x246 [border: (5px solid #800080)] 481 479 RenderImage {IMG} at (5,5) size 256x36 [border: (3px solid #000000)] 482 480 RenderImage {IMG} at (149,41) size 256x36 [border: (3px solid #000000)] 483 RenderText {#text} at (261,5) size 397x219481 RenderText {#text} at (261,5) size 400x235 484 482 text run at (261,5) width 125: "This is text within the" 485 text run at ( 261,25) width 35: "DIV. "486 text run at ( 296,25) width 70: "The floating"487 text run at (5, 45) width 135: "images within this DIV"488 text run at (5, 65) width 130: "should not go beyond"489 text run at (5, 85) width 357: "the left or right inner edge of this DIV, which means that the"490 text run at (5,1 05) width 383: "borders of the floating images should not overlap the top or side"491 text run at ( 5,125) width 192: "borders of the DIV in any way."492 text run at ( 197,125) width 163: "In addition, they should not"493 text run at (5,1 45) width 393: "overlap each other in any way, nor should the floated elements be"494 text run at ( 5,165) width 174: "overwritten by the DIV text."495 text run at ( 179,165) width 223: "In addition, the floated images should"496 text run at (5, 185) width 397: "not be side-by-side, but instead the first should be floated left, and"497 text run at (5,2 05) width 271: "the second floated to the right below thefirst."498 RenderBlock {HR} at (28,14 52) size 563x2 [border: (1px inset #000000)]499 RenderBlock {DIV} at (6,1 478) size 743x130 [border: (5px solid #800080)]483 text run at (5,41) width 35: "DIV. " 484 text run at (40,41) width 70: "The floating" 485 text run at (5,61) width 135: "images within this DIV" 486 text run at (5,81) width 362: "should not go beyond the left or right inner edge of this DIV," 487 text run at (5,101) width 372: "which means that the borders of the floating images should not" 488 text run at (5,121) width 332: "overlap the top or side borders of the DIV in any way. " 489 text run at (337,121) width 68: "In addition," 490 text run at (5,141) width 368: "they should not overlap each other in any way, nor should the" 491 text run at (5,161) width 294: "floated elements be overwritten by the DIV text. " 492 text run at (299,161) width 90: "In addition, the" 493 text run at (5,181) width 371: "floated images should not be side-by-side, but instead the first" 494 text run at (5,201) width 400: "should be floated left, and the second floated to the right below the" 495 text run at (5,221) width 26: "first." 496 RenderBlock {HR} at (28,1482) size 563x2 [border: (1px inset #000000)] 497 RenderBlock {DIV} at (6,1508) size 743x130 [border: (5px solid #800080)] 500 498 RenderBlock (floating) {P} at (544,5) size 194x74 [bgcolor=#C0C0C0] [border: (1px solid #00FF00)] 501 499 RenderText {#text} at (17,17) size 159x39 … … 516 514 text run at (257,85) width 466: "In addition, the top of the left-floating box should not be higher than the top of" 517 515 text run at (5,105) width 128: "the right-floating box." 518 RenderBlock {HR} at (357,16 16) size 41x2 [border: (1px inset #000000)]519 RenderBlock {DIV} at (6,16 26) size 743x70 [border: (5px solid #800080)]516 RenderBlock {HR} at (357,1646) size 41x2 [border: (1px inset #000000)] 517 RenderBlock {DIV} at (6,1656) size 743x70 [border: (5px solid #800080)] 520 518 RenderImage {IMG} at (5,5) size 15x36 [border: (3px solid #000000)] 521 519 RenderImage {IMG} at (723,5) size 15x36 [border: (3px solid #000000)] … … 526 524 text run at (689,25) width 12: "In" 527 525 text run at (5,45) width 606: "addition, the top of the left-floating image should not be higher than the top of the right-floating image." 528 RenderBlock {HR} at (28,17 20) size 563x2 [border: (1px inset #000000)]529 RenderBlock {DIV} at (6,17 46) size 743x130 [border: (5px solid #800080)]526 RenderBlock {HR} at (28,1750) size 563x2 [border: (1px inset #000000)] 527 RenderBlock {DIV} at (6,1776) size 743x130 [border: (5px solid #800080)] 530 528 RenderText {#text} at (199,5) size 172x19 531 529 text run at (199,5) width 164: "This is text within the DIV. " … … 551 549 text run at (320,85) width 222: "In order to mark these points clearly," 552 550 text run at (5,105) width 371: "an asterisk has been inserted just before each floated element." 553 RenderBlock {HR} at (357,1 885) size 41x2 [border: (1px inset #000000)]554 RenderBlock {DIV} at (6,1 895) size 743x90 [border: (5px solid #800080)]551 RenderBlock {HR} at (357,1915) size 41x2 [border: (1px inset #000000)] 552 RenderBlock {DIV} at (6,1925) size 743x90 [border: (5px solid #800080)] 555 553 RenderText {#text} at (20,5) size 172x19 556 554 text run at (20,5) width 164: "This is text within the DIV. " … … 567 565 text run at (622,45) width 100: "In order to mark" 568 566 text run at (5,65) width 482: "these points clearly, an asterisk has been inserted just before each floated image." 569 RenderBlock {HR} at (28,20 09) size 563x2 [border: (1px inset #000000)]570 RenderBlock {DIV} at (6,20 35) size 743x290 [border: (5px solid #800080)]567 RenderBlock {HR} at (28,2039) size 563x2 [border: (1px inset #000000)] 568 RenderBlock {DIV} at (6,2065) size 743x290 [border: (5px solid #800080)] 571 569 RenderText {#text} at (199,5) size 172x19 572 570 text run at (199,5) width 164: "This is text within the DIV. " … … 616 614 text run at (5,265) width 167: "which the asterisk appears. " 617 615 text run at (172,265) width 380: "Otherwise, its top should align with the top of the next line-box." 618 RenderBlock {HR} at (357,23 33) size 41x2 [border: (1px inset #000000)]619 RenderBlock {DIV} at (6,23 43) size 743x130 [border: (5px solid #800080)]616 RenderBlock {HR} at (357,2363) size 41x2 [border: (1px inset #000000)] 617 RenderBlock {DIV} at (6,2373) size 743x130 [border: (5px solid #800080)] 620 618 RenderText {#text} at (20,5) size 172x19 621 619 text run at (20,5) width 164: "This is text within the DIV. " … … 643 641 text run at (5,105) width 56: "appears. " 644 642 text run at (61,105) width 380: "Otherwise, its top should align with the top of the next line-box." 645 RenderBlock {HR} at (28,2 497) size 563x2 [border: (1px inset #000000)]646 RenderBlock {DIV} at (6,25 23) size 490x310 [border: (5px solid #800080)]643 RenderBlock {HR} at (28,2527) size 563x2 [border: (1px inset #000000)] 644 RenderBlock {DIV} at (6,2553) size 490x310 [border: (5px solid #800080)] 647 645 RenderText {#text} at (199,5) size 50x19 648 646 text run at (199,5) width 50: "This is *" … … 675 673 text run at (5,265) width 456: "of the floated element to avoid floating elements appearing before text which" 676 674 text run at (5,285) width 213: "precedes it in the source document." 677 RenderBlock {HR} at (357,28 41) size 41x2 [border: (1px inset #000000)]678 RenderBlock {DIV} at (6,28 51) size 490x230 [border: (5px solid #800080)]675 RenderBlock {HR} at (357,2871) size 41x2 [border: (1px inset #000000)] 676 RenderBlock {DIV} at (6,2881) size 490x230 [border: (5px solid #800080)] 679 677 RenderText {#text} at (20,5) size 50x19 680 678 text run at (20,5) width 50: "This is *" … … 698 696 text run at (5,185) width 479: "insertion point of the floated element to avoid floating elements appearing before" 699 697 text run at (5,205) width 278: "text which precedes it in the source document." 700 RenderBlock {HR} at (28,31 05) size 563x2 [border: (1px inset #000000)]698 RenderBlock {HR} at (28,3135) size 563x2 [border: (1px inset #000000)] -
trunk/Source/WebCore/ChangeLog
r121778 r121789 1 2012-07-03 Robert Hogan <robert@webkit.org> 2 3 CSS 2.1 failure: floats-wrap-top-below-inline-* fail 4 https://bugs.webkit.org/show_bug.cgi?id=88171 5 6 Reviewed by Eric Seidel. 7 8 When shifting a line or element left or right to avoid a float use the height 9 of the line or element to determine whether the float is inside the element or 10 if it overlaps the bottom of the element. 11 12 Do this by passing the height of the element to the interval tree used to detect 13 the overlap with it's containing block's floats. The height is zero by default so 14 callers to logical[Left|Right]OffsetForLine will need to pass the height if they 15 want to use it to detect floats to avoid. 16 17 Tests: css2.1/20110323/floats-wrap-top-below-bfc-001l.htm 18 css2.1/20110323/floats-wrap-top-below-bfc-001r.htm 19 css2.1/20110323/floats-wrap-top-below-bfc-002l.htm 20 css2.1/20110323/floats-wrap-top-below-bfc-002r.htm 21 css2.1/20110323/floats-wrap-top-below-bfc-003l.htm 22 css2.1/20110323/floats-wrap-top-below-bfc-003r.htm 23 css2.1/20110323/floats-wrap-top-below-inline-001l.htm 24 css2.1/20110323/floats-wrap-top-below-inline-001r.htm 25 css2.1/20110323/floats-wrap-top-below-inline-002l.htm 26 css2.1/20110323/floats-wrap-top-below-inline-002r.htm 27 css2.1/20110323/floats-wrap-top-below-inline-003l.htm 28 css2.1/20110323/floats-wrap-top-below-inline-003r.htm 29 css2.1/20110323/floats-zero-height-wrap-001.htm 30 css2.1/20110323/floats-zero-height-wrap-002.htm 31 fast/block/float/floats-wrap-inside-inline-001.htm 32 fast/block/float/floats-wrap-inside-inline-002.htm 33 fast/block/float/floats-wrap-inside-inline-003.htm 34 fast/block/float/floats-wrap-inside-inline-004.htm 35 fast/block/float/floats-wrap-inside-inline-005.htm 36 37 * rendering/RenderBlock.cpp: 38 (WebCore::RenderBlock::computeStartPositionDeltaForChildAvoidingFloats): 39 (WebCore::::collectIfNeeded): 40 (WebCore::RenderBlock::logicalLeftOffsetForLine): 41 (WebCore::RenderBlock::logicalRightOffsetForLine): 42 (WebCore::RenderBlock::getClearDelta): 43 * rendering/RenderBlock.h: 44 (WebCore::RenderBlock::availableLogicalWidthForLine): 45 (WebCore::RenderBlock::logicalRightOffsetForLine): 46 (WebCore::RenderBlock::logicalLeftOffsetForLine): 47 (WebCore::RenderBlock::startOffsetForLine): 48 (WebCore::RenderBlock::endOffsetForLine): 49 (WebCore::RenderBlock::pixelSnappedLogicalLeftOffsetForLine): 50 (WebCore::RenderBlock::pixelSnappedLogicalRightOffsetForLine): 51 (RenderBlock): 52 (WebCore::RenderBlock::FloatIntervalSearchAdapter::FloatIntervalSearchAdapter): 53 (WebCore::RenderBlock::FloatIntervalSearchAdapter::lowValue): 54 (WebCore::RenderBlock::FloatIntervalSearchAdapter::highValue): 55 (FloatIntervalSearchAdapter): 56 * rendering/RenderBlockLineLayout.cpp: 57 (WebCore::logicalBottomForLine): 58 (WebCore): 59 (WebCore::LineWidth::updateAvailableWidth): 60 (WebCore::RenderBlock::computeInlineDirectionPositionsForLine): 61 * rendering/RenderBox.cpp: 62 (WebCore::RenderBox::containingBlockAvailableLineWidthInRegion): 63 1 64 2012-07-03 Vsevolod Vlasov <vsevik@chromium.org> 2 65 -
trunk/Source/WebCore/rendering/RenderBlock.cpp
r121728 r121789 2138 2138 blockOffset = max(blockOffset, blockOffset + (region->offsetFromLogicalTopOfFirstPage() - offsetFromLogicalTopOfFirstPage)); 2139 2139 2140 LayoutUnit startOff = startOffsetForLine(blockOffset, false, region, offsetFromLogicalTopOfFirstPage); 2140 LayoutUnit startOff = startOffsetForLine(blockOffset, false, region, offsetFromLogicalTopOfFirstPage, logicalHeightForChild(child)); 2141 2141 2142 if (style()->textAlign() != WEBKIT_CENTER && !child->style()->marginStartUsing(style()).isAuto()) { 2142 2143 if (childMarginStart < 0) … … 3962 3963 } 3963 3964 3965 static bool rangesIntersect(int floatTop, int floatBottom, int objectTop, int objectBottom) 3966 { 3967 if (objectTop >= floatBottom || objectBottom < floatTop) 3968 return false; 3969 3970 // The top of the object overlaps the float 3971 if (objectTop >= floatTop) 3972 return true; 3973 3974 // The object encloses the float 3975 if (objectTop < floatTop && objectBottom > floatBottom) 3976 return true; 3977 3978 // The bottom of the object overlaps the float 3979 if (objectBottom > objectTop && objectBottom > floatTop && objectBottom <= floatBottom) 3980 return true; 3981 3982 return false; 3983 } 3984 3964 3985 template <RenderBlock::FloatingObject::Type FloatTypeValue> 3965 3986 inline void RenderBlock::FloatIntervalSearchAdapter<FloatTypeValue>::collectIfNeeded(const IntervalType& interval) const 3966 3987 { 3967 3988 const FloatingObject* r = interval.data(); 3968 if (r->type() == FloatTypeValue && interval.low() <= m_value && m_value < interval.high()) { 3969 // All the objects returned from the tree should be already placed. 3970 ASSERT(r->isPlaced() && m_renderer->pixelSnappedLogicalTopForFloat(r) <= m_value && m_renderer->pixelSnappedLogicalBottomForFloat(r) > m_value); 3971 3972 if (FloatTypeValue == FloatingObject::FloatLeft 3973 && m_renderer->logicalRightForFloat(r) > m_offset) { 3974 m_offset = m_renderer->logicalRightForFloat(r); 3975 if (m_heightRemaining) 3976 *m_heightRemaining = m_renderer->logicalBottomForFloat(r) - m_value; 3977 } 3978 3979 if (FloatTypeValue == FloatingObject::FloatRight 3980 && m_renderer->logicalLeftForFloat(r) < m_offset) { 3981 m_offset = m_renderer->logicalLeftForFloat(r); 3982 if (m_heightRemaining) 3983 *m_heightRemaining = m_renderer->logicalBottomForFloat(r) - m_value; 3984 } 3989 if (r->type() != FloatTypeValue || !rangesIntersect(interval.low(), interval.high(), m_lowValue, m_highValue)) 3990 return; 3991 3992 // All the objects returned from the tree should be already placed. 3993 ASSERT(r->isPlaced() && rangesIntersect(m_renderer->pixelSnappedLogicalTopForFloat(r), m_renderer->pixelSnappedLogicalBottomForFloat(r), m_lowValue, m_highValue)); 3994 3995 if (FloatTypeValue == FloatingObject::FloatLeft 3996 && m_renderer->logicalRightForFloat(r) > m_offset) { 3997 m_offset = m_renderer->logicalRightForFloat(r); 3998 if (m_heightRemaining) 3999 *m_heightRemaining = m_renderer->logicalBottomForFloat(r) - m_lowValue; 4000 } 4001 4002 if (FloatTypeValue == FloatingObject::FloatRight 4003 && m_renderer->logicalLeftForFloat(r) < m_offset) { 4004 m_offset = m_renderer->logicalLeftForFloat(r); 4005 if (m_heightRemaining) 4006 *m_heightRemaining = m_renderer->logicalBottomForFloat(r) - m_lowValue; 3985 4007 } 3986 4008 } … … 4016 4038 } 4017 4039 4018 LayoutUnit RenderBlock::logicalLeftOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixedOffset, bool applyTextIndent, LayoutUnit* heightRemaining ) const4040 LayoutUnit RenderBlock::logicalLeftOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixedOffset, bool applyTextIndent, LayoutUnit* heightRemaining, LayoutUnit logicalHeight) const 4019 4041 { 4020 4042 LayoutUnit left = fixedOffset; … … 4023 4045 *heightRemaining = 1; 4024 4046 4025 FloatIntervalSearchAdapter<FloatingObject::FloatLeft> adapter(this, roundToInt(logicalTop), left, heightRemaining);4047 FloatIntervalSearchAdapter<FloatingObject::FloatLeft> adapter(this, roundToInt(logicalTop), roundToInt(logicalTop + logicalHeight), left, heightRemaining); 4026 4048 m_floatingObjects->placedFloatsTree().allOverlapsWithAdapter(adapter); 4027 4049 } … … 4063 4085 } 4064 4086 4065 LayoutUnit RenderBlock::logicalRightOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixedOffset, bool applyTextIndent, LayoutUnit* heightRemaining ) const4087 LayoutUnit RenderBlock::logicalRightOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixedOffset, bool applyTextIndent, LayoutUnit* heightRemaining, LayoutUnit logicalHeight) const 4066 4088 { 4067 4089 LayoutUnit right = fixedOffset; … … 4071 4093 4072 4094 LayoutUnit rightFloatOffset = fixedOffset; 4073 FloatIntervalSearchAdapter<FloatingObject::FloatRight> adapter(this, roundToInt(logicalTop), r ightFloatOffset, heightRemaining);4095 FloatIntervalSearchAdapter<FloatingObject::FloatRight> adapter(this, roundToInt(logicalTop), roundToInt(logicalTop + logicalHeight), rightFloatOffset, heightRemaining); 4074 4096 m_floatingObjects->placedFloatsTree().allOverlapsWithAdapter(adapter); 4075 4097 right = min(right, rightFloatOffset); … … 4512 4534 LayoutUnit newLogicalTop = logicalTop; 4513 4535 while (true) { 4514 LayoutUnit availableLogicalWidthAtNewLogicalTopOffset = availableLogicalWidthForLine(newLogicalTop, false );4536 LayoutUnit availableLogicalWidthAtNewLogicalTopOffset = availableLogicalWidthForLine(newLogicalTop, false, logicalHeightForChild(child)); 4515 4537 if (availableLogicalWidthAtNewLogicalTopOffset == availableLogicalWidthForContent(newLogicalTop)) 4516 4538 return newLogicalTop - logicalTop; -
trunk/Source/WebCore/rendering/RenderBlock.h
r121557 r121789 132 132 // Versions that can compute line offsets with the region and page offset passed in. Used for speed to avoid having to 133 133 // compute the region all over again when you already know it. 134 LayoutUnit availableLogicalWidthForLine(LayoutUnit position, bool firstLine, RenderRegion* region, LayoutUnit offsetFromLogicalTopOfFirstPage ) const135 { 136 return max(ZERO_LAYOUT_UNIT, logicalRightOffsetForLine(position, firstLine, region, offsetFromLogicalTopOfFirstPage )137 - logicalLeftOffsetForLine(position, firstLine, region, offsetFromLogicalTopOfFirstPage ));138 } 139 LayoutUnit logicalRightOffsetForLine(LayoutUnit position, bool firstLine, RenderRegion* region, LayoutUnit offsetFromLogicalTopOfFirstPage ) const140 { 141 return logicalRightOffsetForLine(position, logicalRightOffsetForContent(region, offsetFromLogicalTopOfFirstPage), firstLine );142 } 143 LayoutUnit logicalLeftOffsetForLine(LayoutUnit position, bool firstLine, RenderRegion* region, LayoutUnit offsetFromLogicalTopOfFirstPage ) const144 { 145 return logicalLeftOffsetForLine(position, logicalLeftOffsetForContent(region, offsetFromLogicalTopOfFirstPage), firstLine );146 } 147 LayoutUnit startOffsetForLine(LayoutUnit position, bool firstLine, RenderRegion* region, LayoutUnit offsetFromLogicalTopOfFirstPage ) const148 { 149 return style()->isLeftToRightDirection() ? logicalLeftOffsetForLine(position, firstLine, region, offsetFromLogicalTopOfFirstPage )150 : logicalWidth() - logicalRightOffsetForLine(position, firstLine, region, offsetFromLogicalTopOfFirstPage );151 } 152 LayoutUnit endOffsetForLine(LayoutUnit position, bool firstLine, RenderRegion* region, LayoutUnit offsetFromLogicalTopOfFirstPage ) const153 { 154 return !style()->isLeftToRightDirection() ? logicalLeftOffsetForLine(position, firstLine, region, offsetFromLogicalTopOfFirstPage )155 : logicalWidth() - logicalRightOffsetForLine(position, firstLine, region, offsetFromLogicalTopOfFirstPage );156 } 157 158 LayoutUnit availableLogicalWidthForLine(LayoutUnit position, bool firstLine ) const159 { 160 return availableLogicalWidthForLine(position, firstLine, regionAtBlockOffset(position), offsetFromLogicalTopOfFirstPage() );161 } 162 LayoutUnit logicalRightOffsetForLine(LayoutUnit position, bool firstLine ) const163 { 164 return logicalRightOffsetForLine(position, logicalRightOffsetForContent(position), firstLine, 0 );165 } 166 LayoutUnit logicalLeftOffsetForLine(LayoutUnit position, bool firstLine ) const167 { 168 return logicalLeftOffsetForLine(position, logicalLeftOffsetForContent(position), firstLine, 0 );169 } 170 LayoutUnit pixelSnappedLogicalLeftOffsetForLine(LayoutUnit position, bool firstLine ) const171 { 172 return roundToInt(logicalLeftOffsetForLine(position, firstLine ));173 } 174 LayoutUnit pixelSnappedLogicalRightOffsetForLine(LayoutUnit position, bool firstLine ) const134 LayoutUnit availableLogicalWidthForLine(LayoutUnit position, bool firstLine, RenderRegion* region, LayoutUnit offsetFromLogicalTopOfFirstPage, LayoutUnit logicalHeight = 0) const 135 { 136 return max(ZERO_LAYOUT_UNIT, logicalRightOffsetForLine(position, firstLine, region, offsetFromLogicalTopOfFirstPage, logicalHeight) 137 - logicalLeftOffsetForLine(position, firstLine, region, offsetFromLogicalTopOfFirstPage, logicalHeight)); 138 } 139 LayoutUnit logicalRightOffsetForLine(LayoutUnit position, bool firstLine, RenderRegion* region, LayoutUnit offsetFromLogicalTopOfFirstPage, LayoutUnit logicalHeight = 0) const 140 { 141 return logicalRightOffsetForLine(position, logicalRightOffsetForContent(region, offsetFromLogicalTopOfFirstPage), firstLine, 0, logicalHeight); 142 } 143 LayoutUnit logicalLeftOffsetForLine(LayoutUnit position, bool firstLine, RenderRegion* region, LayoutUnit offsetFromLogicalTopOfFirstPage, LayoutUnit logicalHeight = 0) const 144 { 145 return logicalLeftOffsetForLine(position, logicalLeftOffsetForContent(region, offsetFromLogicalTopOfFirstPage), firstLine, 0, logicalHeight); 146 } 147 LayoutUnit startOffsetForLine(LayoutUnit position, bool firstLine, RenderRegion* region, LayoutUnit offsetFromLogicalTopOfFirstPage, LayoutUnit logicalHeight = 0) const 148 { 149 return style()->isLeftToRightDirection() ? logicalLeftOffsetForLine(position, firstLine, region, offsetFromLogicalTopOfFirstPage, logicalHeight) 150 : logicalWidth() - logicalRightOffsetForLine(position, firstLine, region, offsetFromLogicalTopOfFirstPage, logicalHeight); 151 } 152 LayoutUnit endOffsetForLine(LayoutUnit position, bool firstLine, RenderRegion* region, LayoutUnit offsetFromLogicalTopOfFirstPage, LayoutUnit logicalHeight = 0) const 153 { 154 return !style()->isLeftToRightDirection() ? logicalLeftOffsetForLine(position, firstLine, region, offsetFromLogicalTopOfFirstPage, logicalHeight) 155 : logicalWidth() - logicalRightOffsetForLine(position, firstLine, region, offsetFromLogicalTopOfFirstPage, logicalHeight); 156 } 157 158 LayoutUnit availableLogicalWidthForLine(LayoutUnit position, bool firstLine, LayoutUnit logicalHeight = 0) const 159 { 160 return availableLogicalWidthForLine(position, firstLine, regionAtBlockOffset(position), offsetFromLogicalTopOfFirstPage(), logicalHeight); 161 } 162 LayoutUnit logicalRightOffsetForLine(LayoutUnit position, bool firstLine, LayoutUnit logicalHeight = 0) const 163 { 164 return logicalRightOffsetForLine(position, logicalRightOffsetForContent(position), firstLine, 0, logicalHeight); 165 } 166 LayoutUnit logicalLeftOffsetForLine(LayoutUnit position, bool firstLine, LayoutUnit logicalHeight = 0) const 167 { 168 return logicalLeftOffsetForLine(position, logicalLeftOffsetForContent(position), firstLine, 0, logicalHeight); 169 } 170 LayoutUnit pixelSnappedLogicalLeftOffsetForLine(LayoutUnit position, bool firstLine, LayoutUnit logicalHeight = 0) const 171 { 172 return roundToInt(logicalLeftOffsetForLine(position, firstLine, logicalHeight)); 173 } 174 LayoutUnit pixelSnappedLogicalRightOffsetForLine(LayoutUnit position, bool firstLine, LayoutUnit logicalHeight = 0) const 175 175 { 176 176 // FIXME: Multicolumn layouts break carrying over subpixel values to the logical right offset because the lines may be shifted 177 177 // by a subpixel value for all but the first column. This can lead to the actual pixel snapped width of the column being off 178 178 // by one pixel when rendered versus layed out, which can result in the line being clipped. For now, we have to floor. 179 return floorToInt(logicalRightOffsetForLine(position, firstLine ));180 } 181 LayoutUnit startOffsetForLine(LayoutUnit position, bool firstLine ) const182 { 183 return style()->isLeftToRightDirection() ? logicalLeftOffsetForLine(position, firstLine )184 : logicalWidth() - logicalRightOffsetForLine(position, firstLine );185 } 186 LayoutUnit endOffsetForLine(LayoutUnit position, bool firstLine ) const187 { 188 return !style()->isLeftToRightDirection() ? logicalLeftOffsetForLine(position, firstLine )189 : logicalWidth() - logicalRightOffsetForLine(position, firstLine );179 return floorToInt(logicalRightOffsetForLine(position, firstLine, logicalHeight)); 180 } 181 LayoutUnit startOffsetForLine(LayoutUnit position, bool firstLine, LayoutUnit logicalHeight = 0) const 182 { 183 return style()->isLeftToRightDirection() ? logicalLeftOffsetForLine(position, firstLine, logicalHeight) 184 : logicalWidth() - logicalRightOffsetForLine(position, firstLine, logicalHeight); 185 } 186 LayoutUnit endOffsetForLine(LayoutUnit position, bool firstLine, LayoutUnit logicalHeight = 0) const 187 { 188 return !style()->isLeftToRightDirection() ? logicalLeftOffsetForLine(position, firstLine, logicalHeight) 189 : logicalWidth() - logicalRightOffsetForLine(position, firstLine, logicalHeight); 190 190 } 191 191 … … 416 416 virtual void paintObject(PaintInfo&, const LayoutPoint&); 417 417 418 LayoutUnit logicalRightOffsetForLine(LayoutUnit position, LayoutUnit fixedOffset, bool applyTextIndent, LayoutUnit* logicalHeightRemaining = 0 ) const;419 LayoutUnit logicalLeftOffsetForLine(LayoutUnit position, LayoutUnit fixedOffset, bool applyTextIndent, LayoutUnit* logicalHeightRemaining = 0 ) const;418 LayoutUnit logicalRightOffsetForLine(LayoutUnit position, LayoutUnit fixedOffset, bool applyTextIndent, LayoutUnit* logicalHeightRemaining = 0, LayoutUnit logicalHeight = 0) const; 419 LayoutUnit logicalLeftOffsetForLine(LayoutUnit position, LayoutUnit fixedOffset, bool applyTextIndent, LayoutUnit* logicalHeightRemaining = 0, LayoutUnit logicalHeight = 0) const; 420 420 421 421 virtual ETextAlign textAlignmentForLine(bool endsWithSoftBreak) const; … … 1001 1001 typedef FloatingObjectInterval IntervalType; 1002 1002 1003 FloatIntervalSearchAdapter(const RenderBlock* renderer, int value, LayoutUnit& offset, LayoutUnit* heightRemaining)1003 FloatIntervalSearchAdapter(const RenderBlock* renderer, int lowValue, int highValue, LayoutUnit& offset, LayoutUnit* heightRemaining) 1004 1004 : m_renderer(renderer) 1005 , m_value(value) 1005 , m_lowValue(lowValue) 1006 , m_highValue(highValue) 1006 1007 , m_offset(offset) 1007 1008 , m_heightRemaining(heightRemaining) … … 1009 1010 } 1010 1011 1011 inline int lowValue() const { return m_ value; }1012 inline int highValue() const { return m_ value; }1012 inline int lowValue() const { return m_lowValue; } 1013 inline int highValue() const { return m_highValue; } 1013 1014 void collectIfNeeded(const IntervalType&) const; 1014 1015 1015 1016 private: 1016 1017 const RenderBlock* m_renderer; 1017 int m_value; 1018 int m_lowValue; 1019 int m_highValue; 1018 1020 LayoutUnit& m_offset; 1019 1021 LayoutUnit* m_heightRemaining; -
trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp
r121123 r121789 113 113 }; 114 114 115 static LayoutUnit logicalHeightForLine(RenderBlock* block) 116 { 117 InlineFlowBox* lineBox = block->firstRootBox(); 118 LayoutUnit logicalHeight = 0; 119 if (!lineBox) 120 return logicalHeight; 121 122 if (lineBox->firstChild() && lineBox->firstChild()->renderer() && lineBox->firstChild()->renderer()->isRenderBlock()) 123 logicalHeight = toRenderBlock(lineBox->firstChild()->renderer())->logicalHeight(); 124 else 125 logicalHeight = lineBox->height(); 126 return logicalHeight; 127 } 128 115 129 inline void LineWidth::updateAvailableWidth() 116 130 { 117 131 LayoutUnit height = m_block->logicalHeight(); 118 m_left = m_block->logicalLeftOffsetForLine(height, m_isFirstLine); 119 m_right = m_block->logicalRightOffsetForLine(height, m_isFirstLine); 132 LayoutUnit logicalHeight = logicalHeightForLine(m_block); 133 m_left = m_block->logicalLeftOffsetForLine(height, m_isFirstLine, logicalHeight); 134 m_right = m_block->logicalRightOffsetForLine(height, m_isFirstLine, logicalHeight); 120 135 121 136 computeAvailableWidthFromLeftAndRight(); … … 752 767 { 753 768 ETextAlign textAlign = textAlignmentForLine(!reachedEnd && !lineBox->endsWithBreak()); 754 float logicalLeft = pixelSnappedLogicalLeftOffsetForLine(logicalHeight(), lineInfo.isFirstLine()); 755 float availableLogicalWidth = pixelSnappedLogicalRightOffsetForLine(logicalHeight(), lineInfo.isFirstLine()) - logicalLeft; 769 770 LayoutUnit lineLogicalHeight = logicalHeightForLine(this); 771 float logicalLeft = pixelSnappedLogicalLeftOffsetForLine(logicalHeight(), lineInfo.isFirstLine(), lineLogicalHeight); 772 float availableLogicalWidth = pixelSnappedLogicalRightOffsetForLine(logicalHeight(), lineInfo.isFirstLine(), lineLogicalHeight) - logicalLeft; 756 773 757 774 bool needsWordSpacing = false; -
trunk/Source/WebCore/rendering/RenderBox.cpp
r121722 r121789 1239 1239 containingBlockRegion = cb->clampToStartAndEndRegions(region); 1240 1240 } 1241 return cb->availableLogicalWidthForLine(logicalTopPosition, false, containingBlockRegion, adjustedPageOffsetForContainingBlock );1241 return cb->availableLogicalWidthForLine(logicalTopPosition, false, containingBlockRegion, adjustedPageOffsetForContainingBlock, availableLogicalHeight()); 1242 1242 } 1243 1243
Note: See TracChangeset
for help on using the changeset viewer.