Changeset 82589 in webkit


Ignore:
Timestamp:
Mar 31, 2011 9:32:03 AM (13 years ago)
Author:
morrita@google.com
Message:

2011-03-30 MORITA Hajime <morrita@google.com>

Reviewed by Dimitri Glazkov.

<meter> can only support horizontal indicator
https://bugs.webkit.org/show_bug.cgi?id=56001

  • Simpflied some test cases which had vertical indicators.
  • Updated expectations due to shadow structure change
  • fast/dom/HTMLMeterElement/meter-element.html:
  • fast/dom/HTMLMeterElement/meter-styles-changing-pseudo.html:
  • fast/dom/HTMLMeterElement/meter-styles.html:
  • platform/mac/fast/dom/HTMLMeterElement/meter-appearances-capacity-expected.txt:
  • platform/mac/fast/dom/HTMLMeterElement/meter-appearances-rating-relevancy-expected.txt:
  • platform/mac/fast/dom/HTMLMeterElement/meter-boundary-values-expected.checksum:
  • platform/mac/fast/dom/HTMLMeterElement/meter-boundary-values-expected.png:
  • platform/mac/fast/dom/HTMLMeterElement/meter-boundary-values-expected.txt:
  • platform/mac/fast/dom/HTMLMeterElement/meter-element-expected.checksum:
  • platform/mac/fast/dom/HTMLMeterElement/meter-element-expected.png:
  • platform/mac/fast/dom/HTMLMeterElement/meter-element-expected.txt:
  • platform/mac/fast/dom/HTMLMeterElement/meter-optimums-expected.txt:
  • platform/mac/fast/dom/HTMLMeterElement/meter-styles-changing-pseudo-expected.checksum:
  • platform/mac/fast/dom/HTMLMeterElement/meter-styles-changing-pseudo-expected.png:
  • platform/mac/fast/dom/HTMLMeterElement/meter-styles-changing-pseudo-expected.txt:
  • platform/mac/fast/dom/HTMLMeterElement/meter-styles-expected.checksum:
  • platform/mac/fast/dom/HTMLMeterElement/meter-styles-expected.png:
  • platform/mac/fast/dom/HTMLMeterElement/meter-styles-expected.txt:

2011-03-30 MORITA Hajime <morrita@google.com>

Reviewed by Dimitri Glazkov.

<meter> can only support horizontal indicator
https://bugs.webkit.org/show_bug.cgi?id=56001

  • Removed code which deals with the direction and left the horizontal path.
  • Removed "horizontal" from related names which is now redundant.
  • css/CSSSelector.cpp: (WebCore::CSSSelector::pseudoId): (WebCore::nameToPseudoTypeMap): (WebCore::CSSSelector::extractPseudoType):
  • css/CSSSelector.h:
  • css/html.css: (meter::-webkit-meter-bar): (meter::-webkit-meter-optimum-value): (meter::-webkit-meter-suboptimal-value): (meter::-webkit-meter-even-less-good-value):
  • rendering/RenderMeter.cpp: (WebCore::RenderMeter::~RenderMeter): (WebCore::RenderMeter::createPart): (WebCore::RenderMeter::updateFromElement): (WebCore::RenderMeter::layoutParts): (WebCore::RenderMeter::styleDidChange): (WebCore::RenderMeter::shouldHaveParts): (WebCore::RenderMeter::valuePartRect): (WebCore::RenderMeter::valuePseudoId): (WebCore::RenderMeter::barPseudoId): (WebCore::RenderMeter::detachShadows): (WebCore::RenderMeter::updateShadows):
  • rendering/RenderMeter.h: (WebCore::RenderMeter::shadowAttached):
  • rendering/RenderTheme.cpp: (WebCore::RenderTheme::supportsMeter):
  • rendering/RenderTheme.h:
  • rendering/RenderThemeMac.h:
  • rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::paintMeter): (WebCore::RenderThemeMac::supportsMeter):
  • rendering/style/RenderStyleConstants.h:
Location:
trunk
Files:
30 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r82588 r82589  
     12011-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
    1302011-03-30  Xiaomei Ji  <xji@chromium.org>
    231
  • 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  
    99    // because what we test is side-effect for the the layout and the painting.
    1010    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;
    1412    if (window.layoutTestController)
    1513        layoutTestController.notifyDone();
     
    1715</script>
    1816<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; }
    2722</style>
    2823</head>
    2924<body onload="test()">
    3025  <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>
    3728</body>
    3829</html>
  • trunk/LayoutTests/fast/dom/HTMLMeterElement/meter-styles.html

    r61376 r82589  
    1111  h1, h2 { font-size: medium; }
    1212  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; }
    1515</style>
    1616</head>
     
    1818  <h2>Horizontal meters with the non-themed default style</h2>
    1919  <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>
    2926  </ul>
    3027  <h2>Providing meter styles</h2>
     
    3936  <div style="background-color: #eee">
    4037  <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>
    4449  </ul>
    4550  </div>
  • trunk/LayoutTests/platform/mac/fast/dom/HTMLMeterElement/meter-appearances-capacity-expected.txt

    r73488 r82589  
    1717              text run at (0,0) width 86: "value=10/10:"
    1818            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
    2319          RenderListItem {LI} at (40,18) size 744x18 [bgcolor=#CCCCCC]
    2420            RenderListMarker at (-17,0) size 7x18: bullet
     
    2622              text run at (0,0) width 78: "value=8/10:"
    2723            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
    3224          RenderListItem {LI} at (40,36) size 744x18 [bgcolor=#EEEEEE]
    3325            RenderListMarker at (-17,0) size 7x18: bullet
     
    3527              text run at (0,0) width 78: "value=5/10:"
    3628            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
    4129          RenderListItem {LI} at (40,54) size 744x18 [bgcolor=#CCCCCC]
    4230            RenderListMarker at (-17,0) size 7x18: bullet
     
    4432              text run at (0,0) width 78: "value=2/10:"
    4533            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
    5034          RenderListItem {LI} at (40,72) size 744x18 [bgcolor=#EEEEEE]
    5135            RenderListMarker at (-17,0) size 7x18: bullet
     
    5337              text run at (0,0) width 78: "value=0/10:"
    5438            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
    5939          RenderListItem {LI} at (40,90) size 744x18 [bgcolor=#CCCCCC]
    6040            RenderListMarker at (-17,0) size 7x18: bullet
     
    6242              text run at (0,0) width 39: "RTL:"
    6343            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
    6844          RenderListItem {LI} at (40,108) size 744x50 [bgcolor=#EEEEEE]
    6945            RenderListMarker at (-17,0) size 7x18: bullet
     
    7147              text run at (0,0) width 32: "Tall:"
    7248            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
    7749          RenderListItem {LI} at (40,158) size 744x18 [bgcolor=#CCCCCC]
    7850            RenderListMarker at (-17,0) size 7x18: bullet
     
    8052              text run at (0,0) width 43: "Short:"
    8153            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
    8654          RenderListItem {LI} at (40,176) size 744x18 [bgcolor=#EEEEEE]
    8755            RenderListMarker at (-17,0) size 7x18: bullet
     
    8957              text run at (0,0) width 41: "Wide:"
    9058            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
    9559          RenderListItem {LI} at (40,194) size 744x18 [bgcolor=#CCCCCC]
    9660            RenderListMarker at (-17,0) size 7x18: bullet
     
    9862              text run at (0,0) width 59: "Narrow:"
    9963            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
    10464      RenderBlock {H2} at (0,293) size 784x18
    10565        RenderText {#text} at (0,0) size 236x18
     
    11272              text run at (0,0) width 86: "value=10/10:"
    11373            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
    11874          RenderListItem {LI} at (40,18) size 744x18 [bgcolor=#CCCCCC]
    11975            RenderListMarker at (-17,0) size 7x18: bullet
     
    12177              text run at (0,0) width 78: "value=8/10:"
    12278            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
    12779          RenderListItem {LI} at (40,36) size 744x18 [bgcolor=#EEEEEE]
    12880            RenderListMarker at (-17,0) size 7x18: bullet
     
    13082              text run at (0,0) width 78: "value=5/10:"
    13183            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
    13684          RenderListItem {LI} at (40,54) size 744x18 [bgcolor=#CCCCCC]
    13785            RenderListMarker at (-17,0) size 7x18: bullet
     
    13987              text run at (0,0) width 78: "value=2/10:"
    14088            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
    14589          RenderListItem {LI} at (40,72) size 744x18 [bgcolor=#EEEEEE]
    14690            RenderListMarker at (-17,0) size 7x18: bullet
     
    14892              text run at (0,0) width 78: "value=0/10:"
    14993            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
    15494          RenderListItem {LI} at (40,90) size 744x18 [bgcolor=#CCCCCC]
    15595            RenderListMarker at (-17,0) size 7x18: bullet
     
    15797              text run at (0,0) width 39: "RTL:"
    15898            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
    16399          RenderListItem {LI} at (40,108) size 744x50 [bgcolor=#EEEEEE]
    164100            RenderListMarker at (-17,0) size 7x18: bullet
     
    166102              text run at (0,0) width 32: "Tall:"
    167103            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
    172104          RenderListItem {LI} at (40,158) size 744x18 [bgcolor=#CCCCCC]
    173105            RenderListMarker at (-17,0) size 7x18: bullet
     
    175107              text run at (0,0) width 43: "Short:"
    176108            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
    181109          RenderListItem {LI} at (40,176) size 744x18 [bgcolor=#EEEEEE]
    182110            RenderListMarker at (-17,0) size 7x18: bullet
     
    184112              text run at (0,0) width 41: "Wide:"
    185113            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
    190114          RenderListItem {LI} at (40,194) size 744x18 [bgcolor=#CCCCCC]
    191115            RenderListMarker at (-17,0) size 7x18: bullet
     
    193117              text run at (0,0) width 59: "Narrow:"
    194118            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

    r73488 r82589  
    1717              text run at (0,0) width 86: "value=10/10:"
    1818            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
    2319          RenderListItem {LI} at (40,18) size 744x18 [bgcolor=#CCCCCC]
    2420            RenderListMarker at (-17,0) size 7x18: bullet
     
    2622              text run at (0,0) width 78: "value=8/10:"
    2723            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
    3224          RenderListItem {LI} at (40,36) size 744x18 [bgcolor=#EEEEEE]
    3325            RenderListMarker at (-17,0) size 7x18: bullet
     
    3527              text run at (0,0) width 78: "value=5/10:"
    3628            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
    4129          RenderListItem {LI} at (40,54) size 744x18 [bgcolor=#CCCCCC]
    4230            RenderListMarker at (-17,0) size 7x18: bullet
     
    4432              text run at (0,0) width 78: "value=2/10:"
    4533            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
    5034          RenderListItem {LI} at (40,72) size 744x18 [bgcolor=#EEEEEE]
    5135            RenderListMarker at (-17,0) size 7x18: bullet
     
    5337              text run at (0,0) width 78: "value=0/10:"
    5438            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
    5939          RenderListItem {LI} at (40,90) size 744x18 [bgcolor=#CCCCCC]
    6040            RenderListMarker at (-17,0) size 7x18: bullet
     
    6242              text run at (0,0) width 39: "RTL:"
    6343            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
    6844          RenderListItem {LI} at (40,108) size 744x50 [bgcolor=#EEEEEE]
    6945            RenderListMarker at (-17,0) size 7x18: bullet
     
    7147              text run at (0,0) width 32: "Tall:"
    7248            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
    7749          RenderListItem {LI} at (40,158) size 744x18 [bgcolor=#CCCCCC]
    7850            RenderListMarker at (-17,0) size 7x18: bullet
     
    8052              text run at (0,0) width 43: "Short:"
    8153            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
    8654          RenderListItem {LI} at (40,176) size 744x18 [bgcolor=#EEEEEE]
    8755            RenderListMarker at (-17,0) size 7x18: bullet
     
    8957              text run at (0,0) width 41: "Wide:"
    9058            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
    9559          RenderListItem {LI} at (40,194) size 744x18 [bgcolor=#CCCCCC]
    9660            RenderListMarker at (-17,0) size 7x18: bullet
     
    9862              text run at (0,0) width 59: "Narrow:"
    9963            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
    10464      RenderBlock {H2} at (0,293) size 784x18
    10565        RenderText {#text} at (0,0) size 166x18
     
    11272              text run at (0,0) width 86: "value=10/10:"
    11373            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
    11874          RenderListItem {LI} at (40,18) size 744x18 [bgcolor=#CCCCCC]
    11975            RenderListMarker at (-17,0) size 7x18: bullet
     
    12177              text run at (0,0) width 78: "value=8/10:"
    12278            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
    12779          RenderListItem {LI} at (40,36) size 744x18 [bgcolor=#EEEEEE]
    12880            RenderListMarker at (-17,0) size 7x18: bullet
     
    13082              text run at (0,0) width 78: "value=5/10:"
    13183            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
    13684          RenderListItem {LI} at (40,54) size 744x18 [bgcolor=#CCCCCC]
    13785            RenderListMarker at (-17,0) size 7x18: bullet
     
    13987              text run at (0,0) width 78: "value=2/10:"
    14088            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
    14589          RenderListItem {LI} at (40,72) size 744x18 [bgcolor=#EEEEEE]
    14690            RenderListMarker at (-17,0) size 7x18: bullet
     
    14892              text run at (0,0) width 78: "value=0/10:"
    14993            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
    15494          RenderListItem {LI} at (40,90) size 744x18 [bgcolor=#CCCCCC]
    15595            RenderListMarker at (-17,0) size 7x18: bullet
     
    15797              text run at (0,0) width 39: "RTL:"
    15898            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
    16399          RenderListItem {LI} at (40,108) size 744x50 [bgcolor=#EEEEEE]
    164100            RenderListMarker at (-17,0) size 7x18: bullet
     
    166102              text run at (0,0) width 32: "Tall:"
    167103            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
    172104          RenderListItem {LI} at (40,158) size 744x18 [bgcolor=#CCCCCC]
    173105            RenderListMarker at (-17,0) size 7x18: bullet
     
    175107              text run at (0,0) width 43: "Short:"
    176108            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
    181109          RenderListItem {LI} at (40,176) size 744x18 [bgcolor=#EEEEEE]
    182110            RenderListMarker at (-17,0) size 7x18: bullet
     
    184112              text run at (0,0) width 41: "Wide:"
    185113            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
    190114          RenderListItem {LI} at (40,194) size 744x18 [bgcolor=#CCCCCC]
    191115            RenderListMarker at (-17,0) size 7x18: bullet
     
    193117              text run at (0,0) width 59: "Narrow:"
    194118            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.checksum

    r70856 r82589  
    1 4f220d49011c4516ba3c79d5d567d0cf
     1104cc51f8fbcadf2f8cc7a970d32ce7b
  • trunk/LayoutTests/platform/mac/fast/dom/HTMLMeterElement/meter-boundary-values-expected.txt

    r73488 r82589  
    2020            text run at (8,0) width 107: "|10,20,30,40,50: "
    2121          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
    2622        RenderListItem {LI} at (40,36) size 744x18
    2723          RenderListMarker at (-17,0) size 7x18: bullet
     
    3228            text run at (16,0) width 88: ",20,30,40,50: "
    3329          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
    3830        RenderListItem {LI} at (40,54) size 744x18
    3931          RenderListMarker at (-17,0) size 7x18: bullet
     
    4638            text run at (36,0) width 68: ",30,40,50: "
    4739          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
    5240          RenderText {#text} at (184,0) size 110x18
    5341            text run at (184,0) width 110: "(should be green)"
     
    6250            text run at (56,0) width 48: ",40,50: "
    6351          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
    6852          RenderText {#text} at (184,0) size 110x18
    6953            text run at (184,0) width 110: "(should be green)"
     
    7862            text run at (76,0) width 28: ",50: "
    7963          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
    8464          RenderText {#text} at (184,0) size 110x18
    8565            text run at (184,0) width 110: "(should be green)"
     
    9474            text run at (96,0) width 8: ": "
    9575          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
    10076          RenderText {#text} at (184,0) size 118x18
    10177            text run at (184,0) width 118: "(should be yellow)"
     
    11086            text run at (115,0) width 8: ": "
    11187          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
    11688          RenderText {#text} at (203,0) size 118x18
    11789            text run at (203,0) width 118: "(should be yellow)"
     
    12698            text run at (36,0) width 68: ",30,40,50: "
    12799          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
    132100        RenderListItem {LI} at (40,162) size 744x18
    133101          RenderListMarker at (-17,0) size 7x18: bullet
     
    140108            text run at (76,0) width 28: ",40: "
    141109          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
    146110          RenderText {#text} at (184,0) size 110x18
    147111            text run at (184,0) width 110: "(should be green)"
     
    154118            text run at (8,0) width 107: "|10,10,10,20,30: "
    155119          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
    160120        RenderListItem {LI} at (40,198) size 744x18
    161121          RenderListMarker at (-17,0) size 7x18: bullet
     
    168128            text run at (56,0) width 48: ",20,30: "
    169129          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
    174130        RenderListItem {LI} at (40,216) size 744x18
    175131          RenderListMarker at (-17,0) size 7x18: bullet
     
    182138            text run at (56,0) width 48: ",30,30: "
    183139          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
    188140          RenderText {#text} at (184,0) size 110x18
    189141            text run at (184,0) width 110: "(should be green)"
     
    198150            text run at (115,0) width 8: ": "
    199151          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
    204152          RenderText {#text} at (203,0) size 110x18
    205153            text run at (203,0) width 110: "(should be green)"
     
    214162            text run at (56,0) width 48: ",20,30: "
    215163          RenderMeter {METER} at (104,1) size 80x16
    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
    220164          RenderText {#text} at (184,0) size 110x18
    221165            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
     1ae189b55e91ac97b849a6ada7c6221c2
  • trunk/LayoutTests/platform/mac/fast/dom/HTMLMeterElement/meter-element-expected.txt

    r73488 r82589  
    55    RenderBody {BODY} at (8,8) size 784x584
    66      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
    117      RenderMeter {METER} at (80,0) size 10x60
    12         RenderBlock {DIV} at (0,0) size 10x60
    13         RenderBlock {DIV} at (0,0) size 7x60
    14         RenderBlock {DIV} at (0,0) size 10x60
    15         RenderBlock {DIV} at (0,18) size 10x42
    168      RenderText {#text} at (0,0) size 0x0
  • trunk/LayoutTests/platform/mac/fast/dom/HTMLMeterElement/meter-optimums-expected.txt

    r73488 r82589  
    1919            text run at (0,0) width 75: "value=150: "
    2020          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
    2521        RenderListItem {LI} at (40,18) size 744x18
    2622          RenderListMarker at (-17,0) size 7x18: bullet
     
    2824            text run at (0,0) width 75: "value=450: "
    2925          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
    3426        RenderListItem {LI} at (40,36) size 744x18
    3527          RenderListMarker at (-17,0) size 7x18: bullet
     
    3729            text run at (0,0) width 75: "value=750: "
    3830          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
    4331        RenderListItem {LI} at (40,54) size 744x18
    4432          RenderListMarker at (-17,0) size 7x18: bullet
     
    4634            text run at (0,0) width 59: "value=0: "
    4735          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
    5236        RenderListItem {LI} at (40,72) size 744x18
    5337          RenderListMarker at (-17,0) size 7x18: bullet
     
    5539            text run at (0,0) width 83: "value=1000: "
    5640          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
    6141      RenderBlock {H2} at (0,251) size 784x28
    6242        RenderText {#text} at (0,0) size 143x28
     
    6848            text run at (0,0) width 75: "value=150: "
    6949          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
    7450        RenderListItem {LI} at (40,18) size 744x18
    7551          RenderListMarker at (-17,0) size 7x18: bullet
     
    7753            text run at (0,0) width 75: "value=450: "
    7854          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
    8355        RenderListItem {LI} at (40,36) size 744x18
    8456          RenderListMarker at (-17,0) size 7x18: bullet
     
    8658            text run at (0,0) width 75: "value=750: "
    8759          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
    9260        RenderListItem {LI} at (40,54) size 744x18
    9361          RenderListMarker at (-17,0) size 7x18: bullet
     
    9563            text run at (0,0) width 59: "value=0: "
    9664          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
    10165        RenderListItem {LI} at (40,72) size 744x18
    10266          RenderListMarker at (-17,0) size 7x18: bullet
     
    10468            text run at (0,0) width 83: "value=1000: "
    10569          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
    11070      RenderBlock {H2} at (0,407) size 784x28
    11171        RenderText {#text} at (0,0) size 143x28
     
    11777            text run at (0,0) width 75: "value=150: "
    11878          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
    12379        RenderListItem {LI} at (40,18) size 744x18
    12480          RenderListMarker at (-17,0) size 7x18: bullet
     
    12682            text run at (0,0) width 75: "value=450: "
    12783          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
    13284        RenderListItem {LI} at (40,36) size 744x18
    13385          RenderListMarker at (-17,0) size 7x18: bullet
     
    13587            text run at (0,0) width 75: "value=750: "
    13688          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
    14189        RenderListItem {LI} at (40,54) size 744x18
    14290          RenderListMarker at (-17,0) size 7x18: bullet
     
    14492            text run at (0,0) width 59: "value=0: "
    14593          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
    15094        RenderListItem {LI} at (40,72) size 744x18
    15195          RenderListMarker at (-17,0) size 7x18: bullet
     
    15397            text run at (0,0) width 83: "value=1000: "
    15498          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.checksum

    r71073 r82589  
    1 3c8f610620cf11cc24bb63766220fd9d
     1658368f56fec1048c66ef04bc2318f91
  • trunk/LayoutTests/platform/mac/fast/dom/HTMLMeterElement/meter-styles-changing-pseudo-expected.txt

    r73488 r82589  
    88          text run at (0,0) width 507: "Dynamically changing pseudo classes"
    99      RenderBlock {P} at (0,58) size 784x18
    10         RenderText {#text} at (0,0) size 613x18
    11           text run at (0,0) width 613: "Following meter gauge should be green - 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"
    1212      RenderBlock (anonymous) at (0,92) size 784x16
    1313        RenderMeter {METER} at (0,0) size 80x16
    1414          RenderBlock {DIV} at (0,0) size 80x16 [bgcolor=#808080]
    1515          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
    1816        RenderText {#text} at (0,0) size 0x0
    19       RenderBlock {P} at (0,124) size 784x18
    20         RenderText {#text} at (0,0) size 735x18
    21           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 784x100
    23         RenderMeter {METER} at (0,0) size 80x100
    24           RenderBlock {DIV} at (0,0) size 80x100
    25           RenderBlock {DIV} at (0,0) size 72x100
    26           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 0x0
    29       RenderBlock {P} at (0,274) size 784x36
    30         RenderText {#text} at (0,0) size 766x36
    31           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 784x20
    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]
    39         RenderText {#text} at (0,0) size 0x0
  • trunk/LayoutTests/platform/mac/fast/dom/HTMLMeterElement/meter-styles-expected.checksum

    r71073 r82589  
    1 53bc2d4916923800a8b64909da91e303
     168de127fae2b71bbf82c2d53c2787cc1
  • trunk/LayoutTests/platform/mac/fast/dom/HTMLMeterElement/meter-styles-expected.txt

    r73488 r82589  
    77        RenderText {#text} at (0,0) size 350x18
    88          text run at (0,0) width 350: "Horizontal meters with the non-themed default style"
    9       RenderBlock {UL} at (3,21) size 778x60
     9      RenderBlock {UL} at (3,21) size 778x62
    1010        RenderListItem {LI} at (43,0) size 732x18
    1111          RenderMeter {METER} at (0,1) size 80x16
    1212            RenderBlock {DIV} at (0,0) size 80x16
    1313            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
    1817            RenderBlock {DIV} at (0,0) size 80x16
    1918            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
    2422            RenderBlock {DIV} at (0,0) size 80x16
    2523            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
    3325          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
    5133        RenderText {#text} at (0,0) size 150x18
    5234          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]
    5436        RenderBlock {UL} at (3,0) size 778x102
    5537          RenderListItem {LI} at (43,0) size 732x32
     
    5739              RenderBlock {DIV} at (100,10) size 80x16
    5840              RenderBlock {DIV} at (100,10) size 64x16
    59               RenderBlock {DIV} at (100,10) size 80x16
    60               RenderBlock {DIV} at (100,14) size 80x12
    6141            RenderText {#text} at (230,14) size 70x18
    6242              text run at (230,14) width 70: " has border"
     
    6545              RenderBlock {DIV} at (100,10) size 80x16
    6646              RenderBlock {DIV} at (100,10) size 64x16
    67               RenderBlock {DIV} at (100,10) size 80x16
    68               RenderBlock {DIV} at (100,14) size 80x12
    6947            RenderText {#text} at (230,14) size 80x18
    7048              text run at (230,14) width 80: " has padding"
     
    7351              RenderBlock {DIV} at (0,0) size 80x16
    7452              RenderBlock {DIV} at (0,0) size 64x16
    75               RenderBlock {DIV} at (0,0) size 80x16
    76               RenderBlock {DIV} at (0,4) size 80x12
    7753            RenderText {#text} at (230,14) size 73x18
    7854              text run at (230,14) width 73: " has margin"
    79       RenderBlock {H2} at (3,363) size 778x18
     55      RenderBlock {H2} at (3,212) size 778x18
    8056        RenderText {#text} at (0,0) size 224x18
    8157          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
    8580            RenderMeter {METER} at (0,1) size 80x16
    8681              RenderBlock {DIV} at (0,0) size 80x16
    8782              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
    9386            RenderMeter {METER} at (0,1) size 80x16
    9487              RenderBlock {DIV} at (0,0) size 80x16 [bgcolor=#808080] [border: (2px solid #222222)]
    9588              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
    10192            RenderMeter {METER} at (0,1) size 80x16
    10293              RenderBlock {DIV} at (0,0) size 80x16 [bgcolor=#808080] [border: (2px solid #222222)]
    10394              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
    10998        RenderText {#text} at (0,0) size 156x18
    11099          text run at (0,0) width 156: "Providing appearances"
    111       RenderBlock {DIV} at (0,468) size 784x39 [bgcolor=#EEEEEE]
     100      RenderBlock {DIV} at (0,422) size 784x39 [bgcolor=#EEEEEE]
    112101        RenderBlock {UL} at (3,0) size 778x39
    113102          RenderListItem {LI} at (43,0) size 732x18
     
    115104              RenderBlock {DIV} at (0,0) size 80x16
    116105              RenderBlock {DIV} at (0,0) size 64x16
    117               RenderBlock {DIV} at (0,0) size 80x16
    118               RenderBlock {DIV} at (0,4) size 80x12
    119106            RenderText {#text} at (80,0) size 375x18
    120107              text run at (80,0) width 375: " has \"none\" appearance, should be styled with default style."
    121108          RenderListItem {LI} at (43,21) size 732x18
    122109            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
    127110            RenderText {#text} at (80,0) size 276x18
    128111              text run at (80,0) width 276: " has \"meter\" appearance, should be themed."
  • trunk/Source/WebCore/ChangeLog

    r82588 r82589  
     12011-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
    1462011-03-30  Xiaomei Ji  <xji@chromium.org>
    247
  • trunk/Source/WebCore/css/CSSSelector.cpp

    r81845 r82589  
    162162        return OUTER_SPIN_BUTTON;
    163163#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;
    180172#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:
    189177        ASSERT_NOT_REACHED();
    190178        return NOPSEUDO;
     
    317305    DEFINE_STATIC_LOCAL(AtomicString, outerSpinButton, ("-webkit-outer-spin-button"));
    318306#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"));
    327311#endif
    328312
     
    415399        nameToPseudoType->set(outerSpinButton.impl(), CSSSelector::PseudoOuterSpinButton);
    416400#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);
    425405#endif
    426406        nameToPseudoType->set(root.impl(), CSSSelector::PseudoRoot);
     
    498478#endif
    499479    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:
    508484    case PseudoOuterSpinButton:
    509485    case PseudoResizer:
  • trunk/Source/WebCore/css/CSSSelector.h

    r81845 r82589  
    183183            PseudoSearchResultsDecoration,
    184184            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,
    193189            PseudoInputListButton,
    194190#if ENABLE(INPUT_SPEECH)
  • trunk/Source/WebCore/css/html.css

    r82400 r82589  
    684684}
    685685
    686 meter::-webkit-meter-horizontal-bar {
     686meter::-webkit-meter-bar {
    687687    -webkit-appearance: meter;
    688688    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));
    689689}
    690690
    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 {
     691meter::-webkit-meter-optimum-value {
    697692    -webkit-appearance: meter;
    698693    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));
    699694}
    700695
    701 meter::-webkit-meter-horizontal-suboptimal-value {
     696meter::-webkit-meter-suboptimal-value {
    702697    -webkit-appearance: meter;
    703698    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));
    704699}
    705700
    706 meter::-webkit-meter-horizontal-even-less-good-value {
     701meter::-webkit-meter-even-less-good-value {
    707702    -webkit-appearance: meter;
    708703    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));
    724704}
    725705
  • trunk/Source/WebCore/rendering/RenderMeter.cpp

    r78150 r82589  
    3636using namespace HTMLNames;
    3737
    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 
    9338RenderMeter::RenderMeter(HTMLMeterElement* element)
    9439    : RenderIndicator(element)
     
    9843RenderMeter::~RenderMeter()
    9944{
    100     if (shadowAttached()) {
    101         m_verticalValuePart->detach();
    102         m_verticalBarPart->detach();
    103         m_horizontalValuePart->detach();
    104         m_horizontalBarPart->detach();
    105     }
     45    detachShadows();
    10646}
    10747
    108 PassRefPtr<MeterPartElement> RenderMeter::createPart(PseudoId pseudoId)
     48PassRefPtr<ShadowBlockElement> RenderMeter::createPart(PseudoId pseudoId)
    10949{
    110     RefPtr<MeterPartElement> element = MeterPartElement::createForPart(toHTMLElement(node()), pseudoId);
     50    RefPtr<ShadowBlockElement> element = ShadowBlockElement::createForPart(toHTMLElement(node()), pseudoId);
    11151    if (element->renderer())
    11252        addChild(element->renderer());
     
    11656void RenderMeter::updateFromElement()
    11757{
    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();
    12959    RenderIndicator::updateFromElement();
    13060}
     
    14474void RenderMeter::layoutParts()
    14575{
    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}
    15081
    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();
     82void 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();
    16892    }
    16993}
     
    17195bool RenderMeter::shouldHaveParts() const
    17296{
    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());
    18198}
    18299
     
    198115}
    199116
    200 IntRect RenderMeter::valuePartRect(EBoxOrient asOrientation) const
     117IntRect RenderMeter::valuePartRect() const
    201118{
    202119    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);
    216126
    217127    return rect;
    218128}
    219129
    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
     130PseudoId RenderMeter::valuePseudoId() const
    227131{
    228132    HTMLMeterElement* element = static_cast<HTMLMeterElement*>(node());
    229133
    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;
    248141    }
    249142
     
    252145}
    253146
    254 PseudoId RenderMeter::barPseudoId(EBoxOrient asOrientation) const
     147PseudoId RenderMeter::barPseudoId() const
    255148{
    256     return HORIZONTAL == asOrientation ? METER_HORIZONTAL_BAR : METER_VERTICAL_BAR;
     149    return METER_BAR;
     150}
     151
     152void 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
     162void 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    }
    257173}
    258174
  • trunk/Source/WebCore/rendering/RenderMeter.h

    r73488 r82589  
    3131
    3232class HTMLMeterElement;
    33 class MeterPartElement;
     33class ShadowBlockElement;
    3434
    3535class RenderMeter : public RenderIndicator {
     
    4646
    4747    virtual void layoutParts();
     48    virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle);
    4849
    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;
    5256    IntRect barPartRect() const;
    53     PseudoId barPseudoId(EBoxOrient) const;
    54     EBoxOrient orientation() const;
     57    PseudoId barPseudoId() const;
    5558
    5659    double valueRatio() const;
    5760    bool shouldHaveParts() const;
    58     PassRefPtr<MeterPartElement> createPart(PseudoId);
     61    PassRefPtr<ShadowBlockElement> createPart(PseudoId);
    5962
    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;
    6465};
    6566
  • trunk/Source/WebCore/rendering/RenderTheme.cpp

    r80811 r82589  
    965965}
    966966
    967 bool RenderTheme::supportsMeter(ControlPart, bool) const
     967bool RenderTheme::supportsMeter(ControlPart) const
    968968{
    969969    return false;
  • trunk/Source/WebCore/rendering/RenderTheme.h

    r82053 r82589  
    197197#if ENABLE(METER_TAG)
    198198    virtual IntSize meterSizeForBounds(const RenderMeter*, const IntRect&) const;
    199     virtual bool supportsMeter(ControlPart, bool isHorizontal) const;
     199    virtual bool supportsMeter(ControlPart) const;
    200200#endif
    201201   
  • trunk/Source/WebCore/rendering/RenderThemeMac.h

    r82053 r82589  
    8484    virtual IntSize meterSizeForBounds(const RenderMeter*, const IntRect&) const;
    8585    virtual bool paintMeter(RenderObject*, const PaintInfo&, const IntRect&);
    86     virtual bool supportsMeter(ControlPart, bool isHorizontal) const;
     86    virtual bool supportsMeter(ControlPart) const;
    8787#endif
    8888
  • trunk/Source/WebCore/rendering/RenderThemeMac.mm

    r82057 r82589  
    831831    LocalCurrentGraphicsContext localContext(paintInfo.context);
    832832
    833     // Becaue NSLevelIndicatorCell doesn't support vertical gauge, we use a portable version
    834     if (rect.width() < rect.height())
    835         return RenderTheme::paintMeter(renderObject, paintInfo, rect);
    836 
    837833    NSLevelIndicatorCell* cell = levelIndicatorFor(toRenderMeter(renderObject));
    838834    paintInfo.context->save();
     
    844840}
    845841
    846 bool RenderThemeMac::supportsMeter(ControlPart part, bool isHorizontal) const
     842bool RenderThemeMac::supportsMeter(ControlPart part) const
    847843{
    848844    switch (part) {
     
    852848    case MeterPart:
    853849    case ContinuousCapacityLevelIndicatorPart:
    854         return isHorizontal;
     850        return true;
    855851    default:
    856852        return false;
  • trunk/Source/WebCore/rendering/style/RenderStyleConstants.h

    r82482 r82589  
    7373    SCROLLBAR_THUMB, SCROLLBAR_BUTTON, SCROLLBAR_TRACK, SCROLLBAR_TRACK_PIECE, SCROLLBAR_CORNER, RESIZER,
    7474    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,
    7776    AFTER_LAST_INTERNAL_PSEUDOID,
    7877    FULL_SCREEN, FULL_SCREEN_DOCUMENT,
Note: See TracChangeset for help on using the changeset viewer.