Changeset 73488 in webkit
- Timestamp:
- Dec 7, 2010 8:21:20 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r73487 r73488 1 2010-12-05 MORITA Hajime <morrita@google.com> 2 3 Reviewed by Dimitri Glazkov. 4 5 - Added a test case 6 - Updated expectations to follow the change on the shadow structure. 7 8 RenderIndicator subclasses should not change the render tree during layout. 9 https://bugs.webkit.org/show_bug.cgi?id=50026 10 11 * fast/dom/HTMLMeterElement/meter-element-crash-expected.txt: Added. 12 * fast/dom/HTMLMeterElement/meter-element-crash.html: Added. 13 * platform/mac/fast/dom/HTMLMeterElement/meter-appearances-capacity-expected.txt: 14 * platform/mac/fast/dom/HTMLMeterElement/meter-appearances-rating-relevancy-expected.txt: 15 * platform/mac/fast/dom/HTMLMeterElement/meter-boundary-values-expected.txt: 16 * platform/mac/fast/dom/HTMLMeterElement/meter-element-expected.txt: 17 * platform/mac/fast/dom/HTMLMeterElement/meter-optimums-expected.txt: 18 * platform/mac/fast/dom/HTMLMeterElement/meter-styles-changing-pseudo-expected.txt: 19 * platform/mac/fast/dom/HTMLMeterElement/meter-styles-expected.txt: 20 1 21 2010-12-07 Simon Fraser <simon.fraser@apple.com> 2 22 -
trunk/LayoutTests/platform/mac/fast/dom/HTMLMeterElement/meter-appearances-capacity-expected.txt
r60822 r73488 17 17 text run at (0,0) width 86: "value=10/10:" 18 18 RenderMeter {METER} at (664,0) size 80x18 19 RenderBlock {DIV} at (0,0) size 80x18 20 RenderBlock {DIV} at (0,0) size 80x18 21 RenderBlock {DIV} at (0,0) size 80x18 22 RenderBlock {DIV} at (0,0) size 80x18 19 23 RenderListItem {LI} at (40,18) size 744x18 [bgcolor=#CCCCCC] 20 24 RenderListMarker at (-17,0) size 7x18: bullet … … 22 26 text run at (0,0) width 78: "value=8/10:" 23 27 RenderMeter {METER} at (664,0) size 80x18 28 RenderBlock {DIV} at (0,0) size 80x18 29 RenderBlock {DIV} at (0,0) size 64x18 30 RenderBlock {DIV} at (0,0) size 80x18 31 RenderBlock {DIV} at (0,4) size 80x14 24 32 RenderListItem {LI} at (40,36) size 744x18 [bgcolor=#EEEEEE] 25 33 RenderListMarker at (-17,0) size 7x18: bullet … … 27 35 text run at (0,0) width 78: "value=5/10:" 28 36 RenderMeter {METER} at (664,0) size 80x18 37 RenderBlock {DIV} at (0,0) size 80x18 38 RenderBlock {DIV} at (0,0) size 40x18 39 RenderBlock {DIV} at (0,0) size 80x18 40 RenderBlock {DIV} at (0,9) size 80x9 29 41 RenderListItem {LI} at (40,54) size 744x18 [bgcolor=#CCCCCC] 30 42 RenderListMarker at (-17,0) size 7x18: bullet … … 32 44 text run at (0,0) width 78: "value=2/10:" 33 45 RenderMeter {METER} at (664,0) size 80x18 46 RenderBlock {DIV} at (0,0) size 80x18 47 RenderBlock {DIV} at (0,0) size 16x18 48 RenderBlock {DIV} at (0,0) size 80x18 49 RenderBlock {DIV} at (0,15) size 80x3 34 50 RenderListItem {LI} at (40,72) size 744x18 [bgcolor=#EEEEEE] 35 51 RenderListMarker at (-17,0) size 7x18: bullet … … 37 53 text run at (0,0) width 78: "value=0/10:" 38 54 RenderMeter {METER} at (664,0) size 80x18 55 RenderBlock {DIV} at (0,0) size 80x18 56 RenderBlock {DIV} at (0,0) size 0x18 57 RenderBlock {DIV} at (0,0) size 80x18 58 RenderBlock {DIV} at (0,18) size 80x0 39 59 RenderListItem {LI} at (40,90) size 744x18 [bgcolor=#CCCCCC] 40 60 RenderListMarker at (-17,0) size 7x18: bullet … … 42 62 text run at (0,0) width 39: "RTL:" 43 63 RenderMeter {METER} at (664,0) size 80x18 64 RenderBlock {DIV} at (0,0) size 80x18 65 RenderBlock {DIV} at (40,0) size 40x18 66 RenderBlock {DIV} at (0,0) size 80x18 67 RenderBlock {DIV} at (0,9) size 80x9 44 68 RenderListItem {LI} at (40,108) size 744x50 [bgcolor=#EEEEEE] 45 69 RenderListMarker at (-17,0) size 7x18: bullet … … 47 71 text run at (0,0) width 32: "Tall:" 48 72 RenderMeter {METER} at (664,0) size 80x50 73 RenderBlock {DIV} at (0,0) size 80x50 74 RenderBlock {DIV} at (0,0) size 40x50 75 RenderBlock {DIV} at (0,0) size 80x50 76 RenderBlock {DIV} at (0,25) size 80x25 49 77 RenderListItem {LI} at (40,158) size 744x18 [bgcolor=#CCCCCC] 50 78 RenderListMarker at (-17,0) size 7x18: bullet … … 52 80 text run at (0,0) width 43: "Short:" 53 81 RenderMeter {METER} at (664,0) size 80x18 82 RenderBlock {DIV} at (0,0) size 80x18 83 RenderBlock {DIV} at (0,0) size 24x18 84 RenderBlock {DIV} at (0,0) size 80x18 85 RenderBlock {DIV} at (0,13) size 80x5 54 86 RenderListItem {LI} at (40,176) size 744x18 [bgcolor=#EEEEEE] 55 87 RenderListMarker at (-17,0) size 7x18: bullet … … 57 89 text run at (0,0) width 41: "Wide:" 58 90 RenderMeter {METER} at (444,0) size 300x18 91 RenderBlock {DIV} at (0,0) size 300x18 92 RenderBlock {DIV} at (0,0) size 150x18 93 RenderBlock {DIV} at (0,0) size 300x18 94 RenderBlock {DIV} at (0,9) size 300x9 59 95 RenderListItem {LI} at (40,194) size 744x18 [bgcolor=#CCCCCC] 60 96 RenderListMarker at (-17,0) size 7x18: bullet … … 62 98 text run at (0,0) width 59: "Narrow:" 63 99 RenderMeter {METER} at (714,0) size 30x18 100 RenderBlock {DIV} at (0,0) size 30x18 101 RenderBlock {DIV} at (0,0) size 15x18 102 RenderBlock {DIV} at (0,0) size 30x18 103 RenderBlock {DIV} at (0,9) size 30x9 64 104 RenderBlock {H2} at (0,293) size 784x18 65 105 RenderText {#text} at (0,0) size 236x18 … … 72 112 text run at (0,0) width 86: "value=10/10:" 73 113 RenderMeter {METER} at (664,0) size 80x16 114 RenderBlock {DIV} at (0,0) size 80x16 115 RenderBlock {DIV} at (0,0) size 80x16 116 RenderBlock {DIV} at (0,0) size 80x16 117 RenderBlock {DIV} at (0,0) size 80x16 74 118 RenderListItem {LI} at (40,18) size 744x18 [bgcolor=#CCCCCC] 75 119 RenderListMarker at (-17,0) size 7x18: bullet … … 77 121 text run at (0,0) width 78: "value=8/10:" 78 122 RenderMeter {METER} at (664,0) size 80x16 123 RenderBlock {DIV} at (0,0) size 80x16 124 RenderBlock {DIV} at (0,0) size 64x16 125 RenderBlock {DIV} at (0,0) size 80x16 126 RenderBlock {DIV} at (0,4) size 80x12 79 127 RenderListItem {LI} at (40,36) size 744x18 [bgcolor=#EEEEEE] 80 128 RenderListMarker at (-17,0) size 7x18: bullet … … 82 130 text run at (0,0) width 78: "value=5/10:" 83 131 RenderMeter {METER} at (664,0) size 80x16 132 RenderBlock {DIV} at (0,0) size 80x16 133 RenderBlock {DIV} at (0,0) size 40x16 134 RenderBlock {DIV} at (0,0) size 80x16 135 RenderBlock {DIV} at (0,8) size 80x8 84 136 RenderListItem {LI} at (40,54) size 744x18 [bgcolor=#CCCCCC] 85 137 RenderListMarker at (-17,0) size 7x18: bullet … … 87 139 text run at (0,0) width 78: "value=2/10:" 88 140 RenderMeter {METER} at (664,0) size 80x16 141 RenderBlock {DIV} at (0,0) size 80x16 142 RenderBlock {DIV} at (0,0) size 16x16 143 RenderBlock {DIV} at (0,0) size 80x16 144 RenderBlock {DIV} at (0,13) size 80x3 89 145 RenderListItem {LI} at (40,72) size 744x18 [bgcolor=#EEEEEE] 90 146 RenderListMarker at (-17,0) size 7x18: bullet … … 92 148 text run at (0,0) width 78: "value=0/10:" 93 149 RenderMeter {METER} at (664,0) size 80x16 150 RenderBlock {DIV} at (0,0) size 80x16 151 RenderBlock {DIV} at (0,0) size 0x16 152 RenderBlock {DIV} at (0,0) size 80x16 153 RenderBlock {DIV} at (0,16) size 80x0 94 154 RenderListItem {LI} at (40,90) size 744x18 [bgcolor=#CCCCCC] 95 155 RenderListMarker at (-17,0) size 7x18: bullet … … 97 157 text run at (0,0) width 39: "RTL:" 98 158 RenderMeter {METER} at (664,0) size 80x16 159 RenderBlock {DIV} at (0,0) size 80x16 160 RenderBlock {DIV} at (40,0) size 40x16 161 RenderBlock {DIV} at (0,0) size 80x16 162 RenderBlock {DIV} at (0,8) size 80x8 99 163 RenderListItem {LI} at (40,108) size 744x50 [bgcolor=#EEEEEE] 100 164 RenderListMarker at (-17,0) size 7x18: bullet … … 102 166 text run at (0,0) width 32: "Tall:" 103 167 RenderMeter {METER} at (664,0) size 80x50 168 RenderBlock {DIV} at (0,0) size 80x50 169 RenderBlock {DIV} at (0,0) size 40x50 170 RenderBlock {DIV} at (0,0) size 80x50 171 RenderBlock {DIV} at (0,25) size 80x25 104 172 RenderListItem {LI} at (40,158) size 744x18 [bgcolor=#CCCCCC] 105 173 RenderListMarker at (-17,0) size 7x18: bullet … … 107 175 text run at (0,0) width 43: "Short:" 108 176 RenderMeter {METER} at (664,0) size 80x16 177 RenderBlock {DIV} at (0,0) size 80x16 178 RenderBlock {DIV} at (0,0) size 24x16 179 RenderBlock {DIV} at (0,0) size 80x16 180 RenderBlock {DIV} at (0,12) size 80x4 109 181 RenderListItem {LI} at (40,176) size 744x18 [bgcolor=#EEEEEE] 110 182 RenderListMarker at (-17,0) size 7x18: bullet … … 112 184 text run at (0,0) width 41: "Wide:" 113 185 RenderMeter {METER} at (444,0) size 300x16 186 RenderBlock {DIV} at (0,0) size 300x16 187 RenderBlock {DIV} at (0,0) size 150x16 188 RenderBlock {DIV} at (0,0) size 300x16 189 RenderBlock {DIV} at (0,8) size 300x8 114 190 RenderListItem {LI} at (40,194) size 744x18 [bgcolor=#CCCCCC] 115 191 RenderListMarker at (-17,0) size 7x18: bullet … … 117 193 text run at (0,0) width 59: "Narrow:" 118 194 RenderMeter {METER} at (714,0) size 30x16 195 RenderBlock {DIV} at (0,0) size 30x16 196 RenderBlock {DIV} at (0,0) size 15x16 197 RenderBlock {DIV} at (0,0) size 30x16 198 RenderBlock {DIV} at (0,8) size 30x8 -
trunk/LayoutTests/platform/mac/fast/dom/HTMLMeterElement/meter-appearances-rating-relevancy-expected.txt
r60822 r73488 17 17 text run at (0,0) width 86: "value=10/10:" 18 18 RenderMeter {METER} at (614,0) size 130x16 19 RenderBlock {DIV} at (0,0) size 130x16 20 RenderBlock {DIV} at (0,0) size 130x16 21 RenderBlock {DIV} at (0,0) size 130x16 22 RenderBlock {DIV} at (0,0) size 130x16 19 23 RenderListItem {LI} at (40,18) size 744x18 [bgcolor=#CCCCCC] 20 24 RenderListMarker at (-17,0) size 7x18: bullet … … 22 26 text run at (0,0) width 78: "value=8/10:" 23 27 RenderMeter {METER} at (614,0) size 130x16 28 RenderBlock {DIV} at (0,0) size 130x16 29 RenderBlock {DIV} at (0,0) size 104x16 30 RenderBlock {DIV} at (0,0) size 130x16 31 RenderBlock {DIV} at (0,4) size 130x12 24 32 RenderListItem {LI} at (40,36) size 744x18 [bgcolor=#EEEEEE] 25 33 RenderListMarker at (-17,0) size 7x18: bullet … … 27 35 text run at (0,0) width 78: "value=5/10:" 28 36 RenderMeter {METER} at (614,0) size 130x16 37 RenderBlock {DIV} at (0,0) size 130x16 38 RenderBlock {DIV} at (0,0) size 65x16 39 RenderBlock {DIV} at (0,0) size 130x16 40 RenderBlock {DIV} at (0,8) size 130x8 29 41 RenderListItem {LI} at (40,54) size 744x18 [bgcolor=#CCCCCC] 30 42 RenderListMarker at (-17,0) size 7x18: bullet … … 32 44 text run at (0,0) width 78: "value=2/10:" 33 45 RenderMeter {METER} at (614,0) size 130x16 46 RenderBlock {DIV} at (0,0) size 130x16 47 RenderBlock {DIV} at (0,0) size 26x16 48 RenderBlock {DIV} at (0,0) size 130x16 49 RenderBlock {DIV} at (0,13) size 130x3 34 50 RenderListItem {LI} at (40,72) size 744x18 [bgcolor=#EEEEEE] 35 51 RenderListMarker at (-17,0) size 7x18: bullet … … 37 53 text run at (0,0) width 78: "value=0/10:" 38 54 RenderMeter {METER} at (614,0) size 130x16 55 RenderBlock {DIV} at (0,0) size 130x16 56 RenderBlock {DIV} at (0,0) size 0x16 57 RenderBlock {DIV} at (0,0) size 130x16 58 RenderBlock {DIV} at (0,16) size 130x0 39 59 RenderListItem {LI} at (40,90) size 744x18 [bgcolor=#CCCCCC] 40 60 RenderListMarker at (-17,0) size 7x18: bullet … … 42 62 text run at (0,0) width 39: "RTL:" 43 63 RenderMeter {METER} at (614,0) size 130x16 64 RenderBlock {DIV} at (0,0) size 130x16 65 RenderBlock {DIV} at (65,0) size 65x16 66 RenderBlock {DIV} at (0,0) size 130x16 67 RenderBlock {DIV} at (0,8) size 130x8 44 68 RenderListItem {LI} at (40,108) size 744x50 [bgcolor=#EEEEEE] 45 69 RenderListMarker at (-17,0) size 7x18: bullet … … 47 71 text run at (0,0) width 32: "Tall:" 48 72 RenderMeter {METER} at (614,0) size 130x50 73 RenderBlock {DIV} at (0,0) size 130x50 74 RenderBlock {DIV} at (0,0) size 65x50 75 RenderBlock {DIV} at (0,0) size 130x50 76 RenderBlock {DIV} at (0,25) size 130x25 49 77 RenderListItem {LI} at (40,158) size 744x18 [bgcolor=#CCCCCC] 50 78 RenderListMarker at (-17,0) size 7x18: bullet … … 52 80 text run at (0,0) width 43: "Short:" 53 81 RenderMeter {METER} at (614,0) size 130x13 82 RenderBlock {DIV} at (0,0) size 130x13 83 RenderBlock {DIV} at (0,0) size 39x13 84 RenderBlock {DIV} at (0,0) size 130x13 85 RenderBlock {DIV} at (0,10) size 130x3 54 86 RenderListItem {LI} at (40,176) size 744x18 [bgcolor=#EEEEEE] 55 87 RenderListMarker at (-17,0) size 7x18: bullet … … 57 89 text run at (0,0) width 41: "Wide:" 58 90 RenderMeter {METER} at (444,0) size 300x16 91 RenderBlock {DIV} at (0,0) size 300x16 92 RenderBlock {DIV} at (0,0) size 150x16 93 RenderBlock {DIV} at (0,0) size 300x16 94 RenderBlock {DIV} at (0,8) size 300x8 59 95 RenderListItem {LI} at (40,194) size 744x18 [bgcolor=#CCCCCC] 60 96 RenderListMarker at (-17,0) size 7x18: bullet … … 62 98 text run at (0,0) width 59: "Narrow:" 63 99 RenderMeter {METER} at (614,0) size 130x16 100 RenderBlock {DIV} at (0,0) size 130x16 101 RenderBlock {DIV} at (0,0) size 65x16 102 RenderBlock {DIV} at (0,0) size 130x16 103 RenderBlock {DIV} at (0,8) size 130x8 64 104 RenderBlock {H2} at (0,293) size 784x18 65 105 RenderText {#text} at (0,0) size 166x18 … … 72 112 text run at (0,0) width 86: "value=10/10:" 73 113 RenderMeter {METER} at (664,0) size 80x16 114 RenderBlock {DIV} at (0,0) size 80x16 115 RenderBlock {DIV} at (0,0) size 80x16 116 RenderBlock {DIV} at (0,0) size 80x16 117 RenderBlock {DIV} at (0,0) size 80x16 74 118 RenderListItem {LI} at (40,18) size 744x18 [bgcolor=#CCCCCC] 75 119 RenderListMarker at (-17,0) size 7x18: bullet … … 77 121 text run at (0,0) width 78: "value=8/10:" 78 122 RenderMeter {METER} at (664,0) size 80x16 123 RenderBlock {DIV} at (0,0) size 80x16 124 RenderBlock {DIV} at (0,0) size 64x16 125 RenderBlock {DIV} at (0,0) size 80x16 126 RenderBlock {DIV} at (0,4) size 80x12 79 127 RenderListItem {LI} at (40,36) size 744x18 [bgcolor=#EEEEEE] 80 128 RenderListMarker at (-17,0) size 7x18: bullet … … 82 130 text run at (0,0) width 78: "value=5/10:" 83 131 RenderMeter {METER} at (664,0) size 80x16 132 RenderBlock {DIV} at (0,0) size 80x16 133 RenderBlock {DIV} at (0,0) size 40x16 134 RenderBlock {DIV} at (0,0) size 80x16 135 RenderBlock {DIV} at (0,8) size 80x8 84 136 RenderListItem {LI} at (40,54) size 744x18 [bgcolor=#CCCCCC] 85 137 RenderListMarker at (-17,0) size 7x18: bullet … … 87 139 text run at (0,0) width 78: "value=2/10:" 88 140 RenderMeter {METER} at (664,0) size 80x16 141 RenderBlock {DIV} at (0,0) size 80x16 142 RenderBlock {DIV} at (0,0) size 16x16 143 RenderBlock {DIV} at (0,0) size 80x16 144 RenderBlock {DIV} at (0,13) size 80x3 89 145 RenderListItem {LI} at (40,72) size 744x18 [bgcolor=#EEEEEE] 90 146 RenderListMarker at (-17,0) size 7x18: bullet … … 92 148 text run at (0,0) width 78: "value=0/10:" 93 149 RenderMeter {METER} at (664,0) size 80x16 150 RenderBlock {DIV} at (0,0) size 80x16 151 RenderBlock {DIV} at (0,0) size 0x16 152 RenderBlock {DIV} at (0,0) size 80x16 153 RenderBlock {DIV} at (0,16) size 80x0 94 154 RenderListItem {LI} at (40,90) size 744x18 [bgcolor=#CCCCCC] 95 155 RenderListMarker at (-17,0) size 7x18: bullet … … 97 157 text run at (0,0) width 39: "RTL:" 98 158 RenderMeter {METER} at (664,0) size 80x16 159 RenderBlock {DIV} at (0,0) size 80x16 160 RenderBlock {DIV} at (40,0) size 40x16 161 RenderBlock {DIV} at (0,0) size 80x16 162 RenderBlock {DIV} at (0,8) size 80x8 99 163 RenderListItem {LI} at (40,108) size 744x50 [bgcolor=#EEEEEE] 100 164 RenderListMarker at (-17,0) size 7x18: bullet … … 102 166 text run at (0,0) width 32: "Tall:" 103 167 RenderMeter {METER} at (664,0) size 80x50 168 RenderBlock {DIV} at (0,0) size 80x50 169 RenderBlock {DIV} at (0,0) size 40x50 170 RenderBlock {DIV} at (0,0) size 80x50 171 RenderBlock {DIV} at (0,25) size 80x25 104 172 RenderListItem {LI} at (40,158) size 744x18 [bgcolor=#CCCCCC] 105 173 RenderListMarker at (-17,0) size 7x18: bullet … … 107 175 text run at (0,0) width 43: "Short:" 108 176 RenderMeter {METER} at (664,0) size 80x12 177 RenderBlock {DIV} at (0,0) size 80x12 178 RenderBlock {DIV} at (0,0) size 24x12 179 RenderBlock {DIV} at (0,0) size 80x12 180 RenderBlock {DIV} at (0,9) size 80x3 109 181 RenderListItem {LI} at (40,176) size 744x18 [bgcolor=#EEEEEE] 110 182 RenderListMarker at (-17,0) size 7x18: bullet … … 112 184 text run at (0,0) width 41: "Wide:" 113 185 RenderMeter {METER} at (444,0) size 300x16 186 RenderBlock {DIV} at (0,0) size 300x16 187 RenderBlock {DIV} at (0,0) size 150x16 188 RenderBlock {DIV} at (0,0) size 300x16 189 RenderBlock {DIV} at (0,8) size 300x8 114 190 RenderListItem {LI} at (40,194) size 744x18 [bgcolor=#CCCCCC] 115 191 RenderListMarker at (-17,0) size 7x18: bullet … … 117 193 text run at (0,0) width 59: "Narrow:" 118 194 RenderMeter {METER} at (714,0) size 30x16 195 RenderBlock {DIV} at (0,0) size 30x16 196 RenderBlock {DIV} at (0,0) size 15x16 197 RenderBlock {DIV} at (0,0) size 30x16 198 RenderBlock {DIV} at (0,8) size 30x8 -
trunk/LayoutTests/platform/mac/fast/dom/HTMLMeterElement/meter-boundary-values-expected.txt
r70856 r73488 20 20 text run at (8,0) width 107: "|10,20,30,40,50: " 21 21 RenderMeter {METER} at (115,1) size 80x16 22 RenderBlock {DIV} at (0,0) size 80x16 23 RenderBlock {DIV} at (0,0) size 0x16 24 RenderBlock {DIV} at (0,0) size 80x16 25 RenderBlock {DIV} at (0,16) size 80x0 22 26 RenderListItem {LI} at (40,36) size 744x18 23 27 RenderListMarker at (-17,0) size 7x18: bullet … … 28 32 text run at (16,0) width 88: ",20,30,40,50: " 29 33 RenderMeter {METER} at (104,1) size 80x16 34 RenderBlock {DIV} at (0,0) size 80x16 35 RenderBlock {DIV} at (0,0) size 0x16 36 RenderBlock {DIV} at (0,0) size 80x16 37 RenderBlock {DIV} at (0,16) size 80x0 30 38 RenderListItem {LI} at (40,54) size 744x18 31 39 RenderListMarker at (-17,0) size 7x18: bullet … … 38 46 text run at (36,0) width 68: ",30,40,50: " 39 47 RenderMeter {METER} at (104,1) size 80x16 48 RenderBlock {DIV} at (0,0) size 80x16 49 RenderBlock {DIV} at (0,0) size 20x16 50 RenderBlock {DIV} at (0,0) size 80x16 51 RenderBlock {DIV} at (0,12) size 80x4 40 52 RenderText {#text} at (184,0) size 110x18 41 53 text run at (184,0) width 110: "(should be green)" … … 50 62 text run at (56,0) width 48: ",40,50: " 51 63 RenderMeter {METER} at (104,1) size 80x16 64 RenderBlock {DIV} at (0,0) size 80x16 65 RenderBlock {DIV} at (0,0) size 40x16 66 RenderBlock {DIV} at (0,0) size 80x16 67 RenderBlock {DIV} at (0,8) size 80x8 52 68 RenderText {#text} at (184,0) size 110x18 53 69 text run at (184,0) width 110: "(should be green)" … … 62 78 text run at (76,0) width 28: ",50: " 63 79 RenderMeter {METER} at (104,1) size 80x16 80 RenderBlock {DIV} at (0,0) size 80x16 81 RenderBlock {DIV} at (0,0) size 60x16 82 RenderBlock {DIV} at (0,0) size 80x16 83 RenderBlock {DIV} at (0,4) size 80x12 64 84 RenderText {#text} at (184,0) size 110x18 65 85 text run at (184,0) width 110: "(should be green)" … … 74 94 text run at (96,0) width 8: ": " 75 95 RenderMeter {METER} at (104,1) size 80x16 96 RenderBlock {DIV} at (0,0) size 80x16 97 RenderBlock {DIV} at (0,0) size 80x16 98 RenderBlock {DIV} at (0,0) size 80x16 99 RenderBlock {DIV} at (0,0) size 80x16 76 100 RenderText {#text} at (184,0) size 118x18 77 101 text run at (184,0) width 118: "(should be yellow)" … … 86 110 text run at (115,0) width 8: ": " 87 111 RenderMeter {METER} at (123,1) size 80x16 112 RenderBlock {DIV} at (0,0) size 80x16 113 RenderBlock {DIV} at (0,0) size 80x16 114 RenderBlock {DIV} at (0,0) size 80x16 115 RenderBlock {DIV} at (0,0) size 80x16 88 116 RenderText {#text} at (203,0) size 118x18 89 117 text run at (203,0) width 118: "(should be yellow)" … … 98 126 text run at (36,0) width 68: ",30,40,50: " 99 127 RenderMeter {METER} at (104,1) size 80x16 128 RenderBlock {DIV} at (0,0) size 80x16 129 RenderBlock {DIV} at (0,0) size 0x16 130 RenderBlock {DIV} at (0,0) size 80x16 131 RenderBlock {DIV} at (0,16) size 80x0 100 132 RenderListItem {LI} at (40,162) size 744x18 101 133 RenderListMarker at (-17,0) size 7x18: bullet … … 108 140 text run at (76,0) width 28: ",40: " 109 141 RenderMeter {METER} at (104,1) size 80x16 142 RenderBlock {DIV} at (0,0) size 80x16 143 RenderBlock {DIV} at (0,0) size 80x16 144 RenderBlock {DIV} at (0,0) size 80x16 145 RenderBlock {DIV} at (0,0) size 80x16 110 146 RenderText {#text} at (184,0) size 110x18 111 147 text run at (184,0) width 110: "(should be green)" … … 118 154 text run at (8,0) width 107: "|10,10,10,20,30: " 119 155 RenderMeter {METER} at (115,1) size 80x16 156 RenderBlock {DIV} at (0,0) size 80x16 157 RenderBlock {DIV} at (0,0) size 0x16 158 RenderBlock {DIV} at (0,0) size 80x16 159 RenderBlock {DIV} at (0,16) size 80x0 120 160 RenderListItem {LI} at (40,198) size 744x18 121 161 RenderListMarker at (-17,0) size 7x18: bullet … … 128 168 text run at (56,0) width 48: ",20,30: " 129 169 RenderMeter {METER} at (104,1) size 80x16 170 RenderBlock {DIV} at (0,0) size 80x16 171 RenderBlock {DIV} at (0,0) size 0x16 172 RenderBlock {DIV} at (0,0) size 80x16 173 RenderBlock {DIV} at (0,16) size 80x0 130 174 RenderListItem {LI} at (40,216) size 744x18 131 175 RenderListMarker at (-17,0) size 7x18: bullet … … 138 182 text run at (56,0) width 48: ",30,30: " 139 183 RenderMeter {METER} at (104,1) size 80x16 184 RenderBlock {DIV} at (0,0) size 80x16 185 RenderBlock {DIV} at (0,0) size 80x16 186 RenderBlock {DIV} at (0,0) size 80x16 187 RenderBlock {DIV} at (0,0) size 80x16 140 188 RenderText {#text} at (184,0) size 110x18 141 189 text run at (184,0) width 110: "(should be green)" … … 150 198 text run at (115,0) width 8: ": " 151 199 RenderMeter {METER} at (123,1) size 80x16 200 RenderBlock {DIV} at (0,0) size 80x16 201 RenderBlock {DIV} at (0,0) size 80x16 202 RenderBlock {DIV} at (0,0) size 80x16 203 RenderBlock {DIV} at (0,0) size 80x16 152 204 RenderText {#text} at (203,0) size 110x18 153 205 text run at (203,0) width 110: "(should be green)" … … 162 214 text run at (56,0) width 48: ",20,30: " 163 215 RenderMeter {METER} at (104,1) size 80x16 164 RenderText {#text} at (184,0) size 110x18 165 text run at (184,0) width 110: "(should be green)" 216 RenderBlock {DIV} at (0,0) size 80x16 217 RenderBlock {DIV} at (0,0) size 40x16 218 RenderBlock {DIV} at (0,0) size 80x16 219 RenderBlock {DIV} at (0,8) size 80x8 220 RenderText {#text} at (184,0) size 110x18 221 text run at (184,0) width 110: "(should be green)" -
trunk/LayoutTests/platform/mac/fast/dom/HTMLMeterElement/meter-element-expected.txt
r71377 r73488 5 5 RenderBody {BODY} at (8,8) size 784x584 6 6 RenderMeter {METER} at (0,44) size 80x16 7 RenderBlock {DIV} at (0,0) size 80x16 8 RenderBlock {DIV} at (0,0) size 17x16 9 RenderBlock {DIV} at (0,0) size 80x16 10 RenderBlock {DIV} at (0,13) size 80x3 7 11 RenderMeter {METER} at (80,0) size 10x60 12 RenderBlock {DIV} at (0,0) size 10x60 13 RenderBlock {DIV} at (0,0) size 7x60 8 14 RenderBlock {DIV} at (0,0) size 10x60 9 15 RenderBlock {DIV} at (0,18) size 10x42 -
trunk/LayoutTests/platform/mac/fast/dom/HTMLMeterElement/meter-optimums-expected.txt
r60822 r73488 19 19 text run at (0,0) width 75: "value=150: " 20 20 RenderMeter {METER} at (75,1) size 80x16 21 RenderBlock {DIV} at (0,0) size 80x16 22 RenderBlock {DIV} at (0,0) size 20x16 23 RenderBlock {DIV} at (0,0) size 80x16 24 RenderBlock {DIV} at (0,12) size 80x4 21 25 RenderListItem {LI} at (40,18) size 744x18 22 26 RenderListMarker at (-17,0) size 7x18: bullet … … 24 28 text run at (0,0) width 75: "value=450: " 25 29 RenderMeter {METER} at (75,1) size 80x16 30 RenderBlock {DIV} at (0,0) size 80x16 31 RenderBlock {DIV} at (0,0) size 36x16 32 RenderBlock {DIV} at (0,0) size 80x16 33 RenderBlock {DIV} at (0,9) size 80x7 26 34 RenderListItem {LI} at (40,36) size 744x18 27 35 RenderListMarker at (-17,0) size 7x18: bullet … … 29 37 text run at (0,0) width 75: "value=750: " 30 38 RenderMeter {METER} at (75,1) size 80x16 39 RenderBlock {DIV} at (0,0) size 80x16 40 RenderBlock {DIV} at (0,0) size 60x16 41 RenderBlock {DIV} at (0,0) size 80x16 42 RenderBlock {DIV} at (0,4) size 80x12 31 43 RenderListItem {LI} at (40,54) size 744x18 32 44 RenderListMarker at (-17,0) size 7x18: bullet … … 34 46 text run at (0,0) width 59: "value=0: " 35 47 RenderMeter {METER} at (59,1) size 80x16 48 RenderBlock {DIV} at (0,0) size 80x16 49 RenderBlock {DIV} at (0,0) size 0x16 50 RenderBlock {DIV} at (0,0) size 80x16 51 RenderBlock {DIV} at (0,16) size 80x0 36 52 RenderListItem {LI} at (40,72) size 744x18 37 53 RenderListMarker at (-17,0) size 7x18: bullet … … 39 55 text run at (0,0) width 83: "value=1000: " 40 56 RenderMeter {METER} at (83,1) size 80x16 57 RenderBlock {DIV} at (0,0) size 80x16 58 RenderBlock {DIV} at (0,0) size 80x16 59 RenderBlock {DIV} at (0,0) size 80x16 60 RenderBlock {DIV} at (0,0) size 80x16 41 61 RenderBlock {H2} at (0,251) size 784x28 42 62 RenderText {#text} at (0,0) size 143x28 … … 48 68 text run at (0,0) width 75: "value=150: " 49 69 RenderMeter {METER} at (75,1) size 80x16 70 RenderBlock {DIV} at (0,0) size 80x16 71 RenderBlock {DIV} at (0,0) size 20x16 72 RenderBlock {DIV} at (0,0) size 80x16 73 RenderBlock {DIV} at (0,12) size 80x4 50 74 RenderListItem {LI} at (40,18) size 744x18 51 75 RenderListMarker at (-17,0) size 7x18: bullet … … 53 77 text run at (0,0) width 75: "value=450: " 54 78 RenderMeter {METER} at (75,1) size 80x16 79 RenderBlock {DIV} at (0,0) size 80x16 80 RenderBlock {DIV} at (0,0) size 36x16 81 RenderBlock {DIV} at (0,0) size 80x16 82 RenderBlock {DIV} at (0,9) size 80x7 55 83 RenderListItem {LI} at (40,36) size 744x18 56 84 RenderListMarker at (-17,0) size 7x18: bullet … … 58 86 text run at (0,0) width 75: "value=750: " 59 87 RenderMeter {METER} at (75,1) size 80x16 88 RenderBlock {DIV} at (0,0) size 80x16 89 RenderBlock {DIV} at (0,0) size 60x16 90 RenderBlock {DIV} at (0,0) size 80x16 91 RenderBlock {DIV} at (0,4) size 80x12 60 92 RenderListItem {LI} at (40,54) size 744x18 61 93 RenderListMarker at (-17,0) size 7x18: bullet … … 63 95 text run at (0,0) width 59: "value=0: " 64 96 RenderMeter {METER} at (59,1) size 80x16 97 RenderBlock {DIV} at (0,0) size 80x16 98 RenderBlock {DIV} at (0,0) size 0x16 99 RenderBlock {DIV} at (0,0) size 80x16 100 RenderBlock {DIV} at (0,16) size 80x0 65 101 RenderListItem {LI} at (40,72) size 744x18 66 102 RenderListMarker at (-17,0) size 7x18: bullet … … 68 104 text run at (0,0) width 83: "value=1000: " 69 105 RenderMeter {METER} at (83,1) size 80x16 106 RenderBlock {DIV} at (0,0) size 80x16 107 RenderBlock {DIV} at (0,0) size 80x16 108 RenderBlock {DIV} at (0,0) size 80x16 109 RenderBlock {DIV} at (0,0) size 80x16 70 110 RenderBlock {H2} at (0,407) size 784x28 71 111 RenderText {#text} at (0,0) size 143x28 … … 77 117 text run at (0,0) width 75: "value=150: " 78 118 RenderMeter {METER} at (75,1) size 80x16 119 RenderBlock {DIV} at (0,0) size 80x16 120 RenderBlock {DIV} at (0,0) size 20x16 121 RenderBlock {DIV} at (0,0) size 80x16 122 RenderBlock {DIV} at (0,12) size 80x4 79 123 RenderListItem {LI} at (40,18) size 744x18 80 124 RenderListMarker at (-17,0) size 7x18: bullet … … 82 126 text run at (0,0) width 75: "value=450: " 83 127 RenderMeter {METER} at (75,1) size 80x16 128 RenderBlock {DIV} at (0,0) size 80x16 129 RenderBlock {DIV} at (0,0) size 36x16 130 RenderBlock {DIV} at (0,0) size 80x16 131 RenderBlock {DIV} at (0,9) size 80x7 84 132 RenderListItem {LI} at (40,36) size 744x18 85 133 RenderListMarker at (-17,0) size 7x18: bullet … … 87 135 text run at (0,0) width 75: "value=750: " 88 136 RenderMeter {METER} at (75,1) size 80x16 137 RenderBlock {DIV} at (0,0) size 80x16 138 RenderBlock {DIV} at (0,0) size 60x16 139 RenderBlock {DIV} at (0,0) size 80x16 140 RenderBlock {DIV} at (0,4) size 80x12 89 141 RenderListItem {LI} at (40,54) size 744x18 90 142 RenderListMarker at (-17,0) size 7x18: bullet … … 92 144 text run at (0,0) width 59: "value=0: " 93 145 RenderMeter {METER} at (59,1) size 80x16 146 RenderBlock {DIV} at (0,0) size 80x16 147 RenderBlock {DIV} at (0,0) size 0x16 148 RenderBlock {DIV} at (0,0) size 80x16 149 RenderBlock {DIV} at (0,16) size 80x0 94 150 RenderListItem {LI} at (40,72) size 744x18 95 151 RenderListMarker at (-17,0) size 7x18: bullet … … 97 153 text run at (0,0) width 83: "value=1000: " 98 154 RenderMeter {METER} at (83,1) size 80x16 155 RenderBlock {DIV} at (0,0) size 80x16 156 RenderBlock {DIV} at (0,0) size 80x16 157 RenderBlock {DIV} at (0,0) size 80x16 158 RenderBlock {DIV} at (0,0) size 80x16 -
trunk/LayoutTests/platform/mac/fast/dom/HTMLMeterElement/meter-styles-changing-pseudo-expected.txt
r63403 r73488 14 14 RenderBlock {DIV} at (0,0) size 80x16 [bgcolor=#808080] 15 15 RenderBlock {DIV} at (0,0) size 72x16 [bgcolor=#008000] 16 RenderBlock {DIV} at (0,0) size 80x16 17 RenderBlock {DIV} at (0,2) size 80x14 16 18 RenderText {#text} at (0,0) size 0x0 17 19 RenderBlock {P} at (0,124) size 784x18 … … 20 22 RenderBlock (anonymous) at (0,158) size 784x100 21 23 RenderMeter {METER} at (0,0) size 80x100 24 RenderBlock {DIV} at (0,0) size 80x100 25 RenderBlock {DIV} at (0,0) size 72x100 22 26 RenderBlock {DIV} at (0,0) size 80x100 [bgcolor=#808080] 23 27 RenderBlock {DIV} at (0,10) size 80x90 [bgcolor=#0000FF] … … 29 33 RenderBlock (anonymous) at (0,326) size 784x20 30 34 RenderMeter {METER} at (0,0) size 80x20 35 RenderBlock {DIV} at (0,0) size 80x20 36 RenderBlock {DIV} at (0,0) size 72x20 37 RenderBlock {DIV} at (0,0) size 80x20 [bgcolor=#808080] 38 RenderBlock {DIV} at (0,2) size 80x18 [bgcolor=#0000FF] 31 39 RenderText {#text} at (0,0) size 0x0 -
trunk/LayoutTests/platform/mac/fast/dom/HTMLMeterElement/meter-styles-expected.txt
r61376 r73488 12 12 RenderBlock {DIV} at (0,0) size 80x16 13 13 RenderBlock {DIV} at (0,0) size 20x16 14 RenderBlock {DIV} at (0,0) size 80x16 15 RenderBlock {DIV} at (0,12) size 80x4 14 16 RenderListItem {LI} at (43,21) size 732x18 15 17 RenderMeter {METER} at (0,1) size 80x16 16 18 RenderBlock {DIV} at (0,0) size 80x16 17 19 RenderBlock {DIV} at (0,0) size 36x16 20 RenderBlock {DIV} at (0,0) size 80x16 21 RenderBlock {DIV} at (0,9) size 80x7 18 22 RenderListItem {LI} at (43,42) size 732x18 19 23 RenderMeter {METER} at (0,1) size 80x16 20 24 RenderBlock {DIV} at (0,0) size 80x16 21 25 RenderBlock {DIV} at (0,0) size 60x16 26 RenderBlock {DIV} at (0,0) size 80x16 27 RenderBlock {DIV} at (0,4) size 80x12 22 28 RenderBlock {H2} at (3,84) size 778x18 23 29 RenderText {#text} at (0,0) size 332x18 … … 27 33 RenderMeter {METER} at (0,0) size 30x40 28 34 RenderBlock {DIV} at (0,0) size 30x40 35 RenderBlock {DIV} at (0,0) size 7x40 36 RenderBlock {DIV} at (0,0) size 30x40 29 37 RenderBlock {DIV} at (0,30) size 30x10 30 38 RenderListItem {LI} at (43,44) size 732x41 31 39 RenderMeter {METER} at (0,0) size 30x40 32 40 RenderBlock {DIV} at (0,0) size 30x40 41 RenderBlock {DIV} at (0,0) size 13x40 42 RenderBlock {DIV} at (0,0) size 30x40 33 43 RenderBlock {DIV} at (0,22) size 30x18 34 44 RenderListItem {LI} at (43,88) size 732x41 35 45 RenderMeter {METER} at (0,0) size 30x40 46 RenderBlock {DIV} at (0,0) size 30x40 47 RenderBlock {DIV} at (0,0) size 22x40 36 48 RenderBlock {DIV} at (0,0) size 30x40 37 49 RenderBlock {DIV} at (0,10) size 30x30 … … 45 57 RenderBlock {DIV} at (100,10) size 80x16 46 58 RenderBlock {DIV} at (100,10) size 64x16 59 RenderBlock {DIV} at (100,10) size 80x16 60 RenderBlock {DIV} at (100,14) size 80x12 47 61 RenderText {#text} at (230,14) size 70x18 48 62 text run at (230,14) width 70: " has border" … … 51 65 RenderBlock {DIV} at (100,10) size 80x16 52 66 RenderBlock {DIV} at (100,10) size 64x16 67 RenderBlock {DIV} at (100,10) size 80x16 68 RenderBlock {DIV} at (100,14) size 80x12 53 69 RenderText {#text} at (230,14) size 80x18 54 70 text run at (230,14) width 80: " has padding" … … 57 73 RenderBlock {DIV} at (0,0) size 80x16 58 74 RenderBlock {DIV} at (0,0) size 64x16 75 RenderBlock {DIV} at (0,0) size 80x16 76 RenderBlock {DIV} at (0,4) size 80x12 59 77 RenderText {#text} at (230,14) size 73x18 60 78 text run at (230,14) width 73: " has margin" … … 68 86 RenderBlock {DIV} at (0,0) size 80x16 69 87 RenderBlock {DIV} at (0,0) size 64x16 [bgcolor=#008000] [border: (2px solid #77CC77)] 88 RenderBlock {DIV} at (0,0) size 80x16 89 RenderBlock {DIV} at (0,4) size 80x12 70 90 RenderText {#text} at (80,0) size 250x18 71 91 text run at (80,0) width 250: " has bar style, should be styled as it has." … … 74 94 RenderBlock {DIV} at (0,0) size 80x16 [bgcolor=#808080] [border: (2px solid #222222)] 75 95 RenderBlock {DIV} at (0,0) size 64x16 96 RenderBlock {DIV} at (0,0) size 80x16 97 RenderBlock {DIV} at (0,4) size 80x12 76 98 RenderText {#text} at (80,0) size 264x18 77 99 text run at (80,0) width 264: " has value style, should be styled as it has." … … 80 102 RenderBlock {DIV} at (0,0) size 80x16 [bgcolor=#808080] [border: (2px solid #222222)] 81 103 RenderBlock {DIV} at (0,0) size 64x16 [bgcolor=#008000] [border: (2px solid #77CC77)] 104 RenderBlock {DIV} at (0,0) size 80x16 105 RenderBlock {DIV} at (0,4) size 80x12 82 106 RenderText {#text} at (80,0) size 264x18 83 107 text run at (80,0) width 264: " has both styles, should be styled as it has." … … 91 115 RenderBlock {DIV} at (0,0) size 80x16 92 116 RenderBlock {DIV} at (0,0) size 64x16 117 RenderBlock {DIV} at (0,0) size 80x16 118 RenderBlock {DIV} at (0,4) size 80x12 93 119 RenderText {#text} at (80,0) size 375x18 94 120 text run at (80,0) width 375: " has \"none\" appearance, should be styled with default style." 95 121 RenderListItem {LI} at (43,21) size 732x18 96 122 RenderMeter {METER} at (0,1) size 80x16 123 RenderBlock {DIV} at (0,0) size 80x16 124 RenderBlock {DIV} at (0,0) size 64x16 125 RenderBlock {DIV} at (0,0) size 80x16 126 RenderBlock {DIV} at (0,4) size 80x12 97 127 RenderText {#text} at (80,0) size 276x18 98 128 text run at (80,0) width 276: " has \"meter\" appearance, should be themed." -
trunk/WebCore/ChangeLog
r73486 r73488 1 2010-12-06 MORITA Hajime <morrita@google.com> 2 3 Reviewed by Dimitri Glazkov. 4 5 RenderIndicator subclasses should not change the render tree during layout. 6 https://bugs.webkit.org/show_bug.cgi?id=50026 7 8 The old code created shadow elements during a layout computation, 9 that makes the layout state inconsisntent and cause an assertion failure. 10 This change created shadow elements before the layout to avoid 11 state inconsistencies. 12 13 Instead of creating shadows on demand, RenderMeter and 14 RenderProgress now create all necessary shadows before layouts, 15 and change its visibilities during the layout: Changing 16 visibilities doesn't trigger relayout and keep the state 17 consistent. 18 19 RenderMeter uses new HidablePartElement for shadow elements, 20 which can toggle visibiliby between hidden and original value. 21 22 Test: fast/dom/HTMLMeterElement/meter-element-crash.html 23 24 * html/HTMLMeterElement.cpp: 25 (WebCore::HTMLMeterElement::attach): Calling updateFromElement() 26 * html/HTMLMeterElement.h: 27 * html/HTMLProgressElement.cpp: 28 (WebCore::HTMLProgressElement::attach): Calling updateFromElement() 29 * html/HTMLProgressElement.h: 30 * rendering/RenderIndicator.cpp: 31 * rendering/RenderIndicator.h: 32 * rendering/RenderMeter.cpp: 33 (WebCore::MeterPartElement::MeterPartElement): Added to hold a restorable visibility. 34 (WebCore::MeterPartElement::createForPart): 35 (WebCore::MeterPartElement::hide): 36 (WebCore::MeterPartElement::restoreVisibility): 37 (WebCore::MeterPartElement::updateStyleForPart): 38 (WebCore::MeterPartElement::saveVisibility): 39 (WebCore::RenderMeter::~RenderMeter): 40 (WebCore::RenderMeter::createPart): Extracted 41 (WebCore::RenderMeter::updateFromElement): Had a shadow generation. 42 (WebCore::RenderMeter::layoutParts): Removed shadow generation code. 43 (WebCore::RenderMeter::shouldHaveParts): 44 (WebCore::RenderMeter::valuePartRect): Adopted orientation. 45 (WebCore::RenderMeter::orientation): Morphed from isHorizontal() 46 (WebCore::RenderMeter::valuePseudoId): Adoptedn orientation 47 (WebCore::RenderMeter::barPseudoId): Adopted orientation. 48 * rendering/RenderMeter.h: 49 (WebCore::RenderMeter::shadowAttached): 50 * rendering/RenderProgress.cpp: 51 (WebCore::RenderProgress::updateFromElement): Had a shadow generation. 52 (WebCore::RenderProgress::layoutParts): 53 * rendering/RenderProgress.h: 54 * rendering/ShadowElement.cpp: 55 (WebCore::ShadowBlockElement::createForPart): Extracted initAsPart(). 56 (WebCore::ShadowBlockElement::initAsPart): Extracted from createForPart(). 57 * rendering/ShadowElement.h: 58 1 59 2010-11-29 Mihai Parparita <mihaip@chromium.org> 2 60 -
trunk/WebCore/html/HTMLMeterElement.cpp
r72976 r73488 68 68 } 69 69 70 void HTMLMeterElement::attach() 71 { 72 HTMLFormControlElement::attach(); 73 if (renderer()) 74 renderer()->updateFromElement(); 75 } 76 70 77 double HTMLMeterElement::min() const 71 78 { -
trunk/WebCore/html/HTMLMeterElement.h
r72976 r73488 66 66 67 67 virtual void parseMappedAttribute(Attribute*); 68 69 virtual void attach(); 68 70 }; 69 71 -
trunk/WebCore/html/HTMLProgressElement.cpp
r67423 r73488 71 71 } 72 72 73 void HTMLProgressElement::attach() 74 { 75 HTMLFormControlElement::attach(); 76 if (renderer()) 77 renderer()->updateFromElement(); 78 } 79 73 80 double HTMLProgressElement::value() const 74 81 { -
trunk/WebCore/html/HTMLProgressElement.h
r72976 r73488 49 49 50 50 virtual void parseMappedAttribute(Attribute*); 51 52 virtual void attach(); 51 53 }; 52 54 -
trunk/WebCore/rendering/RenderIndicator.cpp
r68238 r73488 26 26 27 27 #include "RenderTheme.h" 28 #include "ShadowElement.h" 28 29 29 30 using namespace std; -
trunk/WebCore/rendering/RenderIndicator.h
r71377 r73488 39 39 40 40 virtual void layoutParts() = 0; 41 virtual bool shouldHaveParts() const = 0;42 41 }; 43 42 -
trunk/WebCore/rendering/RenderMeter.cpp
r68817 r73488 36 36 using namespace HTMLNames; 37 37 38 class MeterPartElement : public ShadowBlockElement { 39 public: 40 static PassRefPtr<MeterPartElement> createForPart(HTMLElement*, PseudoId); 41 42 void hide(); 43 void restoreVisibility(); 44 45 virtual void updateStyleForPart(PseudoId); 46 47 private: 48 MeterPartElement(HTMLElement*); 49 void saveVisibility(); 50 51 EVisibility m_originalVisibility; 52 }; 53 54 MeterPartElement::MeterPartElement(HTMLElement* shadowParent) 55 : ShadowBlockElement(shadowParent) 56 { 57 } 58 59 PassRefPtr<MeterPartElement> MeterPartElement::createForPart(HTMLElement* shadowParent, PseudoId pseudoId) 60 { 61 RefPtr<MeterPartElement> ret = adoptRef(new MeterPartElement(shadowParent)); 62 ret->initAsPart(pseudoId); 63 ret->saveVisibility(); 64 return ret; 65 } 66 67 void MeterPartElement::hide() 68 { 69 if (renderer()) 70 renderer()->style()->setVisibility(HIDDEN); 71 } 72 73 void MeterPartElement::restoreVisibility() 74 { 75 if (renderer()) 76 renderer()->style()->setVisibility(m_originalVisibility); 77 } 78 79 void MeterPartElement::updateStyleForPart(PseudoId pseudoId) 80 { 81 if (renderer()->style()->styleType() == pseudoId) 82 return; 83 84 ShadowBlockElement::updateStyleForPart(pseudoId); 85 saveVisibility(); 86 } 87 88 void MeterPartElement::saveVisibility() 89 { 90 m_originalVisibility = renderer()->style()->visibility(); 91 } 92 38 93 RenderMeter::RenderMeter(HTMLMeterElement* element) 39 94 : RenderIndicator(element) … … 43 98 RenderMeter::~RenderMeter() 44 99 { 45 if (m_valuePart) 46 m_valuePart->detach(); 47 if (m_barPart) 48 m_barPart->detach(); 100 if (shadowAttached()) { 101 m_verticalValuePart->detach(); 102 m_verticalBarPart->detach(); 103 m_horizontalValuePart->detach(); 104 m_horizontalBarPart->detach(); 105 } 106 } 107 108 PassRefPtr<MeterPartElement> RenderMeter::createPart(PseudoId pseudoId) 109 { 110 RefPtr<MeterPartElement> element = MeterPartElement::createForPart(static_cast<HTMLElement*>(node()), pseudoId); 111 if (element->renderer()) 112 addChild(element->renderer()); 113 return element; 114 } 115 116 void RenderMeter::updateFromElement() 117 { 118 if (!shadowAttached()) { 119 m_horizontalBarPart = createPart(barPseudoId(HORIZONTAL)); 120 m_horizontalValuePart = createPart(valuePseudoId(HORIZONTAL)); 121 m_verticalBarPart = createPart(barPseudoId(VERTICAL)); 122 m_verticalValuePart = createPart(valuePseudoId(VERTICAL)); 123 } 124 125 m_horizontalBarPart->updateStyleForPart(barPseudoId(HORIZONTAL)); 126 m_horizontalValuePart->updateStyleForPart(valuePseudoId(HORIZONTAL)); 127 m_verticalBarPart->updateStyleForPart(barPseudoId(VERTICAL)); 128 m_verticalValuePart->updateStyleForPart(valuePseudoId(VERTICAL)); 129 RenderIndicator::updateFromElement(); 49 130 } 50 131 … … 63 144 void RenderMeter::layoutParts() 64 145 { 65 // We refresh shadow node here because the state can depend 66 // on the frame size of this render object. 67 updatePartsState(); 68 if (m_valuePart) 69 m_valuePart->layoutAsPart(valuePartRect()); 70 if (m_barPart) 71 m_barPart->layoutAsPart(barPartRect()); 146 m_horizontalBarPart->layoutAsPart(barPartRect()); 147 m_horizontalValuePart->layoutAsPart(valuePartRect(HORIZONTAL)); 148 m_verticalBarPart->layoutAsPart(barPartRect()); 149 m_verticalValuePart->layoutAsPart(valuePartRect(VERTICAL)); 150 151 if (shouldHaveParts()) { 152 if (HORIZONTAL == orientation()) { 153 m_verticalBarPart->hide(); 154 m_verticalValuePart->hide(); 155 m_horizontalBarPart->restoreVisibility(); 156 m_horizontalValuePart->restoreVisibility(); 157 } else { 158 m_verticalBarPart->restoreVisibility(); 159 m_verticalValuePart->restoreVisibility(); 160 m_horizontalBarPart->hide(); 161 m_horizontalValuePart->hide(); 162 } 163 } else { 164 m_verticalBarPart->hide(); 165 m_verticalValuePart->hide(); 166 m_horizontalBarPart->hide(); 167 m_horizontalValuePart->hide(); 168 } 72 169 } 73 170 74 171 bool RenderMeter::shouldHaveParts() const 75 172 { 76 bool hasTheme = theme()->supportsMeter(style()->appearance(), isHorizontal()); 173 EBoxOrient currentOrientation = orientation(); 174 bool hasTheme = theme()->supportsMeter(style()->appearance(), HORIZONTAL == currentOrientation); 77 175 if (!hasTheme) 78 176 return true; 79 bool shadowsHaveStyle = ShadowBlockElement::partShouldHaveStyle(this, barPseudoId( )) || ShadowBlockElement::partShouldHaveStyle(this, valuePseudoId());177 bool shadowsHaveStyle = ShadowBlockElement::partShouldHaveStyle(this, barPseudoId(currentOrientation)) || ShadowBlockElement::partShouldHaveStyle(this, valuePseudoId(currentOrientation)); 80 178 if (shadowsHaveStyle) 81 179 return true; … … 100 198 } 101 199 102 IntRect RenderMeter::valuePartRect( ) const200 IntRect RenderMeter::valuePartRect(EBoxOrient asOrientation) const 103 201 { 104 202 IntRect rect = barPartRect(); 105 203 106 if ( rect.height() <= rect.width()) {204 if (HORIZONTAL == asOrientation) { 107 205 int width = static_cast<int>(rect.width()*valueRatio()); 108 206 if (!style()->isLeftToRightDirection()) { … … 120 218 } 121 219 122 bool RenderMeter::isHorizontal() const220 EBoxOrient RenderMeter::orientation() const 123 221 { 124 222 IntRect rect = barPartRect(); 125 return rect.height() <= rect.width() ;126 } 127 128 PseudoId RenderMeter::valuePseudoId( ) const223 return rect.height() <= rect.width() ? HORIZONTAL : VERTICAL; 224 } 225 226 PseudoId RenderMeter::valuePseudoId(EBoxOrient asOrientation) const 129 227 { 130 228 HTMLMeterElement* element = static_cast<HTMLMeterElement*>(node()); 131 229 132 if ( isHorizontal()) {230 if (HORIZONTAL == asOrientation) { 133 231 switch (element->gaugeRegion()) { 134 232 case HTMLMeterElement::GaugeRegionOptimum: … … 154 252 } 155 253 156 PseudoId RenderMeter::barPseudoId() const 157 { 158 return isHorizontal() ? METER_HORIZONTAL_BAR : METER_VERTICAL_BAR; 159 } 160 161 void RenderMeter::updatePartsState() 162 { 163 if (shouldHaveParts() && !m_barPart) { 164 ASSERT(!m_valuePart); 165 m_barPart = ShadowBlockElement::createForPart(static_cast<HTMLElement*>(node()), barPseudoId()); 166 addChild(m_barPart->renderer()); 167 m_valuePart = ShadowBlockElement::createForPart(static_cast<HTMLElement*>(node()), valuePseudoId()); 168 addChild(m_valuePart->renderer()); 169 } else if (!shouldHaveParts() && m_barPart) { 170 ASSERT(m_valuePart); 171 m_barPart->detach(); 172 m_barPart = 0; 173 m_valuePart->detach(); 174 m_valuePart = 0; 175 } 176 177 if (m_barPart) { 178 ASSERT(m_valuePart); 179 m_barPart->updateStyleForPart(barPseudoId()); 180 m_valuePart->updateStyleForPart(valuePseudoId()); 181 } 254 PseudoId RenderMeter::barPseudoId(EBoxOrient asOrientation) const 255 { 256 return HORIZONTAL == asOrientation ? METER_HORIZONTAL_BAR : METER_VERTICAL_BAR; 182 257 } 183 258 -
trunk/WebCore/rendering/RenderMeter.h
r70440 r73488 31 31 32 32 class HTMLMeterElement; 33 class ShadowBlockElement;33 class MeterPartElement; 34 34 35 35 class RenderMeter : public RenderIndicator { … … 41 41 virtual const char* renderName() const { return "RenderMeter"; } 42 42 virtual bool isMeter() const { return true; } 43 virtual void updateFromElement(); 43 44 virtual void computeLogicalWidth(); 44 45 virtual void computeLogicalHeight(); 45 46 46 47 virtual void layoutParts(); 47 virtual bool shouldHaveParts() const;48 48 49 bool isHorizontal() const; 50 void updatePartsState(); 51 IntRect valuePartRect() const; 52 PseudoId valuePseudoId() const; 53 IntRect barPartRect() const; 54 PseudoId barPseudoId() const; 49 bool shadowAttached() const { return m_horizontalBarPart; } 50 IntRect valuePartRect(EBoxOrient) const; 51 PseudoId valuePseudoId(EBoxOrient) const; 52 IntRect barPartRect() const; 53 PseudoId barPseudoId(EBoxOrient) const; 54 EBoxOrient orientation() const; 55 55 56 double valueRatio() const; 57 bool shouldHaveParts() const; 58 PassRefPtr<MeterPartElement> createPart(PseudoId); 56 59 57 RefPtr<ShadowBlockElement> m_barPart; 58 RefPtr<ShadowBlockElement> m_valuePart; 60 RefPtr<MeterPartElement> m_horizontalBarPart; 61 RefPtr<MeterPartElement> m_horizontalValuePart; 62 RefPtr<MeterPartElement> m_verticalBarPart; 63 RefPtr<MeterPartElement> m_verticalValuePart; 59 64 }; 60 65 -
trunk/WebCore/rendering/RenderProgress.cpp
r68817 r73488 55 55 void RenderProgress::updateFromElement() 56 56 { 57 if (!m_valuePart) { 58 m_valuePart = ShadowBlockElement::createForPart(static_cast<HTMLElement*>(node()), PROGRESS_BAR_VALUE); 59 if (m_valuePart->renderer()) 60 addChild(m_valuePart->renderer()); 61 } 62 63 if (shouldHaveParts()) 64 style()->setAppearance(NoControlPart); 65 else if (m_valuePart->renderer()) 66 m_valuePart->renderer()->style()->setVisibility(HIDDEN); 67 57 68 HTMLProgressElement* element = progressElement(); 58 69 if (m_position == element->position()) … … 91 102 void RenderProgress::layoutParts() 92 103 { 93 updatePartsState(); 94 if (m_valuePart) 95 m_valuePart->layoutAsPart(valuePartRect()); 104 m_valuePart->layoutAsPart(valuePartRect()); 96 105 updateAnimationState(); 97 106 } … … 104 113 return true; 105 114 return false; 106 }107 108 void RenderProgress::updatePartsState()109 {110 if (shouldHaveParts() && !m_valuePart) {111 style()->setAppearance(NoControlPart);112 m_valuePart = ShadowBlockElement::createForPart(static_cast<HTMLElement*>(node()), PROGRESS_BAR_VALUE);113 addChild(m_valuePart->renderer());114 } else if (!shouldHaveParts() && m_valuePart) {115 m_valuePart->detach();116 m_valuePart = 0;117 }118 115 } 119 116 -
trunk/WebCore/rendering/RenderProgress.h
r61376 r73488 51 51 52 52 virtual void layoutParts(); 53 virtual bool shouldHaveParts() const;54 53 55 54 IntRect valuePartRect() const; 55 bool shouldHaveParts() const; 56 56 57 57 void animationTimerFired(Timer<RenderProgress>*); 58 58 void updateAnimationState(); 59 void updatePartsState();60 59 61 60 double m_position; -
trunk/WebCore/rendering/ShadowElement.cpp
r71851 r73488 69 69 PassRefPtr<ShadowBlockElement> ShadowBlockElement::createForPart(HTMLElement* shadowParent, PseudoId pseudoId) 70 70 { 71 RenderObject* parentRenderer = shadowParent->renderer(); 71 RefPtr<ShadowBlockElement> part = create(shadowParent); 72 part->initAsPart(pseudoId); 73 return part.release(); 74 } 75 76 void ShadowBlockElement::initAsPart(PseudoId pseudoId) 77 { 78 RenderObject* parentRenderer = shadowParent()->renderer(); 72 79 RefPtr<RenderStyle> styleForPart = createStyleForPart(parentRenderer, pseudoId); 73 RefPtr<ShadowBlockElement> part = create(shadowParent); 74 part->setRenderer(part->createRenderer(parentRenderer->renderArena(), styleForPart.get())); 75 part->renderer()->setStyle(styleForPart.release()); 76 part->setAttached(); 77 part->setInDocument(); 78 return part.release(); 80 setRenderer(createRenderer(parentRenderer->renderArena(), styleForPart.get())); 81 renderer()->setStyle(styleForPart.release()); 82 setAttached(); 83 setInDocument(); 79 84 } 80 85 -
trunk/WebCore/rendering/ShadowElement.h
r71934 r73488 59 59 static bool partShouldHaveStyle(const RenderObject* parentRenderer, PseudoId pseudoId); 60 60 void layoutAsPart(const IntRect& partRect); 61 v oid updateStyleForPart(PseudoId);61 virtual void updateStyleForPart(PseudoId); 62 62 63 63 protected: 64 64 ShadowBlockElement(HTMLElement*); 65 65 void initAsPart(PseudoId pasuedId); 66 66 private: 67 67 static PassRefPtr<RenderStyle> createStyleForPart(RenderObject*, PseudoId);
Note: See TracChangeset
for help on using the changeset viewer.