MediaPlayer has a setRect() method. However, this implies that the video is not rotated, so it makes no sense if there is a transform on the video, or an ancestor.
Created attachment 28366 [details] proposed patch
Comment on attachment 28366 [details] proposed patch > Index: WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp > =================================================================== > - //TODO: m_rect vs rect? > + //TODO: m_size vs rect? Is the TODO still applicable? > Index: WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.h > =================================================================== > + IntRect m_rect; I have a minor preference for just storing a size in the member var, and constructing a (0,0,size) rect where you need one. > Index: WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm > + , m_rect(IntRect()) No need to initialize. IntRect has a ctor. > + if (m_player->inMediaDocument() && r != m_rect) { > + // the QTMovieView needs to be placed in the proper location for document mode > + m_rect = r; > + [view setFrame:m_rect]; Tabs here? r=me with those comments addressed.
>> Index: WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp >> =================================================================== >> >> - //TODO: m_rect vs rect? >> + //TODO: m_size vs rect? > > Is the TODO still applicable? I don't know if it is still applicable so I left the comment. >> Index: WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.h >> =================================================================== >> >> + IntRect m_rect; > >I have a minor preference for just storing a size in the member var, >and constructing a (0,0,size) rect where you need one. It make sense to store the Rect passed to paint() when we are in a media document so I think I will leave the member var as a rect
http://trac.webkit.org/changeset/41486