| Index: Source/WebCore/html/shadow/MediaControlElements.cpp
|
| ===================================================================
|
| --- Source/WebCore/html/shadow/MediaControlElements.cpp (revision 118042)
|
| +++ Source/WebCore/html/shadow/MediaControlElements.cpp (working copy)
|
| @@ -256,8 +256,6 @@
|
| setInlineStyleProperty(CSSPropertyOpacity, 0.0, CSSPrimitiveValue::CSS_NUMBER);
|
|
|
| m_opaque = false;
|
| -
|
| - startTimer();
|
| }
|
|
|
| void MediaControlPanelElement::defaultEventHandler(Event* event)
|
| @@ -322,6 +320,36 @@
|
|
|
| // ----------------------------
|
|
|
| +class RenderMediaVolumeSliderContainer : public RenderBlock {
|
| +public:
|
| + RenderMediaVolumeSliderContainer(Node*);
|
| +
|
| +private:
|
| + virtual void layout();
|
| +};
|
| +
|
| +RenderMediaVolumeSliderContainer::RenderMediaVolumeSliderContainer(Node* node)
|
| + : RenderBlock(node)
|
| +{
|
| +}
|
| +
|
| +void RenderMediaVolumeSliderContainer::layout()
|
| +{
|
| + RenderBlock::layout();
|
| +
|
| + if (style()->display() == NONE || !nextSibling() || !nextSibling()->isBox())
|
| + return;
|
| +
|
| + RenderBox* buttonBox = toRenderBox(nextSibling());
|
| + int absoluteOffsetTop = buttonBox->localToAbsolute(FloatPoint(0, -size().height())).y();
|
| +
|
| + LayoutStateDisabler layoutStateDisabler(view());
|
| +
|
| + // If the slider would be rendered outside the page, it should be moved below the controls.
|
| + if (UNLIKELY(absoluteOffsetTop < 0))
|
| + setY(buttonBox->offsetTop() + theme()->volumeSliderOffsetFromMuteButton(buttonBox, pixelSnappedSize()).y());
|
| +}
|
| +
|
| inline MediaControlVolumeSliderContainerElement::MediaControlVolumeSliderContainerElement(Document* document)
|
| : MediaControlElement(document)
|
| {
|
| @@ -334,6 +362,11 @@
|
| return element.release();
|
| }
|
|
|
| +RenderObject* MediaControlVolumeSliderContainerElement::createRenderer(RenderArena* arena, RenderStyle*)
|
| +{
|
| + return new (arena) RenderMediaVolumeSliderContainer(this);
|
| +}
|
| +
|
| void MediaControlVolumeSliderContainerElement::defaultEventHandler(Event* event)
|
| {
|
| if (!event->isMouseEvent() || event->type() != eventNames().mouseoutEvent)
|
|
|