Changeset 82589 in webkit
- Timestamp:
- Mar 31, 2011 9:32:03 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 30 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r82588 r82589 1 2011-03-30 MORITA Hajime <morrita@google.com> 2 3 Reviewed by Dimitri Glazkov. 4 5 <meter> can only support horizontal indicator 6 https://bugs.webkit.org/show_bug.cgi?id=56001 7 8 - Simpflied some test cases which had vertical indicators. 9 - Updated expectations due to shadow structure change 10 11 * fast/dom/HTMLMeterElement/meter-element.html: 12 * fast/dom/HTMLMeterElement/meter-styles-changing-pseudo.html: 13 * fast/dom/HTMLMeterElement/meter-styles.html: 14 * platform/mac/fast/dom/HTMLMeterElement/meter-appearances-capacity-expected.txt: 15 * platform/mac/fast/dom/HTMLMeterElement/meter-appearances-rating-relevancy-expected.txt: 16 * platform/mac/fast/dom/HTMLMeterElement/meter-boundary-values-expected.checksum: 17 * platform/mac/fast/dom/HTMLMeterElement/meter-boundary-values-expected.png: 18 * platform/mac/fast/dom/HTMLMeterElement/meter-boundary-values-expected.txt: 19 * platform/mac/fast/dom/HTMLMeterElement/meter-element-expected.checksum: 20 * platform/mac/fast/dom/HTMLMeterElement/meter-element-expected.png: 21 * platform/mac/fast/dom/HTMLMeterElement/meter-element-expected.txt: 22 * platform/mac/fast/dom/HTMLMeterElement/meter-optimums-expected.txt: 23 * platform/mac/fast/dom/HTMLMeterElement/meter-styles-changing-pseudo-expected.checksum: 24 * platform/mac/fast/dom/HTMLMeterElement/meter-styles-changing-pseudo-expected.png: 25 * platform/mac/fast/dom/HTMLMeterElement/meter-styles-changing-pseudo-expected.txt: 26 * platform/mac/fast/dom/HTMLMeterElement/meter-styles-expected.checksum: 27 * platform/mac/fast/dom/HTMLMeterElement/meter-styles-expected.png: 28 * platform/mac/fast/dom/HTMLMeterElement/meter-styles-expected.txt: 29 1 30 2011-03-30 Xiaomei Ji <xji@chromium.org> 2 31 -
trunk/LayoutTests/fast/dom/HTMLMeterElement/meter-element.html
r59541 r82589 1 <html><body><meter min=10 value=30 max=100>30%</meter><meter min=0 value=70 max=100 style="width:10px; height:60px; ">70%</meter></body></html>1 <html><body><meter min=10 value=30 max=100>30%</meter><meter min=0 value=70 max=100 style="width:10px; height:60px; -webkit-writing-mode: vertical-lr;">70%</meter></body></html> -
trunk/LayoutTests/fast/dom/HTMLMeterElement/meter-styles-changing-pseudo.html
r61376 r82589 9 9 // because what we test is side-effect for the the layout and the painting. 10 10 document.documentElement.offsetWidth; 11 document.getElementById("target1").value = 90; 12 document.getElementById("target2").style.height = "100px"; 13 document.getElementById("target3").style.height = "20px"; 11 document.getElementById("target").value = 90; 14 12 if (window.layoutTestController) 15 13 layoutTestController.notifyDone(); … … 17 15 </script> 18 16 <style> 19 meter.styled::-webkit-meter-horizontal-bar { background: gray; } 20 meter.styled::-webkit-meter-horizontal-optimum-value { background: green; } 21 meter.styled::-webkit-meter-horizontal-suboptimal-value { background: yellow; } 22 meter.styled::-webkit-meter-horizontal-even-less-good-value { background: red; } 23 meter.vstyled::-webkit-meter-vertical-bar { background: gray; } 24 meter.vstyled::-webkit-meter-vertical-optimum-value { background: blue; } 25 meter.vstyled::-webkit-meter-vertical-suboptimal-value { background: purple; } 26 meter.vstyled::-webkit-meter-vertical-even-less-good-value { background: white; } 17 meter.styled { -webkit-appearance: none; } 18 meter.styled::-webkit-meter-bar { background: gray; } 19 meter.styled::-webkit-meter-optimum-value { background: green; } 20 meter.styled::-webkit-meter-suboptimal-value { background: yellow; } 21 meter.styled::-webkit-meter-even-less-good-value { background: red; } 27 22 </style> 28 23 </head> 29 24 <body onload="test()"> 30 25 <h1>Dynamically changing pseudo classes</h1> 31 <p>Following meter gauge should be green - Changing the paseudo class by changing value attribute</p> 32 <meter class="styled" id="target1" min="0" max="100" low="30" high="60" optimum="100" value="10" ></meter> 33 <p>Following meter gauge should be blue - Changing the pseudo class by changing direction from horizontal to vertical.</p> 34 <meter class="vstyled" id="target2" style="height:20px; width:80px;" id="target" min="0" max="100" low="30" high="60" optimum="100" value="90" ></meter> 35 <p>Following meter gauge should be native looking green - Changing the pseudo class by changing direction from vertical to horizontal.</p> 36 <meter class="vstyled" id="target3" style="height:100px; width:80px;" id="target" min="0" max="100" low="30" high="60" optimum="100" value="90" ></meter> 26 <p>Following meter gauge should be solid green - Changing the paseudo class by changing value attribute</p> 27 <meter class="styled" id="target" min="0" max="100" low="30" high="60" optimum="100" value="10" ></meter> 37 28 </body> 38 29 </html> -
trunk/LayoutTests/fast/dom/HTMLMeterElement/meter-styles.html
r61376 r82589 11 11 h1, h2 { font-size: medium; } 12 12 li { margin: 0.2em; list-style-type: none; } 13 meter.barstyled::-webkit-meter- horizontal-bar { background: gray; border-style: solid; border-width: 2px; border-color: #222; }14 meter.valstyled::-webkit-meter- horizontal-optimum-value { background: green; border-style: solid; border-width: 2px; border-color: #7c7; }13 meter.barstyled::-webkit-meter-bar { background: gray; border-style: solid; border-width: 2px; border-color: #222; } 14 meter.valstyled::-webkit-meter-optimum-value { background: green; border-style: solid; border-width: 2px; border-color: #7c7; } 15 15 </style> 16 16 </head> … … 18 18 <h2>Horizontal meters with the non-themed default style</h2> 19 19 <ul> 20 <li><meter class="usestyle" min="0" max="100" low="30" high="60" optimum="100" value="25" ></meter></li> 21 <li><meter class="usestyle" min="0" max="100" low="30" high="60" optimum="100" value="45" ></meter></li> 22 <li><meter class="usestyle" min="0" max="100" low="30" high="60" optimum="100" value="75" ></meter></li> 23 </ul> 24 <h2>Vertical meters with the non-themed default style</h2> 25 <ul> 26 <li><meter class="tall" min="0" max="100" low="30" high="60" optimum="100" value="25" ></meter></li> 27 <li><meter class="tall" min="0" max="100" low="30" high="60" optimum="100" value="45" ></meter></li> 28 <li><meter class="tall" min="0" max="100" low="30" high="60" optimum="100" value="75" ></meter></li> 20 <li><meter class="usestyle" min="0" max="100" low="30" high="60" optimum="100" value="25" ></meter> 21 <meter class="usestyle" min="0" max="100" low="30" high="60" optimum="100" value="45" ></meter> 22 <meter class="usestyle" min="0" max="100" low="30" high="60" optimum="100" value="75" ></meter></li> 23 <li><meter class="tall" min="0" max="100" low="30" high="60" optimum="100" value="25" ></meter> 24 <meter class="tall" min="0" max="100" low="30" high="60" optimum="100" value="45" ></meter> 25 <meter class="tall" min="0" max="100" low="30" high="60" optimum="100" value="75" ></meter></li> 29 26 </ul> 30 27 <h2>Providing meter styles</h2> … … 39 36 <div style="background-color: #eee"> 40 37 <ul> 41 <li><meter class="valstyled" min="0" max="100" low="30" high="60" optimum="100" value="80" ></meter> has bar style, should be styled as it has.</li> 42 <li><meter class="barstyled" min="0" max="100" low="30" high="60" optimum="100" value="80" ></meter> has value style, should be styled as it has.</li> 43 <li><meter class="barstyled valstyled" min="0" max="100" low="30" high="60" optimum="100" value="80" ></meter> has both styles, should be styled as it has.</li> 38 default -webkit-appearance, thus should use platform theme (only for Mac.) 39 <li><meter class="valstyled" min="0" max="100" low="30" high="60" optimum="100" value="80" ></meter> has bar style but should ignore it.</li> 40 <li><meter class="barstyled" min="0" max="100" low="30" high="60" optimum="100" value="80" ></meter> has value style but should ignore it.</li> 41 <li><meter class="barstyled valstyled" min="0" max="100" low="30" high="60" optimum="100" value="80" ></meter> has both styles but should ignore them.</li> 42 </ul> 43 44 <ul> 45 -webkit-appearance: none, thus custom styled elements should be shown. 46 <li><meter class="usestyle valstyled" min="0" max="100" low="30" high="60" optimum="100" value="80" ></meter> has bar style, should have solid value part.</li> 47 <li><meter class="usestyle barstyled" min="0" max="100" low="30" high="60" optimum="100" value="80" ></meter> has value style, should be solid bar part.</li> 48 <li><meter class="usestyle barstyled valstyled" min="0" max="100" low="30" high="60" optimum="100" value="80" ></meter> should have solid bar and value part.</li> 44 49 </ul> 45 50 </div> -
trunk/LayoutTests/platform/mac/fast/dom/HTMLMeterElement/meter-appearances-capacity-expected.txt
r73488 r82589 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 80x1820 RenderBlock {DIV} at (0,0) size 80x1821 RenderBlock {DIV} at (0,0) size 80x1822 RenderBlock {DIV} at (0,0) size 80x1823 19 RenderListItem {LI} at (40,18) size 744x18 [bgcolor=#CCCCCC] 24 20 RenderListMarker at (-17,0) size 7x18: bullet … … 26 22 text run at (0,0) width 78: "value=8/10:" 27 23 RenderMeter {METER} at (664,0) size 80x18 28 RenderBlock {DIV} at (0,0) size 80x1829 RenderBlock {DIV} at (0,0) size 64x1830 RenderBlock {DIV} at (0,0) size 80x1831 RenderBlock {DIV} at (0,4) size 80x1432 24 RenderListItem {LI} at (40,36) size 744x18 [bgcolor=#EEEEEE] 33 25 RenderListMarker at (-17,0) size 7x18: bullet … … 35 27 text run at (0,0) width 78: "value=5/10:" 36 28 RenderMeter {METER} at (664,0) size 80x18 37 RenderBlock {DIV} at (0,0) size 80x1838 RenderBlock {DIV} at (0,0) size 40x1839 RenderBlock {DIV} at (0,0) size 80x1840 RenderBlock {DIV} at (0,9) size 80x941 29 RenderListItem {LI} at (40,54) size 744x18 [bgcolor=#CCCCCC] 42 30 RenderListMarker at (-17,0) size 7x18: bullet … … 44 32 text run at (0,0) width 78: "value=2/10:" 45 33 RenderMeter {METER} at (664,0) size 80x18 46 RenderBlock {DIV} at (0,0) size 80x1847 RenderBlock {DIV} at (0,0) size 16x1848 RenderBlock {DIV} at (0,0) size 80x1849 RenderBlock {DIV} at (0,15) size 80x350 34 RenderListItem {LI} at (40,72) size 744x18 [bgcolor=#EEEEEE] 51 35 RenderListMarker at (-17,0) size 7x18: bullet … … 53 37 text run at (0,0) width 78: "value=0/10:" 54 38 RenderMeter {METER} at (664,0) size 80x18 55 RenderBlock {DIV} at (0,0) size 80x1856 RenderBlock {DIV} at (0,0) size 0x1857 RenderBlock {DIV} at (0,0) size 80x1858 RenderBlock {DIV} at (0,18) size 80x059 39 RenderListItem {LI} at (40,90) size 744x18 [bgcolor=#CCCCCC] 60 40 RenderListMarker at (-17,0) size 7x18: bullet … … 62 42 text run at (0,0) width 39: "RTL:" 63 43 RenderMeter {METER} at (664,0) size 80x18 64 RenderBlock {DIV} at (0,0) size 80x1865 RenderBlock {DIV} at (40,0) size 40x1866 RenderBlock {DIV} at (0,0) size 80x1867 RenderBlock {DIV} at (0,9) size 80x968 44 RenderListItem {LI} at (40,108) size 744x50 [bgcolor=#EEEEEE] 69 45 RenderListMarker at (-17,0) size 7x18: bullet … … 71 47 text run at (0,0) width 32: "Tall:" 72 48 RenderMeter {METER} at (664,0) size 80x50 73 RenderBlock {DIV} at (0,0) size 80x5074 RenderBlock {DIV} at (0,0) size 40x5075 RenderBlock {DIV} at (0,0) size 80x5076 RenderBlock {DIV} at (0,25) size 80x2577 49 RenderListItem {LI} at (40,158) size 744x18 [bgcolor=#CCCCCC] 78 50 RenderListMarker at (-17,0) size 7x18: bullet … … 80 52 text run at (0,0) width 43: "Short:" 81 53 RenderMeter {METER} at (664,0) size 80x18 82 RenderBlock {DIV} at (0,0) size 80x1883 RenderBlock {DIV} at (0,0) size 24x1884 RenderBlock {DIV} at (0,0) size 80x1885 RenderBlock {DIV} at (0,13) size 80x586 54 RenderListItem {LI} at (40,176) size 744x18 [bgcolor=#EEEEEE] 87 55 RenderListMarker at (-17,0) size 7x18: bullet … … 89 57 text run at (0,0) width 41: "Wide:" 90 58 RenderMeter {METER} at (444,0) size 300x18 91 RenderBlock {DIV} at (0,0) size 300x1892 RenderBlock {DIV} at (0,0) size 150x1893 RenderBlock {DIV} at (0,0) size 300x1894 RenderBlock {DIV} at (0,9) size 300x995 59 RenderListItem {LI} at (40,194) size 744x18 [bgcolor=#CCCCCC] 96 60 RenderListMarker at (-17,0) size 7x18: bullet … … 98 62 text run at (0,0) width 59: "Narrow:" 99 63 RenderMeter {METER} at (714,0) size 30x18 100 RenderBlock {DIV} at (0,0) size 30x18101 RenderBlock {DIV} at (0,0) size 15x18102 RenderBlock {DIV} at (0,0) size 30x18103 RenderBlock {DIV} at (0,9) size 30x9104 64 RenderBlock {H2} at (0,293) size 784x18 105 65 RenderText {#text} at (0,0) size 236x18 … … 112 72 text run at (0,0) width 86: "value=10/10:" 113 73 RenderMeter {METER} at (664,0) size 80x16 114 RenderBlock {DIV} at (0,0) size 80x16115 RenderBlock {DIV} at (0,0) size 80x16116 RenderBlock {DIV} at (0,0) size 80x16117 RenderBlock {DIV} at (0,0) size 80x16118 74 RenderListItem {LI} at (40,18) size 744x18 [bgcolor=#CCCCCC] 119 75 RenderListMarker at (-17,0) size 7x18: bullet … … 121 77 text run at (0,0) width 78: "value=8/10:" 122 78 RenderMeter {METER} at (664,0) size 80x16 123 RenderBlock {DIV} at (0,0) size 80x16124 RenderBlock {DIV} at (0,0) size 64x16125 RenderBlock {DIV} at (0,0) size 80x16126 RenderBlock {DIV} at (0,4) size 80x12127 79 RenderListItem {LI} at (40,36) size 744x18 [bgcolor=#EEEEEE] 128 80 RenderListMarker at (-17,0) size 7x18: bullet … … 130 82 text run at (0,0) width 78: "value=5/10:" 131 83 RenderMeter {METER} at (664,0) size 80x16 132 RenderBlock {DIV} at (0,0) size 80x16133 RenderBlock {DIV} at (0,0) size 40x16134 RenderBlock {DIV} at (0,0) size 80x16135 RenderBlock {DIV} at (0,8) size 80x8136 84 RenderListItem {LI} at (40,54) size 744x18 [bgcolor=#CCCCCC] 137 85 RenderListMarker at (-17,0) size 7x18: bullet … … 139 87 text run at (0,0) width 78: "value=2/10:" 140 88 RenderMeter {METER} at (664,0) size 80x16 141 RenderBlock {DIV} at (0,0) size 80x16142 RenderBlock {DIV} at (0,0) size 16x16143 RenderBlock {DIV} at (0,0) size 80x16144 RenderBlock {DIV} at (0,13) size 80x3145 89 RenderListItem {LI} at (40,72) size 744x18 [bgcolor=#EEEEEE] 146 90 RenderListMarker at (-17,0) size 7x18: bullet … … 148 92 text run at (0,0) width 78: "value=0/10:" 149 93 RenderMeter {METER} at (664,0) size 80x16 150 RenderBlock {DIV} at (0,0) size 80x16151 RenderBlock {DIV} at (0,0) size 0x16152 RenderBlock {DIV} at (0,0) size 80x16153 RenderBlock {DIV} at (0,16) size 80x0154 94 RenderListItem {LI} at (40,90) size 744x18 [bgcolor=#CCCCCC] 155 95 RenderListMarker at (-17,0) size 7x18: bullet … … 157 97 text run at (0,0) width 39: "RTL:" 158 98 RenderMeter {METER} at (664,0) size 80x16 159 RenderBlock {DIV} at (0,0) size 80x16160 RenderBlock {DIV} at (40,0) size 40x16161 RenderBlock {DIV} at (0,0) size 80x16162 RenderBlock {DIV} at (0,8) size 80x8163 99 RenderListItem {LI} at (40,108) size 744x50 [bgcolor=#EEEEEE] 164 100 RenderListMarker at (-17,0) size 7x18: bullet … … 166 102 text run at (0,0) width 32: "Tall:" 167 103 RenderMeter {METER} at (664,0) size 80x50 168 RenderBlock {DIV} at (0,0) size 80x50169 RenderBlock {DIV} at (0,0) size 40x50170 RenderBlock {DIV} at (0,0) size 80x50171 RenderBlock {DIV} at (0,25) size 80x25172 104 RenderListItem {LI} at (40,158) size 744x18 [bgcolor=#CCCCCC] 173 105 RenderListMarker at (-17,0) size 7x18: bullet … … 175 107 text run at (0,0) width 43: "Short:" 176 108 RenderMeter {METER} at (664,0) size 80x16 177 RenderBlock {DIV} at (0,0) size 80x16178 RenderBlock {DIV} at (0,0) size 24x16179 RenderBlock {DIV} at (0,0) size 80x16180 RenderBlock {DIV} at (0,12) size 80x4181 109 RenderListItem {LI} at (40,176) size 744x18 [bgcolor=#EEEEEE] 182 110 RenderListMarker at (-17,0) size 7x18: bullet … … 184 112 text run at (0,0) width 41: "Wide:" 185 113 RenderMeter {METER} at (444,0) size 300x16 186 RenderBlock {DIV} at (0,0) size 300x16187 RenderBlock {DIV} at (0,0) size 150x16188 RenderBlock {DIV} at (0,0) size 300x16189 RenderBlock {DIV} at (0,8) size 300x8190 114 RenderListItem {LI} at (40,194) size 744x18 [bgcolor=#CCCCCC] 191 115 RenderListMarker at (-17,0) size 7x18: bullet … … 193 117 text run at (0,0) width 59: "Narrow:" 194 118 RenderMeter {METER} at (714,0) size 30x16 195 RenderBlock {DIV} at (0,0) size 30x16196 RenderBlock {DIV} at (0,0) size 15x16197 RenderBlock {DIV} at (0,0) size 30x16198 RenderBlock {DIV} at (0,8) size 30x8 -
trunk/LayoutTests/platform/mac/fast/dom/HTMLMeterElement/meter-appearances-rating-relevancy-expected.txt
r73488 r82589 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 130x1620 RenderBlock {DIV} at (0,0) size 130x1621 RenderBlock {DIV} at (0,0) size 130x1622 RenderBlock {DIV} at (0,0) size 130x1623 19 RenderListItem {LI} at (40,18) size 744x18 [bgcolor=#CCCCCC] 24 20 RenderListMarker at (-17,0) size 7x18: bullet … … 26 22 text run at (0,0) width 78: "value=8/10:" 27 23 RenderMeter {METER} at (614,0) size 130x16 28 RenderBlock {DIV} at (0,0) size 130x1629 RenderBlock {DIV} at (0,0) size 104x1630 RenderBlock {DIV} at (0,0) size 130x1631 RenderBlock {DIV} at (0,4) size 130x1232 24 RenderListItem {LI} at (40,36) size 744x18 [bgcolor=#EEEEEE] 33 25 RenderListMarker at (-17,0) size 7x18: bullet … … 35 27 text run at (0,0) width 78: "value=5/10:" 36 28 RenderMeter {METER} at (614,0) size 130x16 37 RenderBlock {DIV} at (0,0) size 130x1638 RenderBlock {DIV} at (0,0) size 65x1639 RenderBlock {DIV} at (0,0) size 130x1640 RenderBlock {DIV} at (0,8) size 130x841 29 RenderListItem {LI} at (40,54) size 744x18 [bgcolor=#CCCCCC] 42 30 RenderListMarker at (-17,0) size 7x18: bullet … … 44 32 text run at (0,0) width 78: "value=2/10:" 45 33 RenderMeter {METER} at (614,0) size 130x16 46 RenderBlock {DIV} at (0,0) size 130x1647 RenderBlock {DIV} at (0,0) size 26x1648 RenderBlock {DIV} at (0,0) size 130x1649 RenderBlock {DIV} at (0,13) size 130x350 34 RenderListItem {LI} at (40,72) size 744x18 [bgcolor=#EEEEEE] 51 35 RenderListMarker at (-17,0) size 7x18: bullet … … 53 37 text run at (0,0) width 78: "value=0/10:" 54 38 RenderMeter {METER} at (614,0) size 130x16 55 RenderBlock {DIV} at (0,0) size 130x1656 RenderBlock {DIV} at (0,0) size 0x1657 RenderBlock {DIV} at (0,0) size 130x1658 RenderBlock {DIV} at (0,16) size 130x059 39 RenderListItem {LI} at (40,90) size 744x18 [bgcolor=#CCCCCC] 60 40 RenderListMarker at (-17,0) size 7x18: bullet … … 62 42 text run at (0,0) width 39: "RTL:" 63 43 RenderMeter {METER} at (614,0) size 130x16 64 RenderBlock {DIV} at (0,0) size 130x1665 RenderBlock {DIV} at (65,0) size 65x1666 RenderBlock {DIV} at (0,0) size 130x1667 RenderBlock {DIV} at (0,8) size 130x868 44 RenderListItem {LI} at (40,108) size 744x50 [bgcolor=#EEEEEE] 69 45 RenderListMarker at (-17,0) size 7x18: bullet … … 71 47 text run at (0,0) width 32: "Tall:" 72 48 RenderMeter {METER} at (614,0) size 130x50 73 RenderBlock {DIV} at (0,0) size 130x5074 RenderBlock {DIV} at (0,0) size 65x5075 RenderBlock {DIV} at (0,0) size 130x5076 RenderBlock {DIV} at (0,25) size 130x2577 49 RenderListItem {LI} at (40,158) size 744x18 [bgcolor=#CCCCCC] 78 50 RenderListMarker at (-17,0) size 7x18: bullet … … 80 52 text run at (0,0) width 43: "Short:" 81 53 RenderMeter {METER} at (614,0) size 130x13 82 RenderBlock {DIV} at (0,0) size 130x1383 RenderBlock {DIV} at (0,0) size 39x1384 RenderBlock {DIV} at (0,0) size 130x1385 RenderBlock {DIV} at (0,10) size 130x386 54 RenderListItem {LI} at (40,176) size 744x18 [bgcolor=#EEEEEE] 87 55 RenderListMarker at (-17,0) size 7x18: bullet … … 89 57 text run at (0,0) width 41: "Wide:" 90 58 RenderMeter {METER} at (444,0) size 300x16 91 RenderBlock {DIV} at (0,0) size 300x1692 RenderBlock {DIV} at (0,0) size 150x1693 RenderBlock {DIV} at (0,0) size 300x1694 RenderBlock {DIV} at (0,8) size 300x895 59 RenderListItem {LI} at (40,194) size 744x18 [bgcolor=#CCCCCC] 96 60 RenderListMarker at (-17,0) size 7x18: bullet … … 98 62 text run at (0,0) width 59: "Narrow:" 99 63 RenderMeter {METER} at (614,0) size 130x16 100 RenderBlock {DIV} at (0,0) size 130x16101 RenderBlock {DIV} at (0,0) size 65x16102 RenderBlock {DIV} at (0,0) size 130x16103 RenderBlock {DIV} at (0,8) size 130x8104 64 RenderBlock {H2} at (0,293) size 784x18 105 65 RenderText {#text} at (0,0) size 166x18 … … 112 72 text run at (0,0) width 86: "value=10/10:" 113 73 RenderMeter {METER} at (664,0) size 80x16 114 RenderBlock {DIV} at (0,0) size 80x16115 RenderBlock {DIV} at (0,0) size 80x16116 RenderBlock {DIV} at (0,0) size 80x16117 RenderBlock {DIV} at (0,0) size 80x16118 74 RenderListItem {LI} at (40,18) size 744x18 [bgcolor=#CCCCCC] 119 75 RenderListMarker at (-17,0) size 7x18: bullet … … 121 77 text run at (0,0) width 78: "value=8/10:" 122 78 RenderMeter {METER} at (664,0) size 80x16 123 RenderBlock {DIV} at (0,0) size 80x16124 RenderBlock {DIV} at (0,0) size 64x16125 RenderBlock {DIV} at (0,0) size 80x16126 RenderBlock {DIV} at (0,4) size 80x12127 79 RenderListItem {LI} at (40,36) size 744x18 [bgcolor=#EEEEEE] 128 80 RenderListMarker at (-17,0) size 7x18: bullet … … 130 82 text run at (0,0) width 78: "value=5/10:" 131 83 RenderMeter {METER} at (664,0) size 80x16 132 RenderBlock {DIV} at (0,0) size 80x16133 RenderBlock {DIV} at (0,0) size 40x16134 RenderBlock {DIV} at (0,0) size 80x16135 RenderBlock {DIV} at (0,8) size 80x8136 84 RenderListItem {LI} at (40,54) size 744x18 [bgcolor=#CCCCCC] 137 85 RenderListMarker at (-17,0) size 7x18: bullet … … 139 87 text run at (0,0) width 78: "value=2/10:" 140 88 RenderMeter {METER} at (664,0) size 80x16 141 RenderBlock {DIV} at (0,0) size 80x16142 RenderBlock {DIV} at (0,0) size 16x16143 RenderBlock {DIV} at (0,0) size 80x16144 RenderBlock {DIV} at (0,13) size 80x3145 89 RenderListItem {LI} at (40,72) size 744x18 [bgcolor=#EEEEEE] 146 90 RenderListMarker at (-17,0) size 7x18: bullet … … 148 92 text run at (0,0) width 78: "value=0/10:" 149 93 RenderMeter {METER} at (664,0) size 80x16 150 RenderBlock {DIV} at (0,0) size 80x16151 RenderBlock {DIV} at (0,0) size 0x16152 RenderBlock {DIV} at (0,0) size 80x16153 RenderBlock {DIV} at (0,16) size 80x0154 94 RenderListItem {LI} at (40,90) size 744x18 [bgcolor=#CCCCCC] 155 95 RenderListMarker at (-17,0) size 7x18: bullet … … 157 97 text run at (0,0) width 39: "RTL:" 158 98 RenderMeter {METER} at (664,0) size 80x16 159 RenderBlock {DIV} at (0,0) size 80x16160 RenderBlock {DIV} at (40,0) size 40x16161 RenderBlock {DIV} at (0,0) size 80x16162 RenderBlock {DIV} at (0,8) size 80x8163 99 RenderListItem {LI} at (40,108) size 744x50 [bgcolor=#EEEEEE] 164 100 RenderListMarker at (-17,0) size 7x18: bullet … … 166 102 text run at (0,0) width 32: "Tall:" 167 103 RenderMeter {METER} at (664,0) size 80x50 168 RenderBlock {DIV} at (0,0) size 80x50169 RenderBlock {DIV} at (0,0) size 40x50170 RenderBlock {DIV} at (0,0) size 80x50171 RenderBlock {DIV} at (0,25) size 80x25172 104 RenderListItem {LI} at (40,158) size 744x18 [bgcolor=#CCCCCC] 173 105 RenderListMarker at (-17,0) size 7x18: bullet … … 175 107 text run at (0,0) width 43: "Short:" 176 108 RenderMeter {METER} at (664,0) size 80x12 177 RenderBlock {DIV} at (0,0) size 80x12178 RenderBlock {DIV} at (0,0) size 24x12179 RenderBlock {DIV} at (0,0) size 80x12180 RenderBlock {DIV} at (0,9) size 80x3181 109 RenderListItem {LI} at (40,176) size 744x18 [bgcolor=#EEEEEE] 182 110 RenderListMarker at (-17,0) size 7x18: bullet … … 184 112 text run at (0,0) width 41: "Wide:" 185 113 RenderMeter {METER} at (444,0) size 300x16 186 RenderBlock {DIV} at (0,0) size 300x16187 RenderBlock {DIV} at (0,0) size 150x16188 RenderBlock {DIV} at (0,0) size 300x16189 RenderBlock {DIV} at (0,8) size 300x8190 114 RenderListItem {LI} at (40,194) size 744x18 [bgcolor=#CCCCCC] 191 115 RenderListMarker at (-17,0) size 7x18: bullet … … 193 117 text run at (0,0) width 59: "Narrow:" 194 118 RenderMeter {METER} at (714,0) size 30x16 195 RenderBlock {DIV} at (0,0) size 30x16196 RenderBlock {DIV} at (0,0) size 15x16197 RenderBlock {DIV} at (0,0) size 30x16198 RenderBlock {DIV} at (0,8) size 30x8 -
trunk/LayoutTests/platform/mac/fast/dom/HTMLMeterElement/meter-boundary-values-expected.checksum
r70856 r82589 1 4f220d49011c4516ba3c79d5d567d0cf 1 104cc51f8fbcadf2f8cc7a970d32ce7b -
trunk/LayoutTests/platform/mac/fast/dom/HTMLMeterElement/meter-boundary-values-expected.txt
r73488 r82589 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 80x1623 RenderBlock {DIV} at (0,0) size 0x1624 RenderBlock {DIV} at (0,0) size 80x1625 RenderBlock {DIV} at (0,16) size 80x026 22 RenderListItem {LI} at (40,36) size 744x18 27 23 RenderListMarker at (-17,0) size 7x18: bullet … … 32 28 text run at (16,0) width 88: ",20,30,40,50: " 33 29 RenderMeter {METER} at (104,1) size 80x16 34 RenderBlock {DIV} at (0,0) size 80x1635 RenderBlock {DIV} at (0,0) size 0x1636 RenderBlock {DIV} at (0,0) size 80x1637 RenderBlock {DIV} at (0,16) size 80x038 30 RenderListItem {LI} at (40,54) size 744x18 39 31 RenderListMarker at (-17,0) size 7x18: bullet … … 46 38 text run at (36,0) width 68: ",30,40,50: " 47 39 RenderMeter {METER} at (104,1) size 80x16 48 RenderBlock {DIV} at (0,0) size 80x1649 RenderBlock {DIV} at (0,0) size 20x1650 RenderBlock {DIV} at (0,0) size 80x1651 RenderBlock {DIV} at (0,12) size 80x452 40 RenderText {#text} at (184,0) size 110x18 53 41 text run at (184,0) width 110: "(should be green)" … … 62 50 text run at (56,0) width 48: ",40,50: " 63 51 RenderMeter {METER} at (104,1) size 80x16 64 RenderBlock {DIV} at (0,0) size 80x1665 RenderBlock {DIV} at (0,0) size 40x1666 RenderBlock {DIV} at (0,0) size 80x1667 RenderBlock {DIV} at (0,8) size 80x868 52 RenderText {#text} at (184,0) size 110x18 69 53 text run at (184,0) width 110: "(should be green)" … … 78 62 text run at (76,0) width 28: ",50: " 79 63 RenderMeter {METER} at (104,1) size 80x16 80 RenderBlock {DIV} at (0,0) size 80x1681 RenderBlock {DIV} at (0,0) size 60x1682 RenderBlock {DIV} at (0,0) size 80x1683 RenderBlock {DIV} at (0,4) size 80x1284 64 RenderText {#text} at (184,0) size 110x18 85 65 text run at (184,0) width 110: "(should be green)" … … 94 74 text run at (96,0) width 8: ": " 95 75 RenderMeter {METER} at (104,1) size 80x16 96 RenderBlock {DIV} at (0,0) size 80x1697 RenderBlock {DIV} at (0,0) size 80x1698 RenderBlock {DIV} at (0,0) size 80x1699 RenderBlock {DIV} at (0,0) size 80x16100 76 RenderText {#text} at (184,0) size 118x18 101 77 text run at (184,0) width 118: "(should be yellow)" … … 110 86 text run at (115,0) width 8: ": " 111 87 RenderMeter {METER} at (123,1) size 80x16 112 RenderBlock {DIV} at (0,0) size 80x16113 RenderBlock {DIV} at (0,0) size 80x16114 RenderBlock {DIV} at (0,0) size 80x16115 RenderBlock {DIV} at (0,0) size 80x16116 88 RenderText {#text} at (203,0) size 118x18 117 89 text run at (203,0) width 118: "(should be yellow)" … … 126 98 text run at (36,0) width 68: ",30,40,50: " 127 99 RenderMeter {METER} at (104,1) size 80x16 128 RenderBlock {DIV} at (0,0) size 80x16129 RenderBlock {DIV} at (0,0) size 0x16130 RenderBlock {DIV} at (0,0) size 80x16131 RenderBlock {DIV} at (0,16) size 80x0132 100 RenderListItem {LI} at (40,162) size 744x18 133 101 RenderListMarker at (-17,0) size 7x18: bullet … … 140 108 text run at (76,0) width 28: ",40: " 141 109 RenderMeter {METER} at (104,1) size 80x16 142 RenderBlock {DIV} at (0,0) size 80x16143 RenderBlock {DIV} at (0,0) size 80x16144 RenderBlock {DIV} at (0,0) size 80x16145 RenderBlock {DIV} at (0,0) size 80x16146 110 RenderText {#text} at (184,0) size 110x18 147 111 text run at (184,0) width 110: "(should be green)" … … 154 118 text run at (8,0) width 107: "|10,10,10,20,30: " 155 119 RenderMeter {METER} at (115,1) size 80x16 156 RenderBlock {DIV} at (0,0) size 80x16157 RenderBlock {DIV} at (0,0) size 0x16158 RenderBlock {DIV} at (0,0) size 80x16159 RenderBlock {DIV} at (0,16) size 80x0160 120 RenderListItem {LI} at (40,198) size 744x18 161 121 RenderListMarker at (-17,0) size 7x18: bullet … … 168 128 text run at (56,0) width 48: ",20,30: " 169 129 RenderMeter {METER} at (104,1) size 80x16 170 RenderBlock {DIV} at (0,0) size 80x16171 RenderBlock {DIV} at (0,0) size 0x16172 RenderBlock {DIV} at (0,0) size 80x16173 RenderBlock {DIV} at (0,16) size 80x0174 130 RenderListItem {LI} at (40,216) size 744x18 175 131 RenderListMarker at (-17,0) size 7x18: bullet … … 182 138 text run at (56,0) width 48: ",30,30: " 183 139 RenderMeter {METER} at (104,1) size 80x16 184 RenderBlock {DIV} at (0,0) size 80x16185 RenderBlock {DIV} at (0,0) size 80x16186 RenderBlock {DIV} at (0,0) size 80x16187 RenderBlock {DIV} at (0,0) size 80x16188 140 RenderText {#text} at (184,0) size 110x18 189 141 text run at (184,0) width 110: "(should be green)" … … 198 150 text run at (115,0) width 8: ": " 199 151 RenderMeter {METER} at (123,1) size 80x16 200 RenderBlock {DIV} at (0,0) size 80x16201 RenderBlock {DIV} at (0,0) size 80x16202 RenderBlock {DIV} at (0,0) size 80x16203 RenderBlock {DIV} at (0,0) size 80x16204 152 RenderText {#text} at (203,0) size 110x18 205 153 text run at (203,0) width 110: "(should be green)" … … 214 162 text run at (56,0) width 48: ",20,30: " 215 163 RenderMeter {METER} at (104,1) size 80x16 216 RenderBlock {DIV} at (0,0) size 80x16217 RenderBlock {DIV} at (0,0) size 40x16218 RenderBlock {DIV} at (0,0) size 80x16219 RenderBlock {DIV} at (0,8) size 80x8220 164 RenderText {#text} at (184,0) size 110x18 221 165 text run at (184,0) width 110: "(should be green)" -
trunk/LayoutTests/platform/mac/fast/dom/HTMLMeterElement/meter-element-expected.checksum
r61376 r82589 1 c93f96f488bc2787690a58735a062310 1 ae189b55e91ac97b849a6ada7c6221c2 -
trunk/LayoutTests/platform/mac/fast/dom/HTMLMeterElement/meter-element-expected.txt
r73488 r82589 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 80x168 RenderBlock {DIV} at (0,0) size 17x169 RenderBlock {DIV} at (0,0) size 80x1610 RenderBlock {DIV} at (0,13) size 80x311 7 RenderMeter {METER} at (80,0) size 10x60 12 RenderBlock {DIV} at (0,0) size 10x6013 RenderBlock {DIV} at (0,0) size 7x6014 RenderBlock {DIV} at (0,0) size 10x6015 RenderBlock {DIV} at (0,18) size 10x4216 8 RenderText {#text} at (0,0) size 0x0 -
trunk/LayoutTests/platform/mac/fast/dom/HTMLMeterElement/meter-optimums-expected.txt
r73488 r82589 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 80x1622 RenderBlock {DIV} at (0,0) size 20x1623 RenderBlock {DIV} at (0,0) size 80x1624 RenderBlock {DIV} at (0,12) size 80x425 21 RenderListItem {LI} at (40,18) size 744x18 26 22 RenderListMarker at (-17,0) size 7x18: bullet … … 28 24 text run at (0,0) width 75: "value=450: " 29 25 RenderMeter {METER} at (75,1) size 80x16 30 RenderBlock {DIV} at (0,0) size 80x1631 RenderBlock {DIV} at (0,0) size 36x1632 RenderBlock {DIV} at (0,0) size 80x1633 RenderBlock {DIV} at (0,9) size 80x734 26 RenderListItem {LI} at (40,36) size 744x18 35 27 RenderListMarker at (-17,0) size 7x18: bullet … … 37 29 text run at (0,0) width 75: "value=750: " 38 30 RenderMeter {METER} at (75,1) size 80x16 39 RenderBlock {DIV} at (0,0) size 80x1640 RenderBlock {DIV} at (0,0) size 60x1641 RenderBlock {DIV} at (0,0) size 80x1642 RenderBlock {DIV} at (0,4) size 80x1243 31 RenderListItem {LI} at (40,54) size 744x18 44 32 RenderListMarker at (-17,0) size 7x18: bullet … … 46 34 text run at (0,0) width 59: "value=0: " 47 35 RenderMeter {METER} at (59,1) size 80x16 48 RenderBlock {DIV} at (0,0) size 80x1649 RenderBlock {DIV} at (0,0) size 0x1650 RenderBlock {DIV} at (0,0) size 80x1651 RenderBlock {DIV} at (0,16) size 80x052 36 RenderListItem {LI} at (40,72) size 744x18 53 37 RenderListMarker at (-17,0) size 7x18: bullet … … 55 39 text run at (0,0) width 83: "value=1000: " 56 40 RenderMeter {METER} at (83,1) size 80x16 57 RenderBlock {DIV} at (0,0) size 80x1658 RenderBlock {DIV} at (0,0) size 80x1659 RenderBlock {DIV} at (0,0) size 80x1660 RenderBlock {DIV} at (0,0) size 80x1661 41 RenderBlock {H2} at (0,251) size 784x28 62 42 RenderText {#text} at (0,0) size 143x28 … … 68 48 text run at (0,0) width 75: "value=150: " 69 49 RenderMeter {METER} at (75,1) size 80x16 70 RenderBlock {DIV} at (0,0) size 80x1671 RenderBlock {DIV} at (0,0) size 20x1672 RenderBlock {DIV} at (0,0) size 80x1673 RenderBlock {DIV} at (0,12) size 80x474 50 RenderListItem {LI} at (40,18) size 744x18 75 51 RenderListMarker at (-17,0) size 7x18: bullet … … 77 53 text run at (0,0) width 75: "value=450: " 78 54 RenderMeter {METER} at (75,1) size 80x16 79 RenderBlock {DIV} at (0,0) size 80x1680 RenderBlock {DIV} at (0,0) size 36x1681 RenderBlock {DIV} at (0,0) size 80x1682 RenderBlock {DIV} at (0,9) size 80x783 55 RenderListItem {LI} at (40,36) size 744x18 84 56 RenderListMarker at (-17,0) size 7x18: bullet … … 86 58 text run at (0,0) width 75: "value=750: " 87 59 RenderMeter {METER} at (75,1) size 80x16 88 RenderBlock {DIV} at (0,0) size 80x1689 RenderBlock {DIV} at (0,0) size 60x1690 RenderBlock {DIV} at (0,0) size 80x1691 RenderBlock {DIV} at (0,4) size 80x1292 60 RenderListItem {LI} at (40,54) size 744x18 93 61 RenderListMarker at (-17,0) size 7x18: bullet … … 95 63 text run at (0,0) width 59: "value=0: " 96 64 RenderMeter {METER} at (59,1) size 80x16 97 RenderBlock {DIV} at (0,0) size 80x1698 RenderBlock {DIV} at (0,0) size 0x1699 RenderBlock {DIV} at (0,0) size 80x16100 RenderBlock {DIV} at (0,16) size 80x0101 65 RenderListItem {LI} at (40,72) size 744x18 102 66 RenderListMarker at (-17,0) size 7x18: bullet … … 104 68 text run at (0,0) width 83: "value=1000: " 105 69 RenderMeter {METER} at (83,1) size 80x16 106 RenderBlock {DIV} at (0,0) size 80x16107 RenderBlock {DIV} at (0,0) size 80x16108 RenderBlock {DIV} at (0,0) size 80x16109 RenderBlock {DIV} at (0,0) size 80x16110 70 RenderBlock {H2} at (0,407) size 784x28 111 71 RenderText {#text} at (0,0) size 143x28 … … 117 77 text run at (0,0) width 75: "value=150: " 118 78 RenderMeter {METER} at (75,1) size 80x16 119 RenderBlock {DIV} at (0,0) size 80x16120 RenderBlock {DIV} at (0,0) size 20x16121 RenderBlock {DIV} at (0,0) size 80x16122 RenderBlock {DIV} at (0,12) size 80x4123 79 RenderListItem {LI} at (40,18) size 744x18 124 80 RenderListMarker at (-17,0) size 7x18: bullet … … 126 82 text run at (0,0) width 75: "value=450: " 127 83 RenderMeter {METER} at (75,1) size 80x16 128 RenderBlock {DIV} at (0,0) size 80x16129 RenderBlock {DIV} at (0,0) size 36x16130 RenderBlock {DIV} at (0,0) size 80x16131 RenderBlock {DIV} at (0,9) size 80x7132 84 RenderListItem {LI} at (40,36) size 744x18 133 85 RenderListMarker at (-17,0) size 7x18: bullet … … 135 87 text run at (0,0) width 75: "value=750: " 136 88 RenderMeter {METER} at (75,1) size 80x16 137 RenderBlock {DIV} at (0,0) size 80x16138 RenderBlock {DIV} at (0,0) size 60x16139 RenderBlock {DIV} at (0,0) size 80x16140 RenderBlock {DIV} at (0,4) size 80x12141 89 RenderListItem {LI} at (40,54) size 744x18 142 90 RenderListMarker at (-17,0) size 7x18: bullet … … 144 92 text run at (0,0) width 59: "value=0: " 145 93 RenderMeter {METER} at (59,1) size 80x16 146 RenderBlock {DIV} at (0,0) size 80x16147 RenderBlock {DIV} at (0,0) size 0x16148 RenderBlock {DIV} at (0,0) size 80x16149 RenderBlock {DIV} at (0,16) size 80x0150 94 RenderListItem {LI} at (40,72) size 744x18 151 95 RenderListMarker at (-17,0) size 7x18: bullet … … 153 97 text run at (0,0) width 83: "value=1000: " 154 98 RenderMeter {METER} at (83,1) size 80x16 155 RenderBlock {DIV} at (0,0) size 80x16156 RenderBlock {DIV} at (0,0) size 80x16157 RenderBlock {DIV} at (0,0) size 80x16158 RenderBlock {DIV} at (0,0) size 80x16 -
trunk/LayoutTests/platform/mac/fast/dom/HTMLMeterElement/meter-styles-changing-pseudo-expected.checksum
r71073 r82589 1 3c8f610620cf11cc24bb63766220fd9d 1 658368f56fec1048c66ef04bc2318f91 -
trunk/LayoutTests/platform/mac/fast/dom/HTMLMeterElement/meter-styles-changing-pseudo-expected.txt
r73488 r82589 8 8 text run at (0,0) width 507: "Dynamically changing pseudo classes" 9 9 RenderBlock {P} at (0,58) size 784x18 10 RenderText {#text} at (0,0) size 6 13x1811 text run at (0,0) width 6 13: "Following meter gauge should begreen - Changing the paseudo class by changing value attribute"10 RenderText {#text} at (0,0) size 647x18 11 text run at (0,0) width 647: "Following meter gauge should be solid green - Changing the paseudo class by changing value attribute" 12 12 RenderBlock (anonymous) at (0,92) size 784x16 13 13 RenderMeter {METER} at (0,0) size 80x16 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 80x1617 RenderBlock {DIV} at (0,2) size 80x1418 16 RenderText {#text} at (0,0) size 0x0 19 RenderBlock {P} at (0,124) size 784x1820 RenderText {#text} at (0,0) size 735x1821 text run at (0,0) width 735: "Following meter gauge should be blue - Changing the pseudo class by changing direction from horizontal to vertical."22 RenderBlock (anonymous) at (0,158) size 784x10023 RenderMeter {METER} at (0,0) size 80x10024 RenderBlock {DIV} at (0,0) size 80x10025 RenderBlock {DIV} at (0,0) size 72x10026 RenderBlock {DIV} at (0,0) size 80x100 [bgcolor=#808080]27 RenderBlock {DIV} at (0,10) size 80x90 [bgcolor=#0000FF]28 RenderText {#text} at (0,0) size 0x029 RenderBlock {P} at (0,274) size 784x3630 RenderText {#text} at (0,0) size 766x3631 text run at (0,0) width 766: "Following meter gauge should be native looking green - Changing the pseudo class by changing direction from vertical to"32 text run at (0,18) width 67: "horizontal."33 RenderBlock (anonymous) at (0,326) size 784x2034 RenderMeter {METER} at (0,0) size 80x2035 RenderBlock {DIV} at (0,0) size 80x2036 RenderBlock {DIV} at (0,0) size 72x2037 RenderBlock {DIV} at (0,0) size 80x20 [bgcolor=#808080]38 RenderBlock {DIV} at (0,2) size 80x18 [bgcolor=#0000FF]39 RenderText {#text} at (0,0) size 0x0 -
trunk/LayoutTests/platform/mac/fast/dom/HTMLMeterElement/meter-styles-expected.checksum
r71073 r82589 1 53bc2d4916923800a8b64909da91e303 1 68de127fae2b71bbf82c2d53c2787cc1 -
trunk/LayoutTests/platform/mac/fast/dom/HTMLMeterElement/meter-styles-expected.txt
r73488 r82589 7 7 RenderText {#text} at (0,0) size 350x18 8 8 text run at (0,0) width 350: "Horizontal meters with the non-themed default style" 9 RenderBlock {UL} at (3,21) size 778x6 09 RenderBlock {UL} at (3,21) size 778x62 10 10 RenderListItem {LI} at (43,0) size 732x18 11 11 RenderMeter {METER} at (0,1) size 80x16 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 16 RenderListItem {LI} at (43,21) size 732x18 17 RenderMeter {METER} at (0,1) size 80x16 14 RenderText {#text} at (80,0) size 4x18 15 text run at (80,0) width 4: " " 16 RenderMeter {METER} at (84,1) size 80x16 18 17 RenderBlock {DIV} at (0,0) size 80x16 19 18 RenderBlock {DIV} at (0,0) size 36x16 20 RenderBlock {DIV} at (0,0) size 80x16 21 RenderBlock {DIV} at (0,9) size 80x7 22 RenderListItem {LI} at (43,42) size 732x18 23 RenderMeter {METER} at (0,1) size 80x16 19 RenderText {#text} at (164,0) size 4x18 20 text run at (164,0) width 4: " " 21 RenderMeter {METER} at (168,1) size 80x16 24 22 RenderBlock {DIV} at (0,0) size 80x16 25 23 RenderBlock {DIV} at (0,0) size 60x16 26 RenderBlock {DIV} at (0,0) size 80x16 27 RenderBlock {DIV} at (0,4) size 80x12 28 RenderBlock {H2} at (3,84) size 778x18 29 RenderText {#text} at (0,0) size 332x18 30 text run at (0,0) width 332: "Vertical meters with the non-themed default style" 31 RenderBlock {UL} at (3,105) size 778x129 32 RenderListItem {LI} at (43,0) size 732x41 24 RenderListItem {LI} at (43,21) size 732x41 33 25 RenderMeter {METER} at (0,0) size 30x40 34 RenderBlock {DIV} at (0,0) size 30x40 35 RenderBlock {DIV} at (0,0) size 7x40 36 RenderBlock {DIV} at (0,0) size 30x40 37 RenderBlock {DIV} at (0,30) size 30x10 38 RenderListItem {LI} at (43,44) size 732x41 39 RenderMeter {METER} at (0,0) size 30x40 40 RenderBlock {DIV} at (0,0) size 30x40 41 RenderBlock {DIV} at (0,0) size 13x40 42 RenderBlock {DIV} at (0,0) size 30x40 43 RenderBlock {DIV} at (0,22) size 30x18 44 RenderListItem {LI} at (43,88) size 732x41 45 RenderMeter {METER} at (0,0) size 30x40 46 RenderBlock {DIV} at (0,0) size 30x40 47 RenderBlock {DIV} at (0,0) size 22x40 48 RenderBlock {DIV} at (0,0) size 30x40 49 RenderBlock {DIV} at (0,10) size 30x30 50 RenderBlock {H2} at (3,237) size 778x18 26 RenderText {#text} at (30,23) size 4x18 27 text run at (30,23) width 4: " " 28 RenderMeter {METER} at (34,0) size 30x40 29 RenderText {#text} at (64,23) size 4x18 30 text run at (64,23) width 4: " " 31 RenderMeter {METER} at (68,0) size 30x40 32 RenderBlock {H2} at (3,86) size 778x18 51 33 RenderText {#text} at (0,0) size 150x18 52 34 text run at (0,0) width 150: "Providing meter styles" 53 RenderBlock {DIV} at (0, 258) size 784x102 [bgcolor=#EEEEEE]35 RenderBlock {DIV} at (0,107) size 784x102 [bgcolor=#EEEEEE] 54 36 RenderBlock {UL} at (3,0) size 778x102 55 37 RenderListItem {LI} at (43,0) size 732x32 … … 57 39 RenderBlock {DIV} at (100,10) size 80x16 58 40 RenderBlock {DIV} at (100,10) size 64x16 59 RenderBlock {DIV} at (100,10) size 80x1660 RenderBlock {DIV} at (100,14) size 80x1261 41 RenderText {#text} at (230,14) size 70x18 62 42 text run at (230,14) width 70: " has border" … … 65 45 RenderBlock {DIV} at (100,10) size 80x16 66 46 RenderBlock {DIV} at (100,10) size 64x16 67 RenderBlock {DIV} at (100,10) size 80x1668 RenderBlock {DIV} at (100,14) size 80x1269 47 RenderText {#text} at (230,14) size 80x18 70 48 text run at (230,14) width 80: " has padding" … … 73 51 RenderBlock {DIV} at (0,0) size 80x16 74 52 RenderBlock {DIV} at (0,0) size 64x16 75 RenderBlock {DIV} at (0,0) size 80x1676 RenderBlock {DIV} at (0,4) size 80x1277 53 RenderText {#text} at (230,14) size 73x18 78 54 text run at (230,14) width 73: " has margin" 79 RenderBlock {H2} at (3, 363) size 778x1855 RenderBlock {H2} at (3,212) size 778x18 80 56 RenderText {#text} at (0,0) size 224x18 81 57 text run at (0,0) width 224: "Providing bar and/or value styles" 82 RenderBlock {DIV} at (0,384) size 784x60 [bgcolor=#EEEEEE] 83 RenderBlock {UL} at (3,0) size 778x60 84 RenderListItem {LI} at (43,0) size 732x18 58 RenderBlock {DIV} at (0,233) size 784x165 [bgcolor=#EEEEEE] 59 RenderBlock {UL} at (3,0) size 778x81 60 RenderBlock (anonymous) at (40,0) size 738x18 61 RenderText {#text} at (0,0) size 475x18 62 text run at (0,0) width 475: "default -webkit-appearance, thus should use platform theme (only for Mac.)" 63 RenderListItem {LI} at (43,21) size 732x18 64 RenderMeter {METER} at (0,1) size 80x16 65 RenderText {#text} at (80,0) size 212x18 66 text run at (80,0) width 212: " has bar style but should ignore it." 67 RenderListItem {LI} at (43,42) size 732x18 68 RenderMeter {METER} at (0,1) size 80x16 69 RenderText {#text} at (80,0) size 226x18 70 text run at (80,0) width 226: " has value style but should ignore it." 71 RenderListItem {LI} at (43,63) size 732x18 72 RenderMeter {METER} at (0,1) size 80x16 73 RenderText {#text} at (80,0) size 249x18 74 text run at (80,0) width 249: " has both styles but should ignore them." 75 RenderBlock {UL} at (3,84) size 778x81 76 RenderBlock (anonymous) at (40,0) size 738x18 77 RenderText {#text} at (0,0) size 461x18 78 text run at (0,0) width 461: "-webkit-appearance: none, thus custom styled elements should be shown." 79 RenderListItem {LI} at (43,21) size 732x18 85 80 RenderMeter {METER} at (0,1) size 80x16 86 81 RenderBlock {DIV} at (0,0) size 80x16 87 82 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 90 RenderText {#text} at (80,0) size 250x18 91 text run at (80,0) width 250: " has bar style, should be styled as it has." 92 RenderListItem {LI} at (43,21) size 732x18 83 RenderText {#text} at (80,0) size 270x18 84 text run at (80,0) width 270: " has bar style, should have solid value part." 85 RenderListItem {LI} at (43,42) size 732x18 93 86 RenderMeter {METER} at (0,1) size 80x16 94 87 RenderBlock {DIV} at (0,0) size 80x16 [bgcolor=#808080] [border: (2px solid #222222)] 95 88 RenderBlock {DIV} at (0,0) size 64x16 96 RenderBlock {DIV} at (0,0) size 80x16 97 RenderBlock {DIV} at (0,4) size 80x12 98 RenderText {#text} at (80,0) size 264x18 99 text run at (80,0) width 264: " has value style, should be styled as it has." 100 RenderListItem {LI} at (43,42) size 732x18 89 RenderText {#text} at (80,0) size 255x18 90 text run at (80,0) width 255: " has value style, should be solid bar part." 91 RenderListItem {LI} at (43,63) size 732x18 101 92 RenderMeter {METER} at (0,1) size 80x16 102 93 RenderBlock {DIV} at (0,0) size 80x16 [bgcolor=#808080] [border: (2px solid #222222)] 103 94 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 106 RenderText {#text} at (80,0) size 264x18 107 text run at (80,0) width 264: " has both styles, should be styled as it has." 108 RenderBlock {H2} at (3,447) size 778x18 95 RenderText {#text} at (80,0) size 235x18 96 text run at (80,0) width 235: " should have solid bar and value part." 97 RenderBlock {H2} at (3,401) size 778x18 109 98 RenderText {#text} at (0,0) size 156x18 110 99 text run at (0,0) width 156: "Providing appearances" 111 RenderBlock {DIV} at (0,4 68) size 784x39 [bgcolor=#EEEEEE]100 RenderBlock {DIV} at (0,422) size 784x39 [bgcolor=#EEEEEE] 112 101 RenderBlock {UL} at (3,0) size 778x39 113 102 RenderListItem {LI} at (43,0) size 732x18 … … 115 104 RenderBlock {DIV} at (0,0) size 80x16 116 105 RenderBlock {DIV} at (0,0) size 64x16 117 RenderBlock {DIV} at (0,0) size 80x16118 RenderBlock {DIV} at (0,4) size 80x12119 106 RenderText {#text} at (80,0) size 375x18 120 107 text run at (80,0) width 375: " has \"none\" appearance, should be styled with default style." 121 108 RenderListItem {LI} at (43,21) size 732x18 122 109 RenderMeter {METER} at (0,1) size 80x16 123 RenderBlock {DIV} at (0,0) size 80x16124 RenderBlock {DIV} at (0,0) size 64x16125 RenderBlock {DIV} at (0,0) size 80x16126 RenderBlock {DIV} at (0,4) size 80x12127 110 RenderText {#text} at (80,0) size 276x18 128 111 text run at (80,0) width 276: " has \"meter\" appearance, should be themed." -
trunk/Source/WebCore/ChangeLog
r82588 r82589 1 2011-03-30 MORITA Hajime <morrita@google.com> 2 3 Reviewed by Dimitri Glazkov. 4 5 <meter> can only support horizontal indicator 6 https://bugs.webkit.org/show_bug.cgi?id=56001 7 8 - Removed code which deals with the direction and 9 left the horizontal path. 10 - Removed "horizontal" from related names which is now 11 redundant. 12 13 * css/CSSSelector.cpp: 14 (WebCore::CSSSelector::pseudoId): 15 (WebCore::nameToPseudoTypeMap): 16 (WebCore::CSSSelector::extractPseudoType): 17 * css/CSSSelector.h: 18 * css/html.css: 19 (meter::-webkit-meter-bar): 20 (meter::-webkit-meter-optimum-value): 21 (meter::-webkit-meter-suboptimal-value): 22 (meter::-webkit-meter-even-less-good-value): 23 * rendering/RenderMeter.cpp: 24 (WebCore::RenderMeter::~RenderMeter): 25 (WebCore::RenderMeter::createPart): 26 (WebCore::RenderMeter::updateFromElement): 27 (WebCore::RenderMeter::layoutParts): 28 (WebCore::RenderMeter::styleDidChange): 29 (WebCore::RenderMeter::shouldHaveParts): 30 (WebCore::RenderMeter::valuePartRect): 31 (WebCore::RenderMeter::valuePseudoId): 32 (WebCore::RenderMeter::barPseudoId): 33 (WebCore::RenderMeter::detachShadows): 34 (WebCore::RenderMeter::updateShadows): 35 * rendering/RenderMeter.h: 36 (WebCore::RenderMeter::shadowAttached): 37 * rendering/RenderTheme.cpp: 38 (WebCore::RenderTheme::supportsMeter): 39 * rendering/RenderTheme.h: 40 * rendering/RenderThemeMac.h: 41 * rendering/RenderThemeMac.mm: 42 (WebCore::RenderThemeMac::paintMeter): 43 (WebCore::RenderThemeMac::supportsMeter): 44 * rendering/style/RenderStyleConstants.h: 45 1 46 2011-03-30 Xiaomei Ji <xji@chromium.org> 2 47 -
trunk/Source/WebCore/css/CSSSelector.cpp
r81845 r82589 162 162 return OUTER_SPIN_BUTTON; 163 163 #if ENABLE(METER_TAG) 164 case PseudoMeterHorizontalBar: 165 return METER_HORIZONTAL_BAR; 166 case PseudoMeterHorizontalOptimum: 167 return METER_HORIZONTAL_OPTIMUM; 168 case PseudoMeterHorizontalSuboptimal: 169 return METER_HORIZONTAL_SUBOPTIMAL; 170 case PseudoMeterHorizontalEvenLessGood: 171 return METER_HORIZONTAL_EVEN_LESS_GOOD; 172 case PseudoMeterVerticalBar: 173 return METER_VERTICAL_BAR; 174 case PseudoMeterVerticalOptimum: 175 return METER_VERTICAL_OPTIMUM; 176 case PseudoMeterVerticalSuboptimal: 177 return METER_VERTICAL_SUBOPTIMAL; 178 case PseudoMeterVerticalEvenLessGood: 179 return METER_VERTICAL_EVEN_LESS_GOOD; 164 case PseudoMeterBar: 165 return METER_BAR; 166 case PseudoMeterOptimum: 167 return METER_OPTIMUM; 168 case PseudoMeterSuboptimal: 169 return METER_SUBOPTIMAL; 170 case PseudoMeterEvenLessGood: 171 return METER_EVEN_LESS_GOOD; 180 172 #else 181 case PseudoMeterHorizontalBar: 182 case PseudoMeterHorizontalOptimum: 183 case PseudoMeterHorizontalSuboptimal: 184 case PseudoMeterHorizontalEvenLessGood: 185 case PseudoMeterVerticalBar: 186 case PseudoMeterVerticalOptimum: 187 case PseudoMeterVerticalSuboptimal: 188 case PseudoMeterVerticalEvenLessGood: 173 case PseudoMeterBar: 174 case PseudoMeterOptimum: 175 case PseudoMeterSuboptimal: 176 case PseudoMeterEvenLessGood: 189 177 ASSERT_NOT_REACHED(); 190 178 return NOPSEUDO; … … 317 305 DEFINE_STATIC_LOCAL(AtomicString, outerSpinButton, ("-webkit-outer-spin-button")); 318 306 #if ENABLE(METER_TAG) 319 DEFINE_STATIC_LOCAL(AtomicString, meterHorizontalBar, ("-webkit-meter-horizontal-bar")); 320 DEFINE_STATIC_LOCAL(AtomicString, meterHorizontalOptimumValue, ("-webkit-meter-horizontal-optimum-value")); 321 DEFINE_STATIC_LOCAL(AtomicString, meterHorizontalSuboptimalValue, ("-webkit-meter-horizontal-suboptimal-value")); 322 DEFINE_STATIC_LOCAL(AtomicString, meterHorizontalEvenLessGoodValue, ("-webkit-meter-horizontal-even-less-good-value")); 323 DEFINE_STATIC_LOCAL(AtomicString, meterVerticalBar, ("-webkit-meter-vertical-bar")); 324 DEFINE_STATIC_LOCAL(AtomicString, meterVerticalOptimumValue, ("-webkit-meter-vertical-optimum-value")); 325 DEFINE_STATIC_LOCAL(AtomicString, meterVerticalSuboptimalValue, ("-webkit-meter-vertical-suboptimal-value")); 326 DEFINE_STATIC_LOCAL(AtomicString, meterVerticalEvenLessGoodValue, ("-webkit-meter-vertical-even-less-good-value")); 307 DEFINE_STATIC_LOCAL(AtomicString, meterBar, ("-webkit-meter-bar")); 308 DEFINE_STATIC_LOCAL(AtomicString, meterOptimumValue, ("-webkit-meter-optimum-value")); 309 DEFINE_STATIC_LOCAL(AtomicString, meterSuboptimalValue, ("-webkit-meter-suboptimal-value")); 310 DEFINE_STATIC_LOCAL(AtomicString, meterEvenLessGoodValue, ("-webkit-meter-even-less-good-value")); 327 311 #endif 328 312 … … 415 399 nameToPseudoType->set(outerSpinButton.impl(), CSSSelector::PseudoOuterSpinButton); 416 400 #if ENABLE(METER_TAG) 417 nameToPseudoType->set(meterHorizontalBar.impl(), CSSSelector::PseudoMeterHorizontalBar); 418 nameToPseudoType->set(meterHorizontalOptimumValue.impl(), CSSSelector::PseudoMeterHorizontalOptimum); 419 nameToPseudoType->set(meterHorizontalSuboptimalValue.impl(), CSSSelector::PseudoMeterHorizontalSuboptimal); 420 nameToPseudoType->set(meterHorizontalEvenLessGoodValue.impl(), CSSSelector::PseudoMeterHorizontalEvenLessGood); 421 nameToPseudoType->set(meterVerticalBar.impl(), CSSSelector::PseudoMeterVerticalBar); 422 nameToPseudoType->set(meterVerticalOptimumValue.impl(), CSSSelector::PseudoMeterVerticalOptimum); 423 nameToPseudoType->set(meterVerticalSuboptimalValue.impl(), CSSSelector::PseudoMeterVerticalSuboptimal); 424 nameToPseudoType->set(meterVerticalEvenLessGoodValue.impl(), CSSSelector::PseudoMeterVerticalEvenLessGood); 401 nameToPseudoType->set(meterBar.impl(), CSSSelector::PseudoMeterBar); 402 nameToPseudoType->set(meterOptimumValue.impl(), CSSSelector::PseudoMeterOptimum); 403 nameToPseudoType->set(meterSuboptimalValue.impl(), CSSSelector::PseudoMeterSuboptimal); 404 nameToPseudoType->set(meterEvenLessGoodValue.impl(), CSSSelector::PseudoMeterEvenLessGood); 425 405 #endif 426 406 nameToPseudoType->set(root.impl(), CSSSelector::PseudoRoot); … … 498 478 #endif 499 479 case PseudoInnerSpinButton: 500 case PseudoMeterHorizontalBar: 501 case PseudoMeterHorizontalOptimum: 502 case PseudoMeterHorizontalSuboptimal: 503 case PseudoMeterHorizontalEvenLessGood: 504 case PseudoMeterVerticalBar: 505 case PseudoMeterVerticalOptimum: 506 case PseudoMeterVerticalSuboptimal: 507 case PseudoMeterVerticalEvenLessGood: 480 case PseudoMeterBar: 481 case PseudoMeterOptimum: 482 case PseudoMeterSuboptimal: 483 case PseudoMeterEvenLessGood: 508 484 case PseudoOuterSpinButton: 509 485 case PseudoResizer: -
trunk/Source/WebCore/css/CSSSelector.h
r81845 r82589 183 183 PseudoSearchResultsDecoration, 184 184 PseudoSearchResultsButton, 185 PseudoMeterHorizontalBar, 186 PseudoMeterVerticalBar, 187 PseudoMeterHorizontalOptimum, 188 PseudoMeterHorizontalSuboptimal, 189 PseudoMeterHorizontalEvenLessGood, 190 PseudoMeterVerticalOptimum, 191 PseudoMeterVerticalSuboptimal, 192 PseudoMeterVerticalEvenLessGood, 185 PseudoMeterBar, 186 PseudoMeterOptimum, 187 PseudoMeterSuboptimal, 188 PseudoMeterEvenLessGood, 193 189 PseudoInputListButton, 194 190 #if ENABLE(INPUT_SPEECH) -
trunk/Source/WebCore/css/html.css
r82400 r82589 684 684 } 685 685 686 meter::-webkit-meter- horizontal-bar {686 meter::-webkit-meter-bar { 687 687 -webkit-appearance: meter; 688 688 background: -webkit-gradient(linear, left top, left bottom, from(#ddd), to(#ddd), color-stop(0.20, #eee), color-stop(0.45, #ccc), color-stop(0.55, #ccc)); 689 689 } 690 690 691 meter::-webkit-meter-vertical-bar { 692 -webkit-appearance: meter; 693 background: -webkit-gradient(linear, left top, right top, from(#ddd), to(#ddd), color-stop(0.20, #eee), color-stop(0.45, #ccc), color-stop(0.55, #ccc)); 694 } 695 696 meter::-webkit-meter-horizontal-optimum-value { 691 meter::-webkit-meter-optimum-value { 697 692 -webkit-appearance: meter; 698 693 background: -webkit-gradient(linear, left top, left bottom, from(#ad7), to(#ad7), color-stop(0.20, #cea), color-stop(0.45, #7a3), color-stop(0.55, #7a3)); 699 694 } 700 695 701 meter::-webkit-meter- horizontal-suboptimal-value {696 meter::-webkit-meter-suboptimal-value { 702 697 -webkit-appearance: meter; 703 698 background: -webkit-gradient(linear, left top, left bottom, from(#fe7), to(#fe7), color-stop(0.20, #ffc), color-stop(0.45, #db3), color-stop(0.55, #db3)); 704 699 } 705 700 706 meter::-webkit-meter- horizontal-even-less-good-value {701 meter::-webkit-meter-even-less-good-value { 707 702 -webkit-appearance: meter; 708 703 background: -webkit-gradient(linear, left top, left bottom, from(#f77), to(#f77), color-stop(0.20, #fcc), color-stop(0.45, #d44), color-stop(0.55, #d44)); 709 }710 711 meter::-webkit-meter-vertical-optimum-value {712 -webkit-appearance: meter;713 background: -webkit-gradient(linear, left top, right top, from(#ad7), to(#ad7), color-stop(0.20, #cea), color-stop(0.45, #7a3), color-stop(0.55, #7a3));714 }715 716 meter::-webkit-meter-vertical-suboptimal-value {717 -webkit-appearance: meter;718 background: -webkit-gradient(linear, left top, right top, from(#fe7), to(#fe7), color-stop(0.20, #ffc), color-stop(0.45, #db3), color-stop(0.55, #db3));719 }720 721 meter::-webkit-meter-vertical-even-less-good-value {722 -webkit-appearance: meter;723 background: -webkit-gradient(linear, left top, right top, from(#f77), to(#f77), color-stop(0.20, #fcc), color-stop(0.45, #d44), color-stop(0.55, #d44));724 704 } 725 705 -
trunk/Source/WebCore/rendering/RenderMeter.cpp
r78150 r82589 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 93 38 RenderMeter::RenderMeter(HTMLMeterElement* element) 94 39 : RenderIndicator(element) … … 98 43 RenderMeter::~RenderMeter() 99 44 { 100 if (shadowAttached()) { 101 m_verticalValuePart->detach(); 102 m_verticalBarPart->detach(); 103 m_horizontalValuePart->detach(); 104 m_horizontalBarPart->detach(); 105 } 45 detachShadows(); 106 46 } 107 47 108 PassRefPtr< MeterPartElement> RenderMeter::createPart(PseudoId pseudoId)48 PassRefPtr<ShadowBlockElement> RenderMeter::createPart(PseudoId pseudoId) 109 49 { 110 RefPtr< MeterPartElement> element = MeterPartElement::createForPart(toHTMLElement(node()), pseudoId);50 RefPtr<ShadowBlockElement> element = ShadowBlockElement::createForPart(toHTMLElement(node()), pseudoId); 111 51 if (element->renderer()) 112 52 addChild(element->renderer()); … … 116 56 void RenderMeter::updateFromElement() 117 57 { 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)); 58 updateShadows(); 129 59 RenderIndicator::updateFromElement(); 130 60 } … … 144 74 void RenderMeter::layoutParts() 145 75 { 146 m_horizontalBarPart->layoutAsPart(barPartRect()); 147 m_horizontalValuePart->layoutAsPart(valuePartRect(HORIZONTAL)); 148 m_verticalBarPart->layoutAsPart(barPartRect()); 149 m_verticalValuePart->layoutAsPart(valuePartRect(VERTICAL)); 76 if (shadowAttached()) { 77 m_barPart->layoutAsPart(barPartRect()); 78 m_valuePart->layoutAsPart(valuePartRect()); 79 } 80 } 150 81 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(); 82 void RenderMeter::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle) 83 { 84 RenderBlock::styleDidChange(diff, oldStyle); 85 86 if (!oldStyle) 87 return; 88 89 if (oldStyle->appearance() != style()->appearance()) { 90 detachShadows(); 91 updateShadows(); 168 92 } 169 93 } … … 171 95 bool RenderMeter::shouldHaveParts() const 172 96 { 173 EBoxOrient currentOrientation = orientation(); 174 bool hasTheme = theme()->supportsMeter(style()->appearance(), HORIZONTAL == currentOrientation); 175 if (!hasTheme) 176 return true; 177 bool shadowsHaveStyle = ShadowBlockElement::partShouldHaveStyle(this, barPseudoId(currentOrientation)) || ShadowBlockElement::partShouldHaveStyle(this, valuePseudoId(currentOrientation)); 178 if (shadowsHaveStyle) 179 return true; 180 return false; 97 return !theme()->supportsMeter(style()->appearance()); 181 98 } 182 99 … … 198 115 } 199 116 200 IntRect RenderMeter::valuePartRect( EBoxOrient asOrientation) const117 IntRect RenderMeter::valuePartRect() const 201 118 { 202 119 IntRect rect = barPartRect(); 203 204 if (HORIZONTAL == asOrientation) { 205 int width = static_cast<int>(rect.width()*valueRatio()); 206 if (!style()->isLeftToRightDirection()) { 207 rect.setX(rect.x() + (rect.width() - width)); 208 rect.setWidth(width); 209 } else 210 rect.setWidth(width); 211 } else { 212 int height = static_cast<int>(rect.height()*valueRatio()); 213 rect.setY(rect.y() + (rect.height() - height)); 214 rect.setHeight(height); 215 } 120 int width = static_cast<int>(rect.width()*valueRatio()); 121 if (!style()->isLeftToRightDirection()) { 122 rect.setX(rect.x() + (rect.width() - width)); 123 rect.setWidth(width); 124 } else 125 rect.setWidth(width); 216 126 217 127 return rect; 218 128 } 219 129 220 EBoxOrient RenderMeter::orientation() const 221 { 222 IntRect rect = barPartRect(); 223 return rect.height() <= rect.width() ? HORIZONTAL : VERTICAL; 224 } 225 226 PseudoId RenderMeter::valuePseudoId(EBoxOrient asOrientation) const 130 PseudoId RenderMeter::valuePseudoId() const 227 131 { 228 132 HTMLMeterElement* element = static_cast<HTMLMeterElement*>(node()); 229 133 230 if (HORIZONTAL == asOrientation) { 231 switch (element->gaugeRegion()) { 232 case HTMLMeterElement::GaugeRegionOptimum: 233 return METER_HORIZONTAL_OPTIMUM; 234 case HTMLMeterElement::GaugeRegionSuboptimal: 235 return METER_HORIZONTAL_SUBOPTIMAL; 236 case HTMLMeterElement::GaugeRegionEvenLessGood: 237 return METER_HORIZONTAL_EVEN_LESS_GOOD; 238 } 239 } else { 240 switch (element->gaugeRegion()) { 241 case HTMLMeterElement::GaugeRegionOptimum: 242 return METER_VERTICAL_OPTIMUM; 243 case HTMLMeterElement::GaugeRegionSuboptimal: 244 return METER_VERTICAL_SUBOPTIMAL; 245 case HTMLMeterElement::GaugeRegionEvenLessGood: 246 return METER_VERTICAL_EVEN_LESS_GOOD; 247 } 134 switch (element->gaugeRegion()) { 135 case HTMLMeterElement::GaugeRegionOptimum: 136 return METER_OPTIMUM; 137 case HTMLMeterElement::GaugeRegionSuboptimal: 138 return METER_SUBOPTIMAL; 139 case HTMLMeterElement::GaugeRegionEvenLessGood: 140 return METER_EVEN_LESS_GOOD; 248 141 } 249 142 … … 252 145 } 253 146 254 PseudoId RenderMeter::barPseudoId( EBoxOrient asOrientation) const147 PseudoId RenderMeter::barPseudoId() const 255 148 { 256 return HORIZONTAL == asOrientation ? METER_HORIZONTAL_BAR : METER_VERTICAL_BAR; 149 return METER_BAR; 150 } 151 152 void RenderMeter::detachShadows() 153 { 154 if (shadowAttached()) { 155 m_valuePart->detach(); 156 m_valuePart = 0; 157 m_barPart->detach(); 158 m_barPart = 0; 159 } 160 } 161 162 void RenderMeter::updateShadows() 163 { 164 if (!shadowAttached() && shouldHaveParts()) { 165 m_barPart = createPart(barPseudoId()); 166 m_valuePart = createPart(valuePseudoId()); 167 } 168 169 if (shadowAttached()) { 170 m_barPart->updateStyleForPart(barPseudoId()); 171 m_valuePart->updateStyleForPart(valuePseudoId()); 172 } 257 173 } 258 174 -
trunk/Source/WebCore/rendering/RenderMeter.h
r73488 r82589 31 31 32 32 class HTMLMeterElement; 33 class MeterPartElement;33 class ShadowBlockElement; 34 34 35 35 class RenderMeter : public RenderIndicator { … … 46 46 47 47 virtual void layoutParts(); 48 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle); 48 49 49 bool shadowAttached() const { return m_horizontalBarPart; } 50 IntRect valuePartRect(EBoxOrient) const; 51 PseudoId valuePseudoId(EBoxOrient) const; 50 void updateShadows(); 51 void detachShadows(); 52 53 bool shadowAttached() const { return m_barPart; } 54 IntRect valuePartRect() const; 55 PseudoId valuePseudoId() const; 52 56 IntRect barPartRect() const; 53 PseudoId barPseudoId(EBoxOrient) const; 54 EBoxOrient orientation() const; 57 PseudoId barPseudoId() const; 55 58 56 59 double valueRatio() const; 57 60 bool shouldHaveParts() const; 58 PassRefPtr< MeterPartElement> createPart(PseudoId);61 PassRefPtr<ShadowBlockElement> createPart(PseudoId); 59 62 60 RefPtr<MeterPartElement> m_horizontalBarPart; 61 RefPtr<MeterPartElement> m_horizontalValuePart; 62 RefPtr<MeterPartElement> m_verticalBarPart; 63 RefPtr<MeterPartElement> m_verticalValuePart; 63 RefPtr<ShadowBlockElement> m_barPart; 64 RefPtr<ShadowBlockElement> m_valuePart; 64 65 }; 65 66 -
trunk/Source/WebCore/rendering/RenderTheme.cpp
r80811 r82589 965 965 } 966 966 967 bool RenderTheme::supportsMeter(ControlPart , bool) const967 bool RenderTheme::supportsMeter(ControlPart) const 968 968 { 969 969 return false; -
trunk/Source/WebCore/rendering/RenderTheme.h
r82053 r82589 197 197 #if ENABLE(METER_TAG) 198 198 virtual IntSize meterSizeForBounds(const RenderMeter*, const IntRect&) const; 199 virtual bool supportsMeter(ControlPart , bool isHorizontal) const;199 virtual bool supportsMeter(ControlPart) const; 200 200 #endif 201 201 -
trunk/Source/WebCore/rendering/RenderThemeMac.h
r82053 r82589 84 84 virtual IntSize meterSizeForBounds(const RenderMeter*, const IntRect&) const; 85 85 virtual bool paintMeter(RenderObject*, const PaintInfo&, const IntRect&); 86 virtual bool supportsMeter(ControlPart , bool isHorizontal) const;86 virtual bool supportsMeter(ControlPart) const; 87 87 #endif 88 88 -
trunk/Source/WebCore/rendering/RenderThemeMac.mm
r82057 r82589 831 831 LocalCurrentGraphicsContext localContext(paintInfo.context); 832 832 833 // Becaue NSLevelIndicatorCell doesn't support vertical gauge, we use a portable version834 if (rect.width() < rect.height())835 return RenderTheme::paintMeter(renderObject, paintInfo, rect);836 837 833 NSLevelIndicatorCell* cell = levelIndicatorFor(toRenderMeter(renderObject)); 838 834 paintInfo.context->save(); … … 844 840 } 845 841 846 bool RenderThemeMac::supportsMeter(ControlPart part , bool isHorizontal) const842 bool RenderThemeMac::supportsMeter(ControlPart part) const 847 843 { 848 844 switch (part) { … … 852 848 case MeterPart: 853 849 case ContinuousCapacityLevelIndicatorPart: 854 return isHorizontal;850 return true; 855 851 default: 856 852 return false; -
trunk/Source/WebCore/rendering/style/RenderStyleConstants.h
r82482 r82589 73 73 SCROLLBAR_THUMB, SCROLLBAR_BUTTON, SCROLLBAR_TRACK, SCROLLBAR_TRACK_PIECE, SCROLLBAR_CORNER, RESIZER, 74 74 INPUT_LIST_BUTTON, INPUT_SPEECH_BUTTON, INNER_SPIN_BUTTON, OUTER_SPIN_BUTTON, VISITED_LINK, 75 METER_HORIZONTAL_BAR, METER_HORIZONTAL_OPTIMUM, METER_HORIZONTAL_SUBOPTIMAL, METER_HORIZONTAL_EVEN_LESS_GOOD, 76 METER_VERTICAL_BAR, METER_VERTICAL_OPTIMUM, METER_VERTICAL_SUBOPTIMAL, METER_VERTICAL_EVEN_LESS_GOOD, 75 METER_BAR, METER_OPTIMUM, METER_SUBOPTIMAL, METER_EVEN_LESS_GOOD, 77 76 AFTER_LAST_INTERNAL_PSEUDOID, 78 77 FULL_SCREEN, FULL_SCREEN_DOCUMENT,
Note: See TracChangeset
for help on using the changeset viewer.