void RenderVideo::updatePlayer() { if (documentBeingDestroyed()) return; updateIntrinsicSize(); MediaPlayer* mediaPlayer = videoElement().player(); if (!mediaPlayer) return; if (!videoElement().inActiveDocument()) { mediaPlayer->setVisible(false); return; } #if USE(ACCELERATED_COMPOSITING) contentChanged(VideoChanged); #endif IntRect videoBounds = videoBox(); mediaPlayer->setFrameView(&view().frameView()); mediaPlayer->setSize(IntSize(videoBounds.width(), videoBounds.height())); mediaPlayer->setVisible(true); mediaPlayer->setShouldMaintainAspectRatio(style().objectFit() != ObjectFitFill); }
void RenderVideo::updatePlayer() { MediaPlayer* mediaPlayer = player(); if (!mediaPlayer) return; if (!mediaElement()->inActiveDocument()) { mediaPlayer->setVisible(false); return; } IntRect videoBounds = videoBox(); mediaPlayer->setFrameView(document()->view()); mediaPlayer->setSize(IntSize(videoBounds.width(), videoBounds.height())); mediaPlayer->setVisible(true); }
void RenderVideo::updatePlayer() { MediaPlayer* mediaPlayer = player(); if (!mediaPlayer) return; Document* doc = document(); if (doc->inPageCache()) return; int x; int y; absolutePosition(x, y); IntRect videoBounds = videoBox(); videoBounds.move(x, y); mediaPlayer->setFrameView(doc->view()); mediaPlayer->setRect(videoBounds); mediaPlayer->setVisible(true); }
void RenderVideo::updatePlayer() { MediaPlayer* mediaPlayer = player(); if (!mediaPlayer) return; if (!mediaElement()->inActiveDocument()) { mediaPlayer->setVisible(false); return; } // FIXME: This doesn't work correctly with transforms. FloatPoint absPos = localToAbsolute(); IntRect videoBounds = videoBox(); videoBounds.move(absPos.x(), absPos.y()); mediaPlayer->setFrameView(document()->view()); mediaPlayer->setRect(videoBounds); mediaPlayer->setVisible(true); }
void RenderVideo::updatePlayer() { updateIntrinsicSize(); MediaPlayer* mediaPlayer = mediaElement()->player(); if (!mediaPlayer) return; if (!videoElement()->inActiveDocument()) { mediaPlayer->setVisible(false); return; } #if USE(ACCELERATED_COMPOSITING) contentChanged(VideoChanged); #endif IntRect videoBounds = videoBox(); mediaPlayer->setFrameView(document()->view()); mediaPlayer->setSize(IntSize(videoBounds.width(), videoBounds.height())); mediaPlayer->setVisible(true); }