Changeset 127168 in webkit


Ignore:
Timestamp:
Aug 30, 2012 11:53:02 AM (12 years ago)
Author:
victor@rosedu.org
Message:

[Chromium] The CC button is not painted
https://bugs.webkit.org/show_bug.cgi?id=95395

Reviewed by Eric Carlson.

Source/WebCore:

The actual Chromium resource for the CC button was not used by the Chromium theme.

Existing track rendering tests will be rebaselined and contain the new CC button.

  • rendering/RenderMediaControlsChromium.cpp:

(WebCore::paintMediaClosedCaptionsButton): Added for proper painting of the resource.
(WebCore):
(WebCore::RenderMediaControlsChromium::paintMediaControlsPart):
Changed to call paintMediaClosedCaptionsButton when the control is the CC button.

  • rendering/RenderThemeChromiumSkia.cpp:

(WebCore::RenderThemeChromiumSkia::paintMediaToggleClosedCaptionsButton):
Implemented proper behaviour.
(WebCore):

  • rendering/RenderThemeChromiumSkia.h:

(RenderThemeChromiumSkia):

LayoutTests:

No new tests, the existing ones will need to be rebaselined and include the CC button.

  • platform/chromium/TestExpectations: Marked tests failing accordingly for rebaselining.
Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r127166 r127168  
     12012-08-30  Victor Carbune  <victor@rosedu.org>
     2
     3        [Chromium] The CC button is not painted
     4        https://bugs.webkit.org/show_bug.cgi?id=95395
     5
     6        Reviewed by Eric Carlson.
     7
     8        No new tests, the existing ones will need to be rebaselined and include the CC button.
     9
     10        * platform/chromium/TestExpectations: Marked tests failing accordingly for rebaselining.
     11
    1122012-08-30  Jessie Berlin  <jberlin@apple.com>
    213
  • trunk/LayoutTests/platform/chromium/TestExpectations

    r127163 r127168  
    36133613BUGWK95101 SNOWLEOPARD : fast/text/atsui-bidi-control.html = PASS TIMEOUT
    36143614
     3615// These need new baselines: both new tests and new CC button has just been added.
     3616BUGWK95395 : media/track/track-cue-rendering-horizontal.html = IMAGE+TEXT
     3617BUGWK95395 : media/track/track-cue-rendering-vertical.html = IMAGE+TEXT
     3618
    36153619// Failing due to sub-pixel layout.
    36163620BUGWK95136 : fast/css/sticky/sticky-left-percentage.html = IMAGE
  • trunk/Source/WebCore/ChangeLog

    r127165 r127168  
     12012-08-30  Victor Carbune  <victor@rosedu.org>
     2
     3        [Chromium] The CC button is not painted
     4        https://bugs.webkit.org/show_bug.cgi?id=95395
     5
     6        Reviewed by Eric Carlson.
     7
     8        The actual Chromium resource for the CC button was not used by the Chromium theme.
     9
     10        Existing track rendering tests will be rebaselined and contain the new CC button.
     11
     12        * rendering/RenderMediaControlsChromium.cpp:
     13        (WebCore::paintMediaClosedCaptionsButton): Added for proper painting of the resource.
     14        (WebCore):
     15        (WebCore::RenderMediaControlsChromium::paintMediaControlsPart):
     16        Changed to call paintMediaClosedCaptionsButton when the control is the CC button.
     17        * rendering/RenderThemeChromiumSkia.cpp:
     18        (WebCore::RenderThemeChromiumSkia::paintMediaToggleClosedCaptionsButton):
     19        Implemented proper behaviour.
     20        (WebCore):
     21        * rendering/RenderThemeChromiumSkia.h:
     22        (RenderThemeChromiumSkia):
     23
    1242012-08-30  Tommy Widenflycht  <tommyw@google.com>
    225
  • trunk/Source/WebCore/rendering/RenderMediaControlsChromium.cpp

    r123969 r127168  
    328328}
    329329
     330static bool paintMediaClosedCaptionsButton(RenderObject* object, const PaintInfo& paintInfo, const IntRect& rect)
     331{
     332    HTMLMediaElement* mediaElement = toParentMediaElement(object);
     333    if (!mediaElement)
     334        return false;
     335
     336    static Image* mediaClosedCaptionButton = platformResource("mediaplayerClosedCaption");
     337    return paintMediaButton(paintInfo.context, rect, mediaClosedCaptionButton);
     338}
     339
     340
    330341bool RenderMediaControlsChromium::paintMediaControlsPart(MediaControlElementType part, RenderObject* object, const PaintInfo& paintInfo, const IntRect& rect)
    331342{
     
    337348    case MediaPlayButton:
    338349        return paintMediaPlayButton(object, paintInfo, rect);
     350    case MediaShowClosedCaptionsButton:
     351        return paintMediaClosedCaptionsButton(object, paintInfo, rect);
    339352    case MediaSlider:
    340353        return paintMediaSlider(object, paintInfo, rect);
     
    361374    case MediaReturnToRealtimeButton:
    362375    case MediaStatusDisplay:
    363     case MediaShowClosedCaptionsButton:
    364376    case MediaHideClosedCaptionsButton:
    365377    case MediaTextTrackDisplayContainer:
  • trunk/Source/WebCore/rendering/RenderThemeChromiumSkia.cpp

    r127035 r127168  
    435435}
    436436
     437bool RenderThemeChromiumSkia::paintMediaToggleClosedCaptionsButton(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
     438{
     439#if ENABLE(VIDEO_TRACK)
     440    return RenderMediaControlsChromium::paintMediaControlsPart(MediaShowClosedCaptionsButton, o, paintInfo, r);
     441#else
     442    UNUSED_PARAM(object);
     443    UNUSED_PARAM(paintInfo);
     444    UNUSED_PARAM(rect);
     445    return false;
     446#endif
     447}
     448
    437449bool RenderThemeChromiumSkia::paintMediaVolumeSliderThumb(RenderObject* object, const PaintInfo& paintInfo, const IntRect& rect)
    438450{
  • trunk/Source/WebCore/rendering/RenderThemeChromiumSkia.h

    r127035 r127168  
    9999        virtual void adjustSliderThumbSize(RenderStyle*, Element*) const;
    100100        virtual bool paintMediaSliderThumb(RenderObject*, const PaintInfo&, const IntRect&);
     101        virtual bool paintMediaToggleClosedCaptionsButton(RenderObject*, const PaintInfo&, const IntRect&);
    101102        virtual bool paintMediaVolumeSliderThumb(RenderObject*, const PaintInfo&, const IntRect&);
    102103        virtual bool paintMediaPlayButton(RenderObject*, const PaintInfo&, const IntRect&);
Note: See TracChangeset for help on using the changeset viewer.