2010-06-07 MORITA Hajime <morrita@google.com>
authormorrita@google.com <morrita@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 8 Jun 2010 06:26:06 +0000 (06:26 +0000)
committermorrita@google.com <morrita@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 8 Jun 2010 06:26:06 +0000 (06:26 +0000)
commit3152c79756f109784b41e9444ce7631a9b00eb8e
tree6309382beab52289a6f4b7a3312259fee82dae90
parent7dbba63e36971ef8ba3beacebd23ddd045f3f021
2010-06-07  MORITA Hajime  <morrita@google.com>

        Reviewed by Kent Tamura.

        [Mac] <meter> elements should be rendered as level indicators.
        https://bugs.webkit.org/show_bug.cgi?id=40217

        * fast/dom/HTMLMeterElement/meter-appearances-capacity.html: Added.
        * fast/dom/HTMLMeterElement/meter-appearances-rating-relevancy.html: Added.
        * fast/dom/HTMLMeterElement/meter-optimums.html: Added.
        * platform/chromium/test_expectations.txt:
        * platform/gtk/Skipped:
        * platform/mac/Skipped: removed <meter> related tests.
        * platform/mac/fast/dom/HTMLMeterElement/meter-appearances-capacity-expected.checksum: Added.
        * platform/mac/fast/dom/HTMLMeterElement/meter-appearances-capacity-expected.png: Added.
        * platform/mac/fast/dom/HTMLMeterElement/meter-appearances-capacity-expected.txt: Added.
        * platform/mac/fast/dom/HTMLMeterElement/meter-appearances-rating-relevancy-expected.checksum: Added.
        * platform/mac/fast/dom/HTMLMeterElement/meter-appearances-rating-relevancy-expected.png: Added.
        * platform/mac/fast/dom/HTMLMeterElement/meter-appearances-rating-relevancy-expected.txt: Added.
        * platform/mac/fast/dom/HTMLMeterElement/meter-element-expected.checksum: Added.
        * platform/mac/fast/dom/HTMLMeterElement/meter-element-expected.png: Added.
        * platform/mac/fast/dom/HTMLMeterElement/meter-element-expected.txt: Copied from LayoutTests/platform/qt/fast/dom/HTMLMeterElement/meter-element-expected.txt.
        * platform/mac/fast/dom/HTMLMeterElement/meter-optimums-expected.checksum: Added.
        * platform/mac/fast/dom/HTMLMeterElement/meter-optimums-expected.png: Added.
        * platform/mac/fast/dom/HTMLMeterElement/meter-optimums-expected.txt: Added.
        * platform/win/Skipped:
2010-06-07  MORITA Hajime  <morrita@google.com>

        Reviewed by Kent Tamura.

        [Mac] <meter> elements should be rendered as level indicators.
        https://bugs.webkit.org/show_bug.cgi?id=40217

        Implemented RenderThemeMac::paintMeter() using NSLevelIndicatorCell.

        This change also added new -webkit-appearance values to select the
        style of level indicators:

        - relevancy-level-indicator,
        - continuous-capacity-level-indicator,
        - discrete-capacity-level-indicator, and
        - rating-level-indicator.

        The size of elements are adjusted based on the bounds of the indicator
        to make room for painting whole indicator cells.

        Tests: fast/dom/HTMLMeterElement/meter-appearances-capacity.html
               fast/dom/HTMLMeterElement/meter-appearances-rating-relevancy.html
               fast/dom/HTMLMeterElement/meter-optimums.html

        * css/CSSPrimitiveValueMappings.h:
        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
        * css/CSSValueKeywords.in:
        * html/HTMLMeterElement.cpp:
        (WebCore::HTMLMeterElement::gaugeRegion):
        * html/HTMLMeterElement.h:
        (WebCore::HTMLMeterElement::):
        * platform/ThemeTypes.h:
        (WebCore::):
        * rendering/RenderMeter.cpp:
        (WebCore::RenderMeter::calcWidth):
        (WebCore::RenderMeter::calcHeight):
        * rendering/RenderMeter.h:
        * rendering/RenderTheme.cpp:
        (WebCore::RenderTheme::adjustStyle):
        (WebCore::RenderTheme::paint):
        (WebCore::RenderTheme::paintBorderOnly):
        (WebCore::RenderTheme::paintDecorations):
        (WebCore::RenderTheme::meterSizeForBounds):
        * rendering/RenderTheme.h:
        * rendering/RenderThemeMac.h:
        * rendering/RenderThemeMac.mm:
        (WebCore::RenderThemeMac::meterSizeForBounds):
        (WebCore::RenderThemeMac::paintMeter):
        (WebCore::RenderThemeMac::levelIndicatorStyleFor):
        (WebCore::RenderThemeMac::levelIndicatorFor):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@60822 268f45cc-cd09-0410-ab3c-d52691b4dbfc
32 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/dom/HTMLMeterElement/meter-appearances-capacity.html [new file with mode: 0644]
LayoutTests/fast/dom/HTMLMeterElement/meter-appearances-rating-relevancy.html [new file with mode: 0644]
LayoutTests/fast/dom/HTMLMeterElement/meter-optimums.html [new file with mode: 0644]
LayoutTests/platform/chromium/test_expectations.txt
LayoutTests/platform/gtk/Skipped
LayoutTests/platform/mac/Skipped
LayoutTests/platform/mac/fast/dom/HTMLMeterElement/meter-appearances-capacity-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/fast/dom/HTMLMeterElement/meter-appearances-capacity-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/dom/HTMLMeterElement/meter-appearances-capacity-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/fast/dom/HTMLMeterElement/meter-appearances-rating-relevancy-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/fast/dom/HTMLMeterElement/meter-appearances-rating-relevancy-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/dom/HTMLMeterElement/meter-appearances-rating-relevancy-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/fast/dom/HTMLMeterElement/meter-element-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/fast/dom/HTMLMeterElement/meter-element-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/dom/HTMLMeterElement/meter-element-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/fast/dom/HTMLMeterElement/meter-optimums-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/fast/dom/HTMLMeterElement/meter-optimums-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/dom/HTMLMeterElement/meter-optimums-expected.txt [new file with mode: 0644]
LayoutTests/platform/win/Skipped
WebCore/ChangeLog
WebCore/css/CSSPrimitiveValueMappings.h
WebCore/css/CSSValueKeywords.in
WebCore/html/HTMLMeterElement.cpp
WebCore/html/HTMLMeterElement.h
WebCore/platform/ThemeTypes.h
WebCore/rendering/RenderMeter.cpp
WebCore/rendering/RenderMeter.h
WebCore/rendering/RenderTheme.cpp
WebCore/rendering/RenderTheme.h
WebCore/rendering/RenderThemeMac.h
WebCore/rendering/RenderThemeMac.mm