Changeset 81992 in webkit
- Timestamp:
- Mar 25, 2011 2:57:07 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 8 added
- 112 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r81986 r81992 1 2011-03-24 David Hyatt <hyatt@apple.com> 2 3 Reviewed by Dan Bernstein. 4 5 Add a simplified normal flow layout path optimization for overflow recomputation 6 and for positioned objects inside relative positioned containers. 7 8 Currently there is an optimized code path for positioned objects, but as soon as 9 we encounter a normal flow object in the containing block chain, we lose the 10 optimization. 11 12 This patch adds a new type of style difference called SimplifiedLayout that is 13 returned when only overflow needs to be recomputed. Whenever a transform changes, 14 this is the hint returned now instead of a full layout. 15 16 In addition, when positioned objects need layout and start marking up the 17 containing block chain, we now propagate the fact that the layout is simplified 18 all the way up to the root, even when we encounter normal flow containing 19 blocks. 20 21 The layoutOnlyPositionedObjects function has been renamed to simplifiedLayout() 22 and is now used for all of these cases (in addition to what it handled before). 23 24 The simplified layout optimization (even in ToT) did not work correctly when 25 static distances needed to be recomputed. In order to make static distance 26 computations work with simplified layout, positioned objects now always compute 27 their static offsets, even if they explicitly specify left/top. That way normal 28 flow layout never has to re-run when the positioned object moves. This makes 29 movement of a positioned object along a single non-auto axis much faster when the 30 other axis is auto. Because this code kicked in more often for absolutely positioned 31 objects whose original display was inline, I went ahead and fixed the trailing space 32 issue with those objects. This causes a bunch of layout tests to progress. 33 34 Added fast/block/positioning/static-inline-position-dynamic.html and trailing-space-test.html. 35 36 * animations/dynamic-stylesheet-loading-expected.txt: 37 * animations/keyframe-timing-functions-expected.txt: 38 * fast/block/positioning/static-inline-position-dynamic.html: Added. 39 * fast/block/positioning/trailing-space-test.html: Added. 40 * fast/dynamic/ancestor-to-absolute-expected.txt: 41 * fast/forms/input-appearance-elementFromPoint-expected.txt: 42 * fast/forms/input-hit-test-border-expected.txt: 43 * platform/mac/fast/block/positioning/002-expected.png: 44 * platform/mac/fast/block/positioning/003-expected.png: 45 * platform/mac/fast/block/positioning/004-expected.png: 46 * platform/mac/fast/block/positioning/005-expected.png: 47 * platform/mac/fast/block/positioning/006-expected.png: 48 * platform/mac/fast/block/positioning/007-expected.png: 49 * platform/mac/fast/block/positioning/008-expected.png: 50 * platform/mac/fast/block/positioning/009-expected.png: 51 * platform/mac/fast/block/positioning/010-expected.png: 52 * platform/mac/fast/block/positioning/011-expected.png: 53 * platform/mac/fast/block/positioning/012-expected.png: 54 * platform/mac/fast/block/positioning/013-expected.png: 55 * platform/mac/fast/block/positioning/014-expected.png: 56 * platform/mac/fast/block/positioning/015-expected.png: 57 * platform/mac/fast/block/positioning/016-expected.png: 58 * platform/mac/fast/block/positioning/017-expected.png: 59 * platform/mac/fast/block/positioning/018-expected.png: 60 * platform/mac/fast/block/positioning/019-expected.png: 61 * platform/mac/fast/block/positioning/020-expected.png: 62 * platform/mac/fast/block/positioning/021-expected.png: 63 * platform/mac/fast/block/positioning/022-expected.png: 64 * platform/mac/fast/block/positioning/023-expected.png: 65 * platform/mac/fast/block/positioning/024-expected.png: 66 * platform/mac/fast/block/positioning/025-expected.png: 67 * platform/mac/fast/block/positioning/026-expected.png: 68 * platform/mac/fast/block/positioning/027-expected.png: 69 * platform/mac/fast/block/positioning/028-expected.png: 70 * platform/mac/fast/block/positioning/029-expected.png: 71 * platform/mac/fast/block/positioning/030-expected.png: 72 * platform/mac/fast/block/positioning/031-expected.png: 73 * platform/mac/fast/block/positioning/032-expected.png: 74 * platform/mac/fast/block/positioning/033-expected.png: 75 * platform/mac/fast/block/positioning/034-expected.png: 76 * platform/mac/fast/block/positioning/035-expected.png: 77 * platform/mac/fast/block/positioning/036-expected.png: 78 * platform/mac/fast/block/positioning/037-expected.png: 79 * platform/mac/fast/block/positioning/038-expected.png: 80 * platform/mac/fast/block/positioning/039-expected.png: 81 * platform/mac/fast/block/positioning/040-expected.png: 82 * platform/mac/fast/block/positioning/041-expected.png: 83 * platform/mac/fast/block/positioning/042-expected.png: 84 * platform/mac/fast/block/positioning/043-expected.png: 85 * platform/mac/fast/block/positioning/044-expected.png: 86 * platform/mac/fast/block/positioning/045-expected.png: 87 * platform/mac/fast/block/positioning/046-expected.png: 88 * platform/mac/fast/block/positioning/047-expected.checksum: 89 * platform/mac/fast/block/positioning/047-expected.png: 90 * platform/mac/fast/block/positioning/048-expected.png: 91 * platform/mac/fast/block/positioning/049-expected.png: 92 * platform/mac/fast/block/positioning/050-expected.png: 93 * platform/mac/fast/block/positioning/056-expected.txt: 94 * platform/mac/fast/block/positioning/061-expected.png: 95 * platform/mac/fast/block/positioning/062-expected.png: 96 * platform/mac/fast/block/positioning/auto/005-expected.txt: 97 * platform/mac/fast/block/positioning/auto/006-expected.txt: 98 * platform/mac/fast/block/positioning/auto/007-expected.png: 99 * platform/mac/fast/block/positioning/auto/vertical-lr/005-expected.txt: 100 * platform/mac/fast/block/positioning/auto/vertical-lr/006-expected.txt: 101 * platform/mac/fast/block/positioning/auto/vertical-lr/007-expected.checksum: 102 * platform/mac/fast/block/positioning/auto/vertical-lr/007-expected.png: 103 * platform/mac/fast/block/positioning/auto/vertical-rl/005-expected.txt: 104 * platform/mac/fast/block/positioning/auto/vertical-rl/006-expected.txt: 105 * platform/mac/fast/block/positioning/auto/vertical-rl/007-expected.checksum: 106 * platform/mac/fast/block/positioning/auto/vertical-rl/007-expected.png: 107 * platform/mac/fast/block/positioning/fixed-positioning-scrollbar-bug-expected.txt: 108 * platform/mac/fast/block/positioning/inline-block-relposition-expected.checksum: 109 * platform/mac/fast/block/positioning/inline-block-relposition-expected.png: 110 * platform/mac/fast/block/positioning/inline-block-relposition-expected.txt: 111 * platform/mac/fast/block/positioning/move-with-auto-width-expected.png: 112 * platform/mac/fast/block/positioning/negative-rel-position-expected.png: 113 * platform/mac/fast/block/positioning/relative-overconstrained-expected.png: 114 * platform/mac/fast/block/positioning/relative-overflow-block-expected.txt: 115 * platform/mac/fast/block/positioning/static-inline-position-dynamic-expected.checksum: Added. 116 * platform/mac/fast/block/positioning/static-inline-position-dynamic-expected.png: Added. 117 * platform/mac/fast/block/positioning/static-inline-position-dynamic-expected.txt: Added. 118 * platform/mac/fast/block/positioning/trailing-space-test-expected.checksum: Added. 119 * platform/mac/fast/block/positioning/trailing-space-test-expected.png: Added. 120 * platform/mac/fast/block/positioning/trailing-space-test-expected.txt: Added. 121 * platform/mac/fast/clip/001-expected.txt: 122 * platform/mac/fast/clip/004-expected.txt: 123 * platform/mac/fast/clip/006-expected.txt: 124 * platform/mac/fast/clip/007-expected.txt: 125 * platform/mac/fast/clip/008-expected.txt: 126 * platform/mac/fast/clip/009-expected.txt: 127 * platform/mac/fast/clip/010-expected.txt: 128 * platform/mac/fast/clip/011-expected.txt: 129 * platform/mac/fast/clip/012-expected.txt: 130 * platform/mac/fast/clip/013-expected.txt: 131 * platform/mac/fast/clip/014-expected.txt: 132 * platform/mac/fast/clip/nestedTransparencyClip-expected.txt: 133 * platform/mac/fast/clip/outline-overflowClip-expected.txt: 134 * platform/mac/fast/forms/input-appearance-preventDefault-expected.txt: 135 * platform/mac/fast/invalid/014-expected.txt: 136 * platform/mac/fast/layers/layer-visibility-expected.txt: 137 * platform/mac/fast/repaint/layout-state-scrolloffset-expected.txt: 138 * platform/mac/fast/repaint/layout-state-scrolloffset2-expected.txt: 139 * platform/mac/fast/repaint/layout-state-scrolloffset3-expected.txt: 140 * platform/mac/tables/mozilla/bugs/bug51140-expected.txt: 141 1 142 2011-03-25 Geoffrey Garen <ggaren@apple.com> 2 143 -
trunk/LayoutTests/animations/dynamic-stylesheet-loading-expected.txt
r57390 r81992 1 This test performs an animation and then dynamically loads a new stylesheet (which is empty). It should start animating after a 100ms delay and then stop halfway through the animation at which point we see if it is at the correct position. The loading of the stylesheet should not prevent the animation from running. 1 This test performs an animation and then dynamically loads a new stylesheet (which is empty). It should start animating after a 100ms delay and then stop halfway through the animation at which point we see if it is at the correct position. The loading of the stylesheet should not prevent the animation from running. 2 2 PASS - "webkitTransform.5" property for "splash" element at 0.3s saw something close to: 100 3 3 -
trunk/LayoutTests/animations/keyframe-timing-functions-expected.txt
r39187 r81992 1 This test should do a linear animation. The timing-function comes from the keyframe, so this is testing whether or not the timing function in keyframes is used. 1 This test should do a linear animation. The timing-function comes from the keyframe, so this is testing whether or not the timing function in keyframes is used. 2 2 PASS - "left" property for "box" element at 0.75s saw something close to: 300 3 3 -
trunk/LayoutTests/fast/dynamic/ancestor-to-absolute-expected.txt
r25132 r81992 1 Test that dynamically making element absolute positioned does not corrupt it's childrens layout dirty state. This passes if it does not crash. 1 Test that dynamically making element absolute positioned does not corrupt it's childrens layout dirty state. This passes if it does not crash. 2 2 -
trunk/LayoutTests/fast/forms/input-appearance-elementFromPoint-expected.txt
r25234 r81992 1 This tests that elementFromPoint will get the input element. Test Passed1 This tests that elementFromPoint will get the input element. Test Passed -
trunk/LayoutTests/fast/forms/input-hit-test-border-expected.txt
r41379 r81992 1 This tests hit testing on the border and padding areas of an input. Clicks in either should hit the input element. Test Passed1 This tests hit testing on the border and padding areas of an input. Clicks in either should hit the input element. Test Passed -
trunk/LayoutTests/platform/mac/fast/block/positioning/047-expected.checksum
r71047 r81992 1 c6203e2d1ecd4e4292da209a89859a4b 1 f5977295ce14b2d5e2dce13ea9443788 -
trunk/LayoutTests/platform/mac/fast/block/positioning/056-expected.txt
r25970 r81992 4 4 RenderBlock {HTML} at (0,0) size 800x600 5 5 RenderBody {BODY} at (8,8) size 784x584 6 RenderText {#text} at (0,0) size 61 9x187 text run at (0,0) width 61 9: "You should see a single green stripe below. The test has failed if you don't see a perfect rectangle."6 RenderText {#text} at (0,0) size 615x18 7 text run at (0,0) width 615: "You should see a single green stripe below. The test has failed if you don't see a perfect rectangle." 8 8 RenderText {#text} at (0,0) size 0x0 9 9 layer at (8,26) size 96x370 -
trunk/LayoutTests/platform/mac/fast/block/positioning/auto/005-expected.txt
r63403 r81992 11 11 text run at (0,36) width 326: "pixels of padding on the right side of the box stack. " 12 12 text run at (326,36) width 455: "The black box's top should be aligned with the end of the last line in this" 13 text run at (0,54) width 4 70: "parargaph and its left side should begin right after the end of this sentence."13 text run at (0,54) width 466: "parargaph and its left side should begin right after the end of this sentence." 14 14 RenderText {#text} at (0,0) size 0x0 15 layer at (47 8,62) size 240x34016 RenderBlock (positioned) {SPAN} at (47 8,62) size 240x340 [border: (20px solid #000000)]17 layer at (59 8,182) size 100x10015 layer at (474,62) size 240x340 16 RenderBlock (positioned) {SPAN} at (474,62) size 240x340 [border: (20px solid #000000)] 17 layer at (594,182) size 100x100 18 18 RenderBlock (positioned) {DIV} at (120,120) size 100x100 [bgcolor=#008000] 19 layer at (59 8,82) size 100x10019 layer at (594,82) size 100x100 20 20 RenderBlock (positioned) {DIV} at (120,20) size 100x100 [bgcolor=#808000] 21 layer at (59 8,282) size 100x10021 layer at (594,282) size 100x100 22 22 RenderBlock (positioned) {DIV} at (120,220) size 100x100 [bgcolor=#808000] -
trunk/LayoutTests/platform/mac/fast/block/positioning/auto/006-expected.txt
r34507 r81992 15 15 RenderText {#text} at (5,0) size 779x36 16 16 text run at (5,0) width 779: "The black box's top should be aligned with the end of the last line in this parargaph and its right side should begin right after" 17 text run at (6 29,18) width 8 RTL: "."17 text run at (633,18) width 4 RTL: "." 18 18 text run at (637,18) width 147: "the end of this sentence" 19 19 RenderText {#text} at (0,0) size 0x0 20 layer at ( 397,96) size 240x34021 RenderBlock (positioned) {SPAN} at (3 89,18) size 240x340 [border: (20px solid #000000)]22 layer at (5 17,216) size 100x10020 layer at (401,96) size 240x340 21 RenderBlock (positioned) {SPAN} at (393,18) size 240x340 [border: (20px solid #000000)] 22 layer at (521,216) size 100x100 23 23 RenderBlock (positioned) {DIV} at (120,120) size 100x100 [bgcolor=#008000] 24 layer at (5 17,116) size 100x10024 layer at (521,116) size 100x100 25 25 RenderBlock (positioned) {DIV} at (120,20) size 100x100 [bgcolor=#808000] 26 layer at (5 17,316) size 100x10026 layer at (521,316) size 100x100 27 27 RenderBlock (positioned) {DIV} at (120,220) size 100x100 [bgcolor=#808000] -
trunk/LayoutTests/platform/mac/fast/block/positioning/auto/vertical-lr/005-expected.txt
r79930 r81992 11 11 text run at (36,322) width 218: "The black box's left side should be" 12 12 text run at (54,0) width 577: "aligned with the last line in this paragraph and its top side should begin right after the end of" 13 text run at (72,0) width 8 8: "this sentence."13 text run at (72,0) width 84: "this sentence." 14 14 RenderText {#text} at (0,0) size 0x0 15 layer at (80,9 6) size 340x24016 RenderBlock (positioned) {SPAN} at (80,9 6) size 340x240 [border: (20px solid #000000)]17 layer at (200,21 6) size 100x10015 layer at (80,92) size 340x240 16 RenderBlock (positioned) {SPAN} at (80,92) size 340x240 [border: (20px solid #000000)] 17 layer at (200,212) size 100x100 18 18 RenderBlock (positioned) {DIV} at (120,120) size 100x100 [bgcolor=#008000] 19 layer at (100,21 6) size 100x10019 layer at (100,212) size 100x100 20 20 RenderBlock (positioned) {DIV} at (20,120) size 100x100 [bgcolor=#808000] 21 layer at (300,21 6) size 100x10021 layer at (300,212) size 100x100 22 22 RenderBlock (positioned) {DIV} at (220,120) size 100x100 [bgcolor=#808000] -
trunk/LayoutTests/platform/mac/fast/block/positioning/auto/vertical-lr/006-expected.txt
r79930 r81992 15 15 RenderText {#text} at (0,31) size 36x553 16 16 text run at (0,31) width 553: "The black box's left should be aligned with the last line in this paragraph and its top side" 17 text run at (18,31 2) width 8 RTL: "."17 text run at (18,316) width 4 RTL: "." 18 18 text run at (18,320) width 264: "should begin after the end of this sentence" 19 19 RenderText {#text} at (0,0) size 0x0 20 layer at (114,8 0) size 340x24021 RenderBlock (positioned) {SPAN} at (18,7 2) size 340x240 [border: (20px solid #000000)]22 layer at (234,20 0) size 100x10020 layer at (114,84) size 340x240 21 RenderBlock (positioned) {SPAN} at (18,76) size 340x240 [border: (20px solid #000000)] 22 layer at (234,204) size 100x100 23 23 RenderBlock (positioned) {DIV} at (120,120) size 100x100 [bgcolor=#008000] 24 layer at (134,20 0) size 100x10024 layer at (134,204) size 100x100 25 25 RenderBlock (positioned) {DIV} at (20,120) size 100x100 [bgcolor=#808000] 26 layer at (334,20 0) size 100x10026 layer at (334,204) size 100x100 27 27 RenderBlock (positioned) {DIV} at (220,120) size 100x100 [bgcolor=#808000] -
trunk/LayoutTests/platform/mac/fast/block/positioning/auto/vertical-lr/007-expected.checksum
r79930 r81992 1 a 6da533994f8b199ef30038629bc8e7e1 ada3e135ce4267664f0eb15f061ef35a -
trunk/LayoutTests/platform/mac/fast/block/positioning/auto/vertical-rl/005-expected.txt
r79930 r81992 11 11 text run at (36,322) width 218: "The black box's left side should be" 12 12 text run at (54,0) width 577: "aligned with the last line in this paragraph and its top side should begin right after the end of" 13 text run at (72,0) width 8 8: "this sentence."13 text run at (72,0) width 84: "this sentence." 14 14 RenderText {#text} at (0,0) size 0x0 15 layer at (380,9 6) size 340x24016 RenderBlock (positioned) {SPAN} at (80,9 6) size 340x240 [border: (20px solid #000000)]17 layer at (500,21 6) size 100x10015 layer at (380,92) size 340x240 16 RenderBlock (positioned) {SPAN} at (80,92) size 340x240 [border: (20px solid #000000)] 17 layer at (500,212) size 100x100 18 18 RenderBlock (positioned) {DIV} at (120,120) size 100x100 [bgcolor=#008000] 19 layer at (600,21 6) size 100x10019 layer at (600,212) size 100x100 20 20 RenderBlock (positioned) {DIV} at (20,120) size 100x100 [bgcolor=#808000] 21 layer at (400,21 6) size 100x10021 layer at (400,212) size 100x100 22 22 RenderBlock (positioned) {DIV} at (220,120) size 100x100 [bgcolor=#808000] -
trunk/LayoutTests/platform/mac/fast/block/positioning/auto/vertical-rl/006-expected.txt
r79930 r81992 15 15 RenderText {#text} at (0,22) size 36x562 16 16 text run at (0,22) width 562: "The black box's right should be aligned with the last line in this paragraph and its top side" 17 text run at (18,31 2) width 8 RTL: "."17 text run at (18,316) width 4 RTL: "." 18 18 text run at (18,320) width 264: "should begin after the end of this sentence" 19 19 RenderText {#text} at (0,0) size 0x0 20 layer at (346,8 0) size 340x24021 RenderBlock (positioned) {SPAN} at (18,7 2) size 340x240 [border: (20px solid #000000)]22 layer at (466,20 0) size 100x10020 layer at (346,84) size 340x240 21 RenderBlock (positioned) {SPAN} at (18,76) size 340x240 [border: (20px solid #000000)] 22 layer at (466,204) size 100x100 23 23 RenderBlock (positioned) {DIV} at (120,120) size 100x100 [bgcolor=#008000] 24 layer at (566,20 0) size 100x10024 layer at (566,204) size 100x100 25 25 RenderBlock (positioned) {DIV} at (20,120) size 100x100 [bgcolor=#808000] 26 layer at (366,20 0) size 100x10026 layer at (366,204) size 100x100 27 27 RenderBlock (positioned) {DIV} at (220,120) size 100x100 [bgcolor=#808000] -
trunk/LayoutTests/platform/mac/fast/block/positioning/auto/vertical-rl/007-expected.checksum
r79930 r81992 1 e87b367e0b27a97a91a90a909cd4c811 1 82dd94e9007b777a3483812ce50ca137 -
trunk/LayoutTests/platform/mac/fast/block/positioning/fixed-positioning-scrollbar-bug-expected.txt
r63403 r81992 4 4 RenderBlock {HTML} at (0,0) size 785x600 5 5 RenderBody {BODY} at (8,8) size 769x584 6 RenderText {#text} at (0,0) size 36 7x187 text run at (0,0) width 36 7: "The purple box should stick to the bottom of the window."6 RenderText {#text} at (0,0) size 363x18 7 text run at (0,0) width 363: "The purple box should stick to the bottom of the window." 8 8 RenderText {#text} at (0,0) size 0x0 9 9 RenderText {#text} at (0,0) size 0x0 -
trunk/LayoutTests/platform/mac/fast/block/positioning/inline-block-relposition-expected.checksum
r78888 r81992 1 c4807d66cd55df1852fa44436d33f89e 1 4cf57e0047b8b75399c5142cc389d9e3 -
trunk/LayoutTests/platform/mac/fast/block/positioning/inline-block-relposition-expected.txt
r78888 r81992 8 8 RenderButton {BUTTON} at (0,2) size 100x18 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0) none (2px outset #C0C0C0)] 9 9 RenderBlock (anonymous) at (8,2) size 84x13 10 RenderText {#text} at (1 7,0) size 50x1311 text run at (1 7,0) width 50: "Click Me"10 RenderText {#text} at (19,0) size 46x13 11 text run at (19,0) width 46: "Click Me" 12 12 layer at (87,25) size 24x13 13 13 RenderBlock (positioned) {DIV} at (79,15) size 24x13 -
trunk/LayoutTests/platform/mac/fast/block/positioning/relative-overflow-block-expected.txt
r47440 r81992 6 6 RenderText {#text} at (0,0) size 762x36 7 7 text run at (0,0) width 762: "Document canvas should be big enough to fit both blue and red (relative positioned) rectangles (ie. have scrollbars if they" 8 text run at (0,18) width 1 31: "don't fit to the view)"8 text run at (0,18) width 127: "don't fit to the view)" 9 9 layer at (8,44) size 504x504 10 10 RenderBlock (positioned) {DIV} at (8,44) size 504x504 [border: (2px solid #0000FF)] -
trunk/LayoutTests/platform/mac/fast/clip/001-expected.txt
r25970 r81992 4 4 RenderBlock {HTML} at (0,0) size 800x34 5 5 RenderBody {BODY} at (8,8) size 784x18 6 RenderText {#text} at (0,0) size 5 41x186 RenderText {#text} at (0,0) size 537x18 7 7 text run at (0,0) width 304: "You should see a 100x100 green square below. " 8 text run at (304,0) width 23 7: "If you see any red, the test has failed."8 text run at (304,0) width 233: "If you see any red, the test has failed." 9 9 layer at (8,26) size 200x200 backgroundClip at (108,126) size 100x100 clip at (108,126) size 100x100 outlineClip at (108,126) size 100x100 10 10 RenderBlock (positioned) {DIV} at (8,26) size 200x200 [bgcolor=#008000] -
trunk/LayoutTests/platform/mac/fast/clip/004-expected.txt
r25970 r81992 9 9 text run at (541,0) width 212: "This test is checking to make sure" 10 10 text run at (0,18) width 148: "overflow is done using " 11 text run at (148,18) width 16 7: "a containing block model."11 text run at (148,18) width 163: "a containing block model." 12 12 RenderText {#text} at (0,0) size 0x0 13 13 layer at (8,44) size 100x100 scrollWidth 200 scrollHeight 400 -
trunk/LayoutTests/platform/mac/fast/clip/006-expected.txt
r25970 r81992 10 10 text run at (0,18) width 293: "checking to make sure overflow is done using " 11 11 text run at (293,18) width 478: "a containing block model, and that a fixed positioned element inside another" 12 text run at (0,36) width 3 33: "fixed positioned element is not considered overflow."12 text run at (0,36) width 329: "fixed positioned element is not considered overflow." 13 13 RenderText {#text} at (0,0) size 0x0 14 14 layer at (8,62) size 100x100 scrollWidth 200 scrollHeight 200 -
trunk/LayoutTests/platform/mac/fast/clip/007-expected.txt
r25970 r81992 10 10 text run at (0,18) width 293: "checking to make sure overflow is done using " 11 11 text run at (293,18) width 446: "a containing block model, and that a fixed positioned element inside an" 12 text run at (0,36) width 3 53: "absolute positioned element is not considered overflow."12 text run at (0,36) width 349: "absolute positioned element is not considered overflow." 13 13 RenderText {#text} at (0,0) size 0x0 14 14 layer at (8,62) size 100x100 -
trunk/LayoutTests/platform/mac/fast/clip/008-expected.txt
r73385 r81992 10 10 text run at (0,18) width 293: "checking to make sure overflow is done using " 11 11 text run at (293,18) width 446: "a containing block model, and that a fixed positioned element inside an" 12 text run at (0,36) width 3 53: "absolute positioned element is not considered overflow."12 text run at (0,36) width 349: "absolute positioned element is not considered overflow." 13 13 RenderText {#text} at (0,0) size 0x0 14 14 layer at (8,62) size 100x100 -
trunk/LayoutTests/platform/mac/fast/clip/009-expected.txt
r73385 r81992 8 8 text run at (304,0) width 237: "If you see any red, the test has failed. " 9 9 text run at (541,0) width 239: "This test is checking to make sure clip" 10 text run at (0,18) width 1 92: "is applying to all descendants."10 text run at (0,18) width 188: "is applying to all descendants." 11 11 RenderText {#text} at (0,0) size 0x0 12 12 layer at (8,44) size 100x100 -
trunk/LayoutTests/platform/mac/fast/clip/010-expected.txt
r73385 r81992 8 8 text run at (304,0) width 237: "If you see any red, the test has failed. " 9 9 text run at (541,0) width 239: "This test is checking to make sure clip" 10 text run at (0,18) width 1 92: "is applying to all descendants."10 text run at (0,18) width 188: "is applying to all descendants." 11 11 RenderText {#text} at (0,0) size 0x0 12 12 layer at (8,44) size 100x100 -
trunk/LayoutTests/platform/mac/fast/clip/011-expected.txt
r73385 r81992 8 8 text run at (304,0) width 237: "If you see any red, the test has failed. " 9 9 text run at (541,0) width 239: "This test is checking to make sure clip" 10 text run at (0,18) width 1 92: "is applying to all descendants."10 text run at (0,18) width 188: "is applying to all descendants." 11 11 RenderText {#text} at (0,0) size 0x0 12 12 layer at (8,44) size 100x100 -
trunk/LayoutTests/platform/mac/fast/clip/012-expected.txt
r73385 r81992 8 8 text run at (304,0) width 237: "If you see any red, the test has failed. " 9 9 text run at (541,0) width 239: "This test is checking to make sure clip" 10 text run at (0,18) width 1 92: "is applying to all descendants."10 text run at (0,18) width 188: "is applying to all descendants." 11 11 RenderText {#text} at (0,0) size 0x0 12 12 layer at (8,44) size 100x100 -
trunk/LayoutTests/platform/mac/fast/clip/013-expected.txt
r25970 r81992 8 8 text run at (304,0) width 237: "If you see any red, the test has failed. " 9 9 text run at (541,0) width 239: "This test is checking to make sure clip" 10 text run at (0,18) width 37 7: "applies to the element itself and starts from the border edge."10 text run at (0,18) width 373: "applies to the element itself and starts from the border edge." 11 11 RenderText {#text} at (0,0) size 0x0 12 12 layer at (8,44) size 120x120 backgroundClip at (18,54) size 100x100 clip at (18,54) size 100x100 outlineClip at (18,54) size 100x100 -
trunk/LayoutTests/platform/mac/fast/clip/014-expected.txt
r25970 r81992 10 10 text run at (0,18) width 617: "to make sure clip applies to the element itself, starts from the border edge, and clips out scrollbars. " 11 11 text run at (617,18) width 113: "The bottom of the" 12 text run at (0,36) width 2 52: "scrolling mechanism should be clipped."12 text run at (0,36) width 248: "scrolling mechanism should be clipped." 13 13 RenderText {#text} at (0,0) size 0x0 14 14 layer at (8,62) size 120x220 backgroundClip at (18,72) size 100x100 clip at (18,72) size 85x100 outlineClip at (18,72) size 100x100 scrollHeight 1000 -
trunk/LayoutTests/platform/mac/fast/clip/nestedTransparencyClip-expected.txt
r30635 r81992 12 12 layer at (8,62) size 784x18 13 13 RenderBlock {DIV} at (0,54) size 784x18 14 RenderText {#text} at (0,0) size 42x1815 text run at (0,0) width 42: "Peach"14 RenderText {#text} at (0,0) size 38x18 15 text run at (0,0) width 38: "Peach" 16 16 RenderText {#text} at (0,0) size 0x0 17 17 layer at (8,80) size 33x18 -
trunk/LayoutTests/platform/mac/fast/clip/outline-overflowClip-expected.txt
r63403 r81992 8 8 text run at (209,0) width 287: "It should not be clipped by the overflow rect. " 9 9 text run at (496,0) width 269: "The inner div has a green outline and a red" 10 text run at (0,18) width 4 9: "border."10 text run at (0,18) width 45: "border." 11 11 RenderText {#text} at (0,0) size 0x0 12 12 layer at (8,44) size 304x204 backgroundClip at (83,44) size 229x204 clip at (83,44) size 229x204 outlineClip at (83,44) size 229x204 13 13 RenderBlock (positioned) {DIV} at (8,44) size 304x204 [border: (2px solid #0000FF)] 14 RenderText {#text} at (2,2) size 103x1815 text run at (2,2) width 103: "text in outer div"14 RenderText {#text} at (2,2) size 99x18 15 text run at (2,2) width 99: "text in outer div" 16 16 RenderText {#text} at (0,0) size 0x0 17 17 layer at (60,64) size 105x24 backgroundClip at (83,64) size 82x24 clip at (83,67) size 79x18 outlineClip at (83,44) size 229x204 scrollWidth 100 -
trunk/LayoutTests/platform/mac/fast/forms/input-appearance-preventDefault-expected.txt
r63403 r81992 5 5 RenderBody {BODY} at (8,8) size 784x584 6 6 RenderBR {BR} at (0,0) size 0x18 7 RenderText {#text} at (0,18) size 666x18 8 text run at (0,18) width 666: "This tests that preventDefault called onmousedown will prevent a caret from being placed in the text field." 9 RenderText {#text} at (0,0) size 0x0 10 RenderText {#text} at (0,0) size 0x0 7 RenderText {#text} at (0,18) size 670x18 8 text run at (0,18) width 670: "This tests that preventDefault called onmousedown will prevent a caret from being placed in the text field. " 9 RenderText {#text} at (670,18) size 4x18 10 text run at (670,18) width 4: " " 11 RenderText {#text} at (674,18) size 4x18 12 text run at (674,18) width 4: " " 11 13 layer at (12,52) size 125x19 12 14 RenderTextControl {INPUT} at (12,52) size 125x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)] -
trunk/LayoutTests/platform/mac/fast/invalid/014-expected.txt
r25970 r81992 5 5 RenderBody {BODY} at (8,8) size 784x576 6 6 RenderBlock (anonymous) at (0,0) size 784x18 7 RenderText {#text} at (0,0) size 603x187 RenderText {#text} at (0,0) size 599x18 8 8 text run at (0,0) width 282: "Random tests of some bizarre combinations. " 9 text run at (282,0) width 3 21: "H2 should allow a form inside it, but p should not."9 text run at (282,0) width 317: "H2 should allow a form inside it, but p should not." 10 10 RenderText {#text} at (0,0) size 0x0 11 11 RenderBlock {FORM} at (0,18) size 784x22 -
trunk/LayoutTests/platform/mac/fast/layers/layer-visibility-expected.txt
r73385 r81992 51 51 RenderText {#text} at (0,0) size 107x36 52 52 text run at (0,0) width 107: "3 green box with" 53 text run at (0,18) width 61: "word ok:"53 text run at (0,18) width 57: "word ok:" 54 54 RenderText {#text} at (0,0) size 0x0 55 55 layer at (278,46) size 130x34 … … 62 62 RenderText {#text} at (0,0) size 107x36 63 63 text run at (0,0) width 107: "4 green box with" 64 text run at (0,18) width 61: "word ok:"64 text run at (0,18) width 57: "word ok:" 65 65 RenderText {#text} at (0,0) size 0x0 66 66 layer at (414,48) size 126x30 … … 72 72 RenderText {#text} at (0,0) size 107x36 73 73 text run at (0,0) width 107: "5 green box with" 74 text run at (0,18) width 61: "word ok:"74 text run at (0,18) width 57: "word ok:" 75 75 RenderText {#text} at (0,0) size 0x0 76 76 layer at (546,46) size 130x34 … … 84 84 RenderText {#text} at (0,0) size 107x36 85 85 text run at (0,0) width 107: "6 green box with" 86 text run at (0,18) width 61: "word ok:"86 text run at (0,18) width 57: "word ok:" 87 87 RenderText {#text} at (0,0) size 0x0 88 88 layer at (12,152) size 126x30 … … 95 95 RenderText {#text} at (0,0) size 107x36 96 96 text run at (0,0) width 107: "7 green box with" 97 text run at (0,18) width 61: "word ok:"97 text run at (0,18) width 57: "word ok:" 98 98 RenderText {#text} at (0,0) size 0x0 99 99 layer at (148,154) size 122x26 … … 105 105 RenderText {#text} at (0,0) size 122x36 106 106 text run at (0,0) width 122: "8 double green box" 107 text run at (0,18) width 93: "with word ok:"107 text run at (0,18) width 89: "with word ok:" 108 108 RenderText {#text} at (0,0) size 0x0 109 109 layer at (278,150) size 130x34 … … 117 117 RenderText {#text} at (0,0) size 107x36 118 118 text run at (0,0) width 107: "9 green box with" 119 text run at (0,18) width 61: "word ok:"119 text run at (0,18) width 57: "word ok:" 120 120 RenderText {#text} at (0,0) size 0x0 121 121 layer at (416,154) size 122x26 … … 125 125 layer at (546,114) size 130x18 126 126 RenderBlock (relative positioned) {DIV} at (2,2) size 130x18 127 RenderText {#text} at (0,0) size 91x18128 text run at (0,0) width 91: "10 green box:"127 RenderText {#text} at (0,0) size 87x18 128 text run at (0,0) width 87: "10 green box:" 129 129 RenderText {#text} at (0,0) size 0x0 130 130 layer at (548,134) size 126x30 … … 134 134 RenderText {#text} at (0,0) size 115x36 135 135 text run at (0,0) width 115: "11 green box with" 136 text run at (0,18) width 61: "word ok:"136 text run at (0,18) width 57: "word ok:" 137 137 RenderText {#text} at (0,0) size 0x0 138 138 layer at (10,254) size 130x34 … … 146 146 RenderText {#text} at (0,0) size 115x36 147 147 text run at (0,0) width 115: "12 green box with" 148 text run at (0,18) width 61: "word ok:"148 text run at (0,18) width 57: "word ok:" 149 149 RenderText {#text} at (0,0) size 0x0 150 150 layer at (144,254) size 130x34 … … 156 156 layer at (278,218) size 130x18 157 157 RenderBlock (relative positioned) {DIV} at (2,2) size 130x18 158 RenderText {#text} at (0,0) size 91x18159 text run at (0,0) width 91: "13 green box:"158 RenderText {#text} at (0,0) size 87x18 159 text run at (0,0) width 87: "13 green box:" 160 160 RenderText {#text} at (0,0) size 0x0 161 161 layer at (278,236) size 130x34 … … 169 169 RenderText {#text} at (0,0) size 115x36 170 170 text run at (0,0) width 115: "14 green box with" 171 text run at (0,18) width 61: "word ok:"171 text run at (0,18) width 57: "word ok:" 172 172 RenderText {#text} at (0,0) size 0x0 173 173 layer at (412,254) size 130x30 … … 180 180 RenderText {#text} at (0,0) size 115x36 181 181 text run at (0,0) width 115: "15 green box with" 182 text run at (0,18) width 61: "word ok:"182 text run at (0,18) width 57: "word ok:" 183 183 RenderText {#text} at (0,0) size 0x0 184 184 layer at (546,254) size 130x30 … … 190 190 RenderText {#text} at (0,0) size 115x36 191 191 text run at (0,0) width 115: "16 green box with" 192 text run at (0,18) width 61: "word ok:"192 text run at (0,18) width 57: "word ok:" 193 193 RenderText {#text} at (0,0) size 0x0 194 194 layer at (10,358) size 130x34 … … 205 205 RenderText {#text} at (0,0) size 115x36 206 206 text run at (0,0) width 115: "17 green box with" 207 text run at (0,18) width 61: "word ok:"207 text run at (0,18) width 57: "word ok:" 208 208 RenderText {#text} at (0,0) size 0x0 209 209 layer at (144,358) size 130x34 … … 220 220 RenderText {#text} at (0,0) size 115x36 221 221 text run at (0,0) width 115: "18 green box with" 222 text run at (0,18) width 61: "word ok:"222 text run at (0,18) width 57: "word ok:" 223 223 RenderText {#text} at (0,0) size 0x0 224 224 layer at (278,358) size 130x34 … … 235 235 RenderText {#text} at (0,0) size 115x36 236 236 text run at (0,0) width 115: "19 green box with" 237 text run at (0,18) width 61: "word ok:"237 text run at (0,18) width 57: "word ok:" 238 238 RenderText {#text} at (0,0) size 0x0 239 239 layer at (412,358) size 130x34 … … 249 249 layer at (546,322) size 130x18 250 250 RenderBlock (relative positioned) {DIV} at (2,2) size 130x18 251 RenderText {#text} at (0,0) size 91x18252 text run at (0,0) width 91: "20 green box:"251 RenderText {#text} at (0,0) size 87x18 252 text run at (0,0) width 87: "20 green box:" 253 253 RenderText {#text} at (0,0) size 0x0 254 254 layer at (546,340) size 130x34 … … 265 265 RenderText {#text} at (0,0) size 124x36 266 266 text run at (0,0) width 124: "21 two green boxes" 267 text run at (0,18) width 93: "with word ok:"267 text run at (0,18) width 89: "with word ok:" 268 268 RenderText {#text} at (0,0) size 0x0 269 269 layer at (10,462) size 130x34 … … 281 281 RenderText {#text} at (0,0) size 115x36 282 282 text run at (0,0) width 115: "22 green box with" 283 text run at (0,18) width 61: "word ok:"283 text run at (0,18) width 57: "word ok:" 284 284 RenderText {#text} at (0,0) size 0x0 285 285 layer at (146,464) size 126x30 … … 291 291 RenderText {#text} at (0,0) size 115x36 292 292 text run at (0,0) width 115: "23 green box with" 293 text run at (0,18) width 61: "word ok:"293 text run at (0,18) width 57: "word ok:" 294 294 RenderText {#text} at (0,0) size 0x0 295 295 layer at (278,462) size 130x34 -
trunk/LayoutTests/platform/mac/fast/repaint/layout-state-scrolloffset-expected.txt
r63403 r81992 4 4 RenderBlock {HTML} at (0,0) size 800x34 5 5 RenderBody {BODY} at (8,8) size 784x18 6 RenderText {#text} at (0,0) size 44 8x187 text run at (0,0) width 44 8: "You should see the text 'after' in the inner box with no mangled pixels."6 RenderText {#text} at (0,0) size 444x18 7 text run at (0,0) width 444: "You should see the text 'after' in the inner box with no mangled pixels." 8 8 RenderText {#text} at (0,0) size 0x0 9 9 RenderText {#text} at (0,0) size 0x0 -
trunk/LayoutTests/platform/mac/fast/repaint/layout-state-scrolloffset2-expected.txt
r63403 r81992 4 4 RenderBlock {HTML} at (0,0) size 800x34 5 5 RenderBody {BODY} at (8,8) size 784x18 6 RenderText {#text} at (0,0) size 4 20x187 text run at (0,0) width 4 20: "You should see the text 'after' in the inner box, no mangled pixels."6 RenderText {#text} at (0,0) size 416x18 7 text run at (0,0) width 416: "You should see the text 'after' in the inner box, no mangled pixels." 8 8 RenderText {#text} at (0,0) size 0x0 9 9 RenderText {#text} at (0,0) size 0x0 -
trunk/LayoutTests/platform/mac/fast/repaint/layout-state-scrolloffset3-expected.txt
r63403 r81992 4 4 RenderBlock {HTML} at (0,0) size 800x34 5 5 RenderBody {BODY} at (8,8) size 784x18 6 RenderText {#text} at (0,0) size 44 8x187 text run at (0,0) width 44 8: "You should see the text 'after' in the inner box with no mangled pixels."6 RenderText {#text} at (0,0) size 444x18 7 text run at (0,0) width 444: "You should see the text 'after' in the inner box with no mangled pixels." 8 8 RenderText {#text} at (0,0) size 0x0 9 9 RenderText {#text} at (0,0) size 0x0 -
trunk/LayoutTests/platform/mac/tables/mozilla/bugs/bug51140-expected.txt
r32872 r81992 13 13 RenderText {#text} at (31,0) size 72x18 14 14 text run at (31,0) width 72: "closepopup" 15 RenderText {#text} at (103,0) size 4x18 16 text run at (103,0) width 4: " " 15 RenderText {#text} at (0,0) size 0x0 17 16 RenderTable {TABLE} at (0,18) size 40x28 [border: (1px outset #808080)] 18 17 RenderTableSection {TBODY} at (1,1) size 38x26 -
trunk/Source/WebCore/ChangeLog
r81991 r81992 1 2011-03-24 David Hyatt <hyatt@apple.com> 2 3 Reviewed by Dan Bernstein. 4 5 https://bugs.webkit.org/show_bug.cgi?id=56909 6 7 Add a simplified normal flow layout path optimization for overflow recomputation 8 and for positioned objects inside relative positioned containers. 9 10 Currently there is an optimized code path for positioned objects, but as soon as 11 we encounter a normal flow object in the containing block chain, we lose the 12 optimization. 13 14 This patch adds a new type of style difference called SimplifiedLayout that is 15 returned when only overflow needs to be recomputed. Whenever a transform changes, 16 this is the hint returned now instead of a full layout. 17 18 In addition, when positioned objects need layout and start marking up the 19 containing block chain, we now propagate the fact that the layout is simplified 20 all the way up to the root, even when we encounter normal flow containing 21 blocks. 22 23 The layoutOnlyPositionedObjects function has been renamed to simplifiedLayout() 24 and is now used for all of these cases (in addition to what it handled before). 25 26 The simplified layout optimization (even in ToT) did not work correctly when 27 static distances needed to be recomputed. In order to make static distance 28 computations work with simplified layout, positioned objects now always compute 29 their static offsets, even if they explicitly specify left/top. That way normal 30 flow layout never has to re-run when the positioned object moves. This makes 31 movement of a positioned object along a single non-auto axis much faster when the 32 other axis is auto. Because this code kicked in more often for absolutely positioned 33 objects whose original display was inline, I went ahead and fixed the trailing space 34 issue with those objects. This causes a bunch of layout tests to progress. 35 36 Added fast/block/positioning/static-inline-position-dynamic.html and trailing-space-test.html. 37 38 * rendering/RenderBlock.cpp: 39 (WebCore::RenderBlock::layoutBlock): 40 (WebCore::RenderBlock::adjustPositionedBlock): 41 (WebCore::RenderBlock::simplifiedNormalFlowLayout): 42 (WebCore::RenderBlock::simplifiedLayout): 43 * rendering/RenderBlock.h: 44 * rendering/RenderBlockLineLayout.cpp: 45 (WebCore::setStaticPositions): 46 (WebCore::RenderBlock::findNextLineBreak): 47 * rendering/RenderBox.cpp: 48 (WebCore::RenderBox::styleDidChange): 49 (WebCore::RenderBox::positionLineBox): 50 * rendering/RenderBoxModelObject.cpp: 51 (WebCore::RenderBoxModelObject::styleWillChange): 52 * rendering/RenderFlexibleBox.cpp: 53 (WebCore::RenderFlexibleBox::layoutBlock): 54 (WebCore::RenderFlexibleBox::layoutHorizontalBox): 55 (WebCore::RenderFlexibleBox::layoutVerticalBox): 56 * rendering/RenderObject.cpp: 57 (WebCore::RenderObject::RenderObject): 58 (WebCore::RenderObject::adjustStyleDifference): 59 (WebCore::RenderObject::setStyle): 60 (WebCore::RenderObject::styleDidChange): 61 * rendering/RenderObject.h: 62 (WebCore::RenderObject::needsLayout): 63 (WebCore::RenderObject::needsPositionedMovementLayoutOnly): 64 (WebCore::RenderObject::needsSimplifiedNormalFlowLayout): 65 (WebCore::RenderObject::setNeedsLayout): 66 (WebCore::RenderObject::setChildNeedsLayout): 67 (WebCore::RenderObject::setNeedsSimplifiedNormalFlowLayout): 68 (WebCore::RenderObject::markContainingBlocksForLayout): 69 * rendering/RenderTable.cpp: 70 (WebCore::RenderTable::layout): 71 * rendering/style/RenderStyle.cpp: 72 (WebCore::RenderStyle::diff): 73 * rendering/style/RenderStyleConstants.h: 74 * rendering/svg/RenderSVGText.cpp: 75 (WebCore::RenderSVGText::layout): 76 1 77 2011-03-25 Martin Robinson <mrobinson@igalia.com> 2 78 -
trunk/Source/WebCore/rendering/RenderBlock.cpp
r81965 r81992 35 35 #include "HTMLNames.h" 36 36 #include "HitTestResult.h" 37 #include "InlineIterator.h" 37 38 #include "InlineTextBox.h" 38 39 #include "PaintInfo.h" … … 1134 1135 return; // cause us to come in here. Just bail. 1135 1136 1136 if (!relayoutChildren && layoutOnlyPositionedObjects())1137 if (!relayoutChildren && simplifiedLayout()) 1137 1138 return; 1138 1139 … … 1421 1422 { 1422 1423 bool isHorizontal = isHorizontalWritingMode(); 1423 bool hasStaticInlinePosition = child->style()->hasStaticInlinePosition(isHorizontal);1424 1424 bool hasStaticBlockPosition = child->style()->hasStaticBlockPosition(isHorizontal); 1425 1425 RenderLayer* childLayer = child->layer(); 1426 1426 1427 if (hasStaticInlinePosition) 1428 childLayer->setStaticInlinePosition(borderAndPaddingStart()); 1429 1430 if (hasStaticBlockPosition) { 1431 int logicalTop = logicalHeight(); 1432 if (!marginInfo.canCollapseWithMarginBefore()) { 1433 child->computeBlockDirectionMargins(this); 1434 int marginBefore = marginBeforeForChild(child); 1435 int collapsedBeforePos = marginInfo.positiveMargin(); 1436 int collapsedBeforeNeg = marginInfo.negativeMargin(); 1437 if (marginBefore > 0) { 1438 if (marginBefore > collapsedBeforePos) 1439 collapsedBeforePos = marginBefore; 1440 } else { 1441 if (-marginBefore > collapsedBeforeNeg) 1442 collapsedBeforeNeg = -marginBefore; 1443 } 1444 logicalTop += (collapsedBeforePos - collapsedBeforeNeg) - marginBefore; 1445 } 1446 if (childLayer->staticBlockPosition() != logicalTop) { 1447 childLayer->setStaticBlockPosition(logicalTop); 1427 childLayer->setStaticInlinePosition(borderAndPaddingStart()); 1428 1429 int logicalTop = logicalHeight(); 1430 if (!marginInfo.canCollapseWithMarginBefore()) { 1431 child->computeBlockDirectionMargins(this); 1432 int marginBefore = marginBeforeForChild(child); 1433 int collapsedBeforePos = marginInfo.positiveMargin(); 1434 int collapsedBeforeNeg = marginInfo.negativeMargin(); 1435 if (marginBefore > 0) { 1436 if (marginBefore > collapsedBeforePos) 1437 collapsedBeforePos = marginBefore; 1438 } else { 1439 if (-marginBefore > collapsedBeforeNeg) 1440 collapsedBeforeNeg = -marginBefore; 1441 } 1442 logicalTop += (collapsedBeforePos - collapsedBeforeNeg) - marginBefore; 1443 } 1444 if (childLayer->staticBlockPosition() != logicalTop) { 1445 childLayer->setStaticBlockPosition(logicalTop); 1446 if (hasStaticBlockPosition) 1448 1447 child->setChildNeedsLayout(true, false); 1449 }1450 1448 } 1451 1449 } … … 2078 2076 } 2079 2077 2080 bool RenderBlock::layoutOnlyPositionedObjects() 2081 { 2082 if (!posChildNeedsLayout() || normalChildNeedsLayout() || selfNeedsLayout()) 2078 void RenderBlock::simplifiedNormalFlowLayout() 2079 { 2080 if (childrenInline()) { 2081 ListHashSet<RootInlineBox*> lineBoxes; 2082 bool endOfInline = false; 2083 RenderObject* o = bidiFirst(this, 0, false); 2084 while (o) { 2085 if (!o->isPositioned() && (o->isReplaced() || o->isFloating())) { 2086 o->layoutIfNeeded(); 2087 if (toRenderBox(o)->inlineBoxWrapper()) { 2088 RootInlineBox* box = toRenderBox(o)->inlineBoxWrapper()->root(); 2089 lineBoxes.add(box); 2090 } 2091 } else if (o->isText() || (o->isRenderInline() && !endOfInline)) 2092 o->setNeedsLayout(false); 2093 o = bidiNext(this, o, 0, false, &endOfInline); 2094 } 2095 2096 // FIXME: Glyph overflow will get lost in this case, but not really a big deal. 2097 GlyphOverflowAndFallbackFontsMap textBoxDataMap; 2098 for (ListHashSet<RootInlineBox*>::const_iterator it = lineBoxes.begin(); it != lineBoxes.end(); ++it) { 2099 RootInlineBox* box = *it; 2100 box->computeOverflow(box->lineTop(), box->lineBottom(), document()->inNoQuirksMode(), textBoxDataMap); 2101 } 2102 } else { 2103 for (RenderBox* box = firstChildBox(); box; box = box->nextSiblingBox()) { 2104 if (!box->isPositioned()) 2105 box->layoutIfNeeded(); 2106 } 2107 } 2108 } 2109 2110 bool RenderBlock::simplifiedLayout() 2111 { 2112 if ((!posChildNeedsLayout() && !needsSimplifiedNormalFlowLayout()) || normalChildNeedsLayout() || selfNeedsLayout()) 2083 2113 return false; 2084 2114 2085 2115 LayoutStateMaintainer statePusher(view(), this, IntSize(x(), y()), hasColumns() || hasTransform() || hasReflection() || style()->isFlippedBlocksWritingMode()); 2086 2116 2087 2117 if (needsPositionedMovementLayout()) { 2088 2118 tryLayoutDoingPositionedMovementOnly(); … … 2091 2121 } 2092 2122 2093 // All we have to is lay out our positioned objects. 2094 layoutPositionedObjects(false); 2123 // Lay out positioned descendants or objects that just need to recompute overflow. 2124 if (needsSimplifiedNormalFlowLayout()) 2125 simplifiedNormalFlowLayout(); 2126 2127 // Lay out our positioned objects if our positioned child bit is set. 2128 if (posChildNeedsLayout()) 2129 layoutPositionedObjects(false); 2095 2130 2096 2131 // Recompute our overflow information. -
trunk/Source/WebCore/rendering/RenderBlock.h
r81816 r81992 298 298 299 299 virtual bool hasLineIfEmpty() const; 300 bool layoutOnlyPositionedObjects(); 300 301 bool simplifiedLayout(); 302 void simplifiedNormalFlowLayout(); 301 303 302 304 void computeOverflow(int oldClientAfterEdge, bool recomputeFloats = false); … … 494 496 void fitBelowFloats(float widthToFit, bool firstLine, float& availableWidth); 495 497 typedef std::pair<RenderText*, LazyLineBreakIterator> LineBreakIteratorInfo; 496 InlineIterator findNextLineBreak(InlineBidiResolver&, bool firstLine, bool& isLineEmpty, LineBreakIteratorInfo&, bool& previousLineBrokeCleanly, bool& hyphenated, EClear*, FloatingObject* lastFloatFromPreviousLine); 498 InlineIterator findNextLineBreak(InlineBidiResolver&, bool firstLine, bool& isLineEmpty, LineBreakIteratorInfo&, bool& previousLineBrokeCleanly, bool& hyphenated, 499 EClear*, FloatingObject* lastFloatFromPreviousLine, Vector<RenderBox*>& positionedObjects); 497 500 RootInlineBox* constructLine(unsigned runCount, BidiRun* firstRun, BidiRun* lastRun, bool firstLine, bool lastLine, RenderObject* endObject); 498 501 InlineFlowBox* createLineBoxes(RenderObject*, bool firstLine); -
trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp
r81965 r81992 552 552 } 553 553 554 555 static void setStaticPositions(RenderBlock* block, RenderBox* child) 556 { 557 // FIXME: The math here is actually not really right. It's a best-guess approximation that 558 // will work for the common cases 559 RenderObject* containerBlock = child->container(); 560 int blockHeight = block->logicalHeight(); 561 if (containerBlock->isRenderInline()) { 562 // A relative positioned inline encloses us. In this case, we also have to determine our 563 // position as though we were an inline. Set |staticInlinePosition| and |staticBlockPosition| on the relative positioned 564 // inline so that we can obtain the value later. 565 toRenderInline(containerBlock)->layer()->setStaticInlinePosition(block->startOffsetForLine(blockHeight, false)); 566 toRenderInline(containerBlock)->layer()->setStaticBlockPosition(blockHeight); 567 } 568 569 if (child->style()->isOriginalDisplayInlineType()) 570 child->layer()->setStaticInlinePosition(block->startOffsetForLine(blockHeight, false)); 571 else 572 child->layer()->setStaticInlinePosition(block->borderAndPaddingStart()); 573 child->layer()->setStaticBlockPosition(blockHeight); 574 } 575 554 576 void RenderBlock::layoutInlineChildren(bool relayoutChildren, int& repaintLogicalTop, int& repaintLogicalBottom) 555 577 { … … 703 725 EClear clear = CNONE; 704 726 bool hyphenated; 727 Vector<RenderBox*> positionedObjects; 705 728 706 729 InlineIterator oldEnd = end; 707 730 FloatingObject* lastFloatFromPreviousLine = (m_floatingObjects && !m_floatingObjects->set().isEmpty()) ? m_floatingObjects->set().last() : 0; 708 end = findNextLineBreak(resolver, firstLine, isLineEmpty, lineBreakIteratorInfo, previousLineBrokeCleanly, hyphenated, &clear, lastFloatFromPreviousLine );731 end = findNextLineBreak(resolver, firstLine, isLineEmpty, lineBreakIteratorInfo, previousLineBrokeCleanly, hyphenated, &clear, lastFloatFromPreviousLine, positionedObjects); 709 732 if (resolver.position().atEnd()) { 710 733 resolver.deleteRuns(); … … 854 877 } 855 878 879 for (size_t i = 0; i < positionedObjects.size(); ++i) 880 setStaticPositions(this, positionedObjects[i]); 881 856 882 firstLine = false; 857 883 newLine(clear); … … 1327 1353 } 1328 1354 1329 static void setStaticPositions(RenderBlock* block, RenderBox* child)1330 {1331 // FIXME: The math here is actually not really right. It's a best-guess approximation that1332 // will work for the common cases1333 RenderObject* containerBlock = child->container();1334 if (containerBlock->isRenderInline()) {1335 // A relative positioned inline encloses us. In this case, we also have to determine our1336 // position as though we were an inline. Set |staticInlinePosition| and |staticBlockPosition| on the relative positioned1337 // inline so that we can obtain the value later.1338 toRenderInline(containerBlock)->layer()->setStaticInlinePosition(block->startOffsetForLine(block->logicalHeight(), false));1339 toRenderInline(containerBlock)->layer()->setStaticBlockPosition(block->logicalHeight());1340 }1341 1342 bool isHorizontal = block->isHorizontalWritingMode();1343 bool hasStaticInlinePosition = child->style()->hasStaticInlinePosition(isHorizontal);1344 bool hasStaticBlockPosition = child->style()->hasStaticBlockPosition(isHorizontal);1345 1346 if (hasStaticInlinePosition) {1347 if (child->style()->isOriginalDisplayInlineType())1348 child->layer()->setStaticInlinePosition(block->startOffsetForLine(block->logicalHeight(), false));1349 else1350 child->layer()->setStaticInlinePosition(block->borderAndPaddingStart());1351 }1352 1353 if (hasStaticBlockPosition)1354 child->layer()->setStaticBlockPosition(block->logicalHeight());1355 }1356 1357 1355 // FIXME: The entire concept of the skipTrailingWhitespace function is flawed, since we really need to be building 1358 1356 // line boxes even for containers that may ultimately collapse away. Otherwise we'll never get positioned … … 1483 1481 1484 1482 InlineIterator RenderBlock::findNextLineBreak(InlineBidiResolver& resolver, bool firstLine, bool& isLineEmpty, LineBreakIteratorInfo& lineBreakIteratorInfo, bool& previousLineBrokeCleanly, 1485 bool& hyphenated, EClear* clear, FloatingObject* lastFloatFromPreviousLine )1483 bool& hyphenated, EClear* clear, FloatingObject* lastFloatFromPreviousLine, Vector<RenderBox*>& positionedBoxes) 1486 1484 { 1487 1485 ASSERT(resolver.position().block == this); … … 1514 1512 bool currentCharacterIsWS = false; 1515 1513 RenderObject* trailingSpaceObject = 0; 1514 Vector<RenderBox*, 4> trailingPositionedBoxes; 1516 1515 1517 1516 InlineIterator lBreak = resolver.position(); … … 1598 1597 RenderBox* box = toRenderBox(o); 1599 1598 bool isInlineType = box->style()->isOriginalDisplayInlineType(); 1600 bool needToSetStaticInlinePosition = box->style()->hasStaticInlinePosition(isHorizontalWritingMode()); 1601 if (needToSetStaticInlinePosition && !isInlineType) { 1599 if (!isInlineType) 1602 1600 box->layer()->setStaticInlinePosition(borderAndPaddingStart()); 1603 needToSetStaticInlinePosition = false; 1604 } 1605 1606 // If our original display was an INLINE type, then we can go ahead 1607 // and determine our static y position now. 1608 bool needToSetStaticBlockPosition = box->style()->hasStaticBlockPosition(isHorizontalWritingMode()); 1609 if (needToSetStaticBlockPosition && isInlineType) { 1601 else { 1602 // If our original display was an INLINE type, then we can go ahead 1603 // and determine our static y position now. 1610 1604 box->layer()->setStaticBlockPosition(logicalHeight()); 1611 needToSetStaticBlockPosition = false;1612 1605 } 1613 1606 1614 bool needToCreateLineBox = needToSetStaticInlinePosition || needToSetStaticBlockPosition;1615 RenderObject* c = o->container();1616 if (c->isRenderInline() && (!needToSetStaticInlinePosition || !needToSetStaticBlockPosition))1617 needToCreateLineBox = true;1618 1619 1607 // If we're ignoring spaces, we have to stop and include this object and 1620 1608 // then start ignoring spaces again. 1621 if (needToCreateLineBox) { 1622 trailingSpaceObject = 0; 1609 if (isInlineType || o->container()->isRenderInline()) { 1623 1610 ignoreStart.obj = o; 1624 1611 ignoreStart.pos = 0; … … 1627 1614 addMidpoint(lineMidpointState, ignoreStart); // Start ignoring again. 1628 1615 } 1629 1630 } 1616 if (trailingSpaceObject) 1617 trailingPositionedBoxes.append(box); 1618 } else 1619 positionedBoxes.append(box); 1631 1620 } 1632 1621 } else if (o->isRenderInline()) { … … 1644 1633 if (ignoringSpaces) { 1645 1634 trailingSpaceObject = 0; 1635 trailingPositionedBoxes.clear(); 1646 1636 addMidpoint(lineMidpointState, InlineIterator(0, o, 0)); // Stop ignoring spaces. 1647 1637 addMidpoint(lineMidpointState, InlineIterator(0, o, 0)); // Start ignoring again. … … 1678 1668 currentCharacterIsWS = false; 1679 1669 trailingSpaceObject = 0; 1670 trailingPositionedBoxes.clear(); 1680 1671 1681 1672 // Optimize for a common case. If we can't find whitespace after the list … … 1947 1938 if (collapseWhiteSpace && currentCharacterIsSpace && !ignoringSpaces) 1948 1939 trailingSpaceObject = o; 1949 else if (!o->style()->collapseWhiteSpace() || !currentCharacterIsSpace) 1940 else if (!o->style()->collapseWhiteSpace() || !currentCharacterIsSpace) { 1950 1941 trailingSpaceObject = 0; 1942 trailingPositionedBoxes.clear(); 1943 } 1951 1944 1952 1945 pos++; … … 2012 2005 if (checkForBreak && (w + tmpW > width)) { 2013 2006 // if we have floats, try to get below them. 2014 if (currentCharacterIsSpace && !ignoringSpaces && o->style()->collapseWhiteSpace()) 2007 if (currentCharacterIsSpace && !ignoringSpaces && o->style()->collapseWhiteSpace()) { 2015 2008 trailingSpaceObject = 0; 2009 trailingPositionedBoxes.clear(); 2010 } 2016 2011 2017 2012 if (w) … … 2093 2088 if (lineMidpointState.numMidpoints % 2) { 2094 2089 InlineIterator* midpoints = lineMidpointState.midpoints.data(); 2095 midpoints[lineMidpointState.numMidpoints - 1].pos--; 2096 } 2097 //else if (lBreak.pos > 0) 2098 // lBreak.pos--; 2099 else if (lBreak.obj == 0 && trailingSpaceObject->isText()) { 2090 midpoints[lineMidpointState.numMidpoints - trailingPositionedBoxes.size() * 2 - 1].pos--; 2091 } else if (!lBreak.obj && trailingSpaceObject->isText()) { 2100 2092 // Add a new end midpoint that stops right at the very end. 2101 2093 RenderText* text = toRenderText(trailingSpaceObject); … … 2104 2096 InlineIterator endMid(0, trailingSpaceObject, pos); 2105 2097 addMidpoint(lineMidpointState, endMid); 2098 for (size_t i = 0; i < trailingPositionedBoxes.size(); ++i) { 2099 ignoreStart.obj = trailingPositionedBoxes[i]; 2100 ignoreStart.pos = 0; 2101 addMidpoint(lineMidpointState, ignoreStart); // Stop ignoring spaces. 2102 addMidpoint(lineMidpointState, ignoreStart); // Start ignoring again. 2103 } 2106 2104 } 2107 2105 } -
trunk/Source/WebCore/rendering/RenderBox.cpp
r81965 r81992 289 289 RenderBoxModelObject::styleDidChange(diff, oldStyle); 290 290 291 if (needsLayout() && oldStyle && (oldStyle->logicalHeight().isPercent() || oldStyle->logicalMinHeight().isPercent() || oldStyle->logicalMaxHeight().isPercent())) 292 RenderBlock::removePercentHeightDescendant(this); 291 if (needsLayout() && oldStyle) { 292 if (oldStyle && (oldStyle->logicalHeight().isPercent() || oldStyle->logicalMinHeight().isPercent() || oldStyle->logicalMaxHeight().isPercent())) 293 RenderBlock::removePercentHeightDescendant(this); 294 295 // Normally we can do optimized positioning layout for absolute/fixed positioned objects. There is one special case, however, which is 296 // when the positioned object's margin-before is changed. In this case the parent has to get a layout in order to run margin collapsing 297 // to determine the new static position. 298 if (isPositioned() && style()->hasStaticBlockPosition(isHorizontalWritingMode()) && oldStyle->marginBefore() != style()->marginBefore() 299 && parent() && !parent()->normalChildNeedsLayout()) 300 parent()->setChildNeedsLayout(true); 301 } 293 302 294 303 // If our zoom factor changes and we have a defined scrollLeft/Top, we need to adjust that value into the … … 1305 1314 // Cache the x position only if we were an INLINE type originally. 1306 1315 bool wasInline = style()->isOriginalDisplayInlineType(); 1307 if (wasInline && style()->hasStaticInlinePosition(box->isHorizontal())) {1316 if (wasInline) { 1308 1317 // The value is cached in the xPos of the box. We only need this value if 1309 1318 // our object was inline originally, since otherwise it would have ended up underneath 1310 1319 // the inlines. 1311 1320 layer()->setStaticInlinePosition(lroundf(box->logicalLeft())); 1312 setChildNeedsLayout(true, false); // Just go ahead and mark the positioned object as needing layout, so it will update its position properly. 1313 } else if (!wasInline && style()->hasStaticBlockPosition(box->isHorizontal())) { 1321 if (style()->hasStaticInlinePosition(box->isHorizontal())) 1322 setChildNeedsLayout(true, false); // Just go ahead and mark the positioned object as needing layout, so it will update its position properly. 1323 } else { 1314 1324 // Our object was a block originally, so we make our normal flow position be 1315 1325 // just below the line box (as though all the inlines that came before us got … … 1317 1327 // in flow). This value was cached in the y() of the box. 1318 1328 layer()->setStaticBlockPosition(box->logicalTop()); 1319 setChildNeedsLayout(true, false); // Just go ahead and mark the positioned object as needing layout, so it will update its position properly. 1329 if (style()->hasStaticBlockPosition(box->isHorizontal())) 1330 setChildNeedsLayout(true, false); // Just go ahead and mark the positioned object as needing layout, so it will update its position properly. 1320 1331 } 1321 1332 -
trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp
r81816 r81992 304 304 } 305 305 306 if (diff == StyleDifferenceLayout ) {306 if (diff == StyleDifferenceLayout || diff == StyleDifferenceSimplifiedLayout) { 307 307 // When a layout hint happens, we go ahead and do a repaint of the layer, since the layer could 308 308 // end up being destroyed. -
trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp
r81816 r81992 210 210 ASSERT(needsLayout()); 211 211 212 if (!relayoutChildren && layoutOnlyPositionedObjects())212 if (!relayoutChildren && simplifiedLayout()) 213 213 return; 214 214 … … 414 414 child->containingBlock()->insertPositionedObject(child); 415 415 RenderLayer* childLayer = child->layer(); 416 if (child->style()->hasStaticInlinePosition(style()->isHorizontalWritingMode())) 417 childLayer->setStaticInlinePosition(xPos); 418 if (child->style()->hasStaticBlockPosition(style()->isHorizontalWritingMode())) { 419 if (childLayer->staticBlockPosition() != yPos) { 420 childLayer->setStaticBlockPosition(yPos); 416 childLayer->setStaticInlinePosition(xPos); 417 if (childLayer->staticBlockPosition() != yPos) { 418 childLayer->setStaticBlockPosition(yPos); 419 if (child->style()->hasStaticBlockPosition(style()->isHorizontalWritingMode())) 421 420 child->setChildNeedsLayout(true, false); 422 }423 421 } 424 422 child = iterator.next(); … … 677 675 child->containingBlock()->insertPositionedObject(child); 678 676 RenderLayer* childLayer = child->layer(); 679 if (child->style()->hasStaticInlinePosition(style()->isHorizontalWritingMode())) { 680 if (style()->isLeftToRightDirection()) 681 childLayer->setStaticInlinePosition(borderLeft() + paddingLeft()); 682 else 683 childLayer->setStaticInlinePosition(borderRight() + paddingRight()); 684 } 685 if (child->style()->hasStaticBlockPosition(style()->isHorizontalWritingMode())) { 686 if (childLayer->staticBlockPosition() != height()) { 687 childLayer->setStaticBlockPosition(height()); 677 childLayer->setStaticInlinePosition(borderStart() + paddingStart()); 678 if (childLayer->staticBlockPosition() != height()) { 679 childLayer->setStaticBlockPosition(height()); 680 if (child->style()->hasStaticBlockPosition(style()->isHorizontalWritingMode())) 688 681 child->setChildNeedsLayout(true, false); 689 }690 682 } 691 683 child = iterator.next(); -
trunk/Source/WebCore/rendering/RenderObject.cpp
r81965 r81992 192 192 , m_normalChildNeedsLayout(false) 193 193 , m_posChildNeedsLayout(false) 194 , m_needsSimplifiedNormalFlowLayout(false) 194 195 , m_preferredLogicalWidthsDirty(false) 195 196 , m_floating(false) … … 1687 1688 // hence the !isText() check. 1688 1689 // FIXME: when transforms are taken into account for overflow, we will need to do a layout. 1689 if (!isText() && (!hasLayer() || !toRenderBoxModelObject(this)->layer()->isComposited())) 1690 diff = StyleDifferenceLayout; 1691 else if (diff < StyleDifferenceRecompositeLayer) 1690 if (!isText() && (!hasLayer() || !toRenderBoxModelObject(this)->layer()->isComposited())) { 1691 if (!hasLayer()) 1692 diff = StyleDifferenceLayout; // FIXME: Do this for now since SimplifiedLayout cannot handle updating floating objects lists. 1693 else if (diff < StyleDifferenceSimplifiedLayout) 1694 diff = StyleDifferenceSimplifiedLayout; 1695 } else if (diff < StyleDifferenceRecompositeLayer) 1692 1696 diff = StyleDifferenceRecompositeLayer; 1693 1697 } … … 1768 1772 else if (updatedDiff == StyleDifferenceLayoutPositionedMovementOnly) 1769 1773 setNeedsPositionedMovementLayout(); 1774 else if (updatedDiff == StyleDifferenceSimplifiedLayout) 1775 setNeedsSimplifiedNormalFlowLayout(); 1770 1776 } 1771 1777 … … 1881 1887 return; 1882 1888 1883 if (diff == StyleDifferenceLayout ) {1889 if (diff == StyleDifferenceLayout || diff == StyleDifferenceSimplifiedLayout) { 1884 1890 RenderCounter::rendererStyleChanged(this, oldStyle, m_style.get()); 1885 1891 … … 1892 1898 markContainingBlocksForLayout(); 1893 1899 1894 setNeedsLayoutAndPrefWidthsRecalc(); 1900 if (diff == StyleDifferenceLayout) 1901 setNeedsLayoutAndPrefWidthsRecalc(); 1902 else 1903 setNeedsSimplifiedNormalFlowLayout(); 1895 1904 } else if (diff == StyleDifferenceLayoutPositionedMovementOnly) 1896 1905 setNeedsPositionedMovementLayout(); -
trunk/Source/WebCore/rendering/RenderObject.h
r81816 r81992 416 416 bool mustRepaintBackgroundOrBorder() const; 417 417 bool hasBackground() const { return style()->hasBackground(); } 418 bool needsLayout() const { return m_needsLayout || m_normalChildNeedsLayout || m_posChildNeedsLayout || m_needs PositionedMovementLayout; }418 bool needsLayout() const { return m_needsLayout || m_normalChildNeedsLayout || m_posChildNeedsLayout || m_needsSimplifiedNormalFlowLayout || m_needsPositionedMovementLayout; } 419 419 bool selfNeedsLayout() const { return m_needsLayout; } 420 420 bool needsPositionedMovementLayout() const { return m_needsPositionedMovementLayout; } 421 bool needsPositionedMovementLayoutOnly() const { return m_needsPositionedMovementLayout && !m_needsLayout && !m_normalChildNeedsLayout && !m_posChildNeedsLayout ; }421 bool needsPositionedMovementLayoutOnly() const { return m_needsPositionedMovementLayout && !m_needsLayout && !m_normalChildNeedsLayout && !m_posChildNeedsLayout && !m_needsSimplifiedNormalFlowLayout; } 422 422 bool posChildNeedsLayout() const { return m_posChildNeedsLayout; } 423 bool needsSimplifiedNormalFlowLayout() const { return m_needsSimplifiedNormalFlowLayout; } 423 424 bool normalChildNeedsLayout() const { return m_normalChildNeedsLayout; } 424 425 … … 489 490 void setChildNeedsLayout(bool b, bool markParents = true); 490 491 void setNeedsPositionedMovementLayout(); 492 void setNeedsSimplifiedNormalFlowLayout(); 491 493 void setPreferredLogicalWidthsDirty(bool, bool markParents = true); 492 494 void invalidateContainerPreferredLogicalWidths(); … … 847 849 bool m_normalChildNeedsLayout : 1; 848 850 bool m_posChildNeedsLayout : 1; 851 bool m_needsSimplifiedNormalFlowLayout : 1; 849 852 bool m_preferredLogicalWidthsDirty : 1; 850 853 bool m_floating : 1; … … 932 935 m_everHadLayout = true; 933 936 m_posChildNeedsLayout = false; 937 m_needsSimplifiedNormalFlowLayout = false; 934 938 m_normalChildNeedsLayout = false; 935 939 m_needsPositionedMovementLayout = false; … … 947 951 } else { 948 952 m_posChildNeedsLayout = false; 953 m_needsSimplifiedNormalFlowLayout = false; 949 954 m_normalChildNeedsLayout = false; 950 955 m_needsPositionedMovementLayout = false; … … 956 961 bool alreadyNeededLayout = needsLayout(); 957 962 m_needsPositionedMovementLayout = true; 963 if (!alreadyNeededLayout) { 964 markContainingBlocksForLayout(); 965 if (hasLayer()) 966 setLayerNeedsFullRepaint(); 967 } 968 } 969 970 inline void RenderObject::setNeedsSimplifiedNormalFlowLayout() 971 { 972 bool alreadyNeededLayout = needsLayout(); 973 m_needsSimplifiedNormalFlowLayout = true; 958 974 if (!alreadyNeededLayout) { 959 975 markContainingBlocksForLayout(); … … 983 999 RenderObject* last = this; 984 1000 1001 bool simplifiedNormalFlowLayout = needsSimplifiedNormalFlowLayout() && !selfNeedsLayout() && !normalChildNeedsLayout(); 1002 985 1003 while (o) { 986 1004 // Don't mark the outermost object of an unrooted subtree. That object will be … … 990 1008 return; 991 1009 if (!last->isText() && (last->style()->position() == FixedPosition || last->style()->position() == AbsolutePosition)) { 992 if (last->style()->top().isAuto() && last->style()->bottom().isAuto()) {993 RenderObject* parent = last->parent();994 if (!parent->normalChildNeedsLayout()) {995 parent->setChildNeedsLayout(true, false);996 if (parent != newRoot)997 parent->markContainingBlocksForLayout(scheduleRelayout, newRoot);998 }999 }1000 1010 if (o->m_posChildNeedsLayout) 1001 1011 return; 1002 1012 o->m_posChildNeedsLayout = true; 1013 simplifiedNormalFlowLayout = true; 1014 ASSERT(!o->isSetNeedsLayoutForbidden()); 1015 } else if (simplifiedNormalFlowLayout) { 1016 if (o->m_needsSimplifiedNormalFlowLayout) 1017 return; 1018 o->m_needsSimplifiedNormalFlowLayout = true; 1003 1019 ASSERT(!o->isSetNeedsLayoutForbidden()); 1004 1020 } else { -
trunk/Source/WebCore/rendering/RenderTable.cpp
r81816 r81992 262 262 ASSERT(needsLayout()); 263 263 264 if ( layoutOnlyPositionedObjects())264 if (simplifiedLayout()) 265 265 return; 266 266 -
trunk/Source/WebCore/rendering/RenderText.h
r78846 r81992 126 126 bool isAllCollapsibleWhitespace(); 127 127 128 bool knownToHaveNoOverflowAndNoFallbackFonts() const { return m_knownToHaveNoOverflowAndNoFallbackFonts; } 129 128 130 protected: 129 131 virtual void styleWillChange(StyleDifference, const RenderStyle*) { } -
trunk/Source/WebCore/rendering/style/RenderStyle.cpp
r81816 r81992 494 494 return StyleDifferenceLayout; 495 495 496 if ((visibility() == COLLAPSE) != (other->visibility() == COLLAPSE)) 497 return StyleDifferenceLayout; 498 496 499 if ((rareNonInheritedData->opacity == 1 && other->rareNonInheritedData->opacity < 1) || 497 500 (rareNonInheritedData->opacity < 1 && other->rareNonInheritedData->opacity == 1)) { 498 // FIXME: We should add an optimized form of layout that just recomputes visual overflow. 501 // FIXME: We would like to use SimplifiedLayout here, but we can't quite do that yet. 502 // We need to make sure SimplifiedLayout can operate correctly on RenderInlines (we will need 503 // to add a selfNeedsSimplifiedLayout bit in order to not get confused and taint every line). 504 // In addition we need to solve the floating object issue when layers come and go. Right now 505 // a full layout is necessary to keep floating object lists sane. 499 506 return StyleDifferenceLayout; 500 507 } 501 508 502 if ((visibility() == COLLAPSE) != (other->visibility() == COLLAPSE))503 return StyleDifferenceLayout;504 505 509 #if ENABLE(SVG) 506 510 // SVGRenderStyle::diff() might have returned StyleDifferenceRepaint, eg. if fill changes. … … 520 524 return StyleDifferenceLayoutPositionedMovementOnly; 521 525 522 // FIXME: We will need to do a bit of work in RenderObject/Box::setStyle before we 523 // can stop doing a layout when relative positioned objects move. In particular, we'll need 524 // to update scrolling positions and figure out how to do a repaint properly of the updated layer. 525 //if (other->position() == RelativePosition) 526 // return RepaintLayer; 527 //else 528 return StyleDifferenceLayout; 526 // FIXME: We would like to use SimplifiedLayout for relative positioning, but we can't quite do that yet. 527 // We need to make sure SimplifiedLayout can operate correctly on RenderInlines (we will need 528 // to add a selfNeedsSimplifiedLayout bit in order to not get confused and taint every line). 529 return StyleDifferenceLayout; 529 530 } else if (m_box->zIndex() != other->m_box->zIndex() || m_box->hasAutoZIndex() != other->m_box->hasAutoZIndex() || 530 531 visual->clip != other->visual->clip || visual->hasClip != other->visual->hasClip) -
trunk/Source/WebCore/rendering/style/RenderStyleConstants.h
r81816 r81992 52 52 StyleDifferenceRepaintLayer, 53 53 StyleDifferenceLayoutPositionedMovementOnly, 54 StyleDifferenceSimplifiedLayout, 54 55 StyleDifferenceLayout 55 56 }; -
trunk/Source/WebCore/rendering/svg/RenderSVGText.cpp
r81816 r81992 135 135 // All if branches that could cause early exit in RenderBlocks layoutBlock() method are turned into assertions. 136 136 ASSERT(!isInline()); 137 ASSERT(! layoutOnlyPositionedObjects());137 ASSERT(!simplifiedLayout()); 138 138 ASSERT(!scrollsOverflow()); 139 139 ASSERT(!hasControlClip());
Note: See TracChangeset
for help on using the changeset viewer.