2011-03-08 Dimitri Glazkov <dglazkov@chromium.org>
authordglazkov@chromium.org <dglazkov@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 11 Mar 2011 17:55:54 +0000 (17:55 +0000)
committerdglazkov@chromium.org <dglazkov@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 11 Mar 2011 17:55:54 +0000 (17:55 +0000)
commit51a63b76e871cf6977b740f5157037711d543e2b
tree747d8bb556f1ec5a887a24654b87ca891c7b8b23
parente97f025a977a4519bde3ede9f2a1e8e4edb0203f
2011-03-08  Dimitri Glazkov  <dglazkov@chromium.org>

        Reviewed by Eric Carlson.

        Convert MediaControlTimeDisplayElement to use standard layout with a custom renderer.
        https://bugs.webkit.org/show_bug.cgi?id=55972

        Update test results, because they are now laying out timeline consistently.

        * media/audio-repaint-expected.txt: Updated.
        * platform/mac/media/audio-controls-rendering-expected.checksum: Ditto.
        * platform/mac/media/audio-controls-rendering-expected.png: Ditto.
        * platform/mac/media/audio-controls-rendering-expected.txt: Ditto.
        * platform/mac/media/audio-repaint-expected.checksum: Ditto.
        * platform/mac/media/audio-repaint-expected.png: Ditto.
2011-03-08  Dimitri Glazkov  <dglazkov@chromium.org>

        Reviewed by Eric Carlson.

        Convert MediaControlTimeDisplayElement to use standard layout with a custom renderer.
        https://bugs.webkit.org/show_bug.cgi?id=55972

        Instead of poking at the time display elements all the way from RenderMedia,
        let the standard layout cycle take care of things. Move the logic of calculating
        when to collapse the time display elements into a custom renderer, since
        this is not something that can be accomplished with CSS.

        Also, the logic of keeping the timeline slider at least 100px needed refreshing,
        since it didn't actually keep it at 100px.

        * html/shadow/MediaControls.cpp: Moved the logic of determining visibility
            of time display elements to RenderMediaControlTimeDisplay, eliminating
            updateTimeDisplayVisibility method.
        * html/shadow/MediaControls.h: Removed decl.
        * rendering/MediaControlElements.cpp:
        (WebCore::RenderMediaControlTimeDisplay::RenderMediaControlTimeDisplay):
            Added new renderer class.
        (WebCore::RenderMediaControlTimeDisplay::layout): Simplified (and corrected)
            size-sensing logic, still using hard-coded values.
        (WebCore::MediaControlTimeDisplayElement::MediaControlTimeDisplayElement):
            Removed m_isVisible member, which is no longer necessary.
        (WebCore::MediaControlTimeDisplayElement::createRenderer): Added to
            return the new renderer.
        * rendering/MediaControlElements.h: Adjusted decls.
        * rendering/RenderMedia.cpp:
        (WebCore::RenderMedia::layout): Remove the now-unnecessary poking at
            media controls in layout.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@80857 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
LayoutTests/ChangeLog
LayoutTests/media/audio-repaint-expected.txt
LayoutTests/platform/mac/media/audio-controls-rendering-expected.checksum
LayoutTests/platform/mac/media/audio-controls-rendering-expected.png
LayoutTests/platform/mac/media/audio-controls-rendering-expected.txt
LayoutTests/platform/mac/media/audio-repaint-expected.checksum
LayoutTests/platform/mac/media/audio-repaint-expected.png
Source/WebCore/ChangeLog
Source/WebCore/html/shadow/MediaControls.cpp
Source/WebCore/html/shadow/MediaControls.h
Source/WebCore/rendering/MediaControlElements.cpp
Source/WebCore/rendering/MediaControlElements.h
Source/WebCore/rendering/RenderMedia.cpp