<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[174106] trunk/Source/WebCore</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/174106">174106</a></dd>
<dt>Author</dt> <dd>eric.carlson@apple.com</dd>
<dt>Date</dt> <dd>2014-09-30 07:30:34 -0700 (Tue, 30 Sep 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>[Mac] MediaPlayerPrivateQTKit should not use FrameView
https://bugs.webkit.org/show_bug.cgi?id=137119

Reviewed by Carlos Garcia Campos.

Remove obsolete QTKit code that would fall back to rendering into an NSView.
Aside from being dead code, it was only used when accelerated compositing
was not enabled and tha hasn't been possible for a long time, it required a
layering violation to get the FrameView.

* platform/graphics/mac/MediaPlayerPrivateQTKit.h:
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::MediaPlayerPrivateQTKit::currentRenderingMode):
(WebCore::MediaPlayerPrivateQTKit::preferredRenderingMode):
(WebCore::MediaPlayerPrivateQTKit::setUpVideoRendering):
(WebCore::MediaPlayerPrivateQTKit::tearDownVideoRendering):
(WebCore::MediaPlayerPrivateQTKit::hasSetUpVideoRendering):
(WebCore::MediaPlayerPrivateQTKit::setSize):
(WebCore::MediaPlayerPrivateQTKit::paint):
(WebCore::mainThreadSetNeedsDisplay): Deleted.
(WebCore::MediaPlayerPrivateQTKit::createQTMovieView): Deleted.
(WebCore::MediaPlayerPrivateQTKit::detachQTMovieView): Deleted.
(-[WebCoreMovieObserver menuForEventDelegate:]): Deleted.
(-[WebCoreMovieObserver setView:]): Deleted.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsmacMediaPlayerPrivateQTKith">trunk/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsmacMediaPlayerPrivateQTKitmm">trunk/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (174105 => 174106)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-09-30 13:38:03 UTC (rev 174105)
+++ trunk/Source/WebCore/ChangeLog        2014-09-30 14:30:34 UTC (rev 174106)
</span><span class="lines">@@ -1,3 +1,30 @@
</span><ins>+2014-09-30  Eric Carlson  &lt;eric.carlson@apple.com&gt;
+
+        [Mac] MediaPlayerPrivateQTKit should not use FrameView
+        https://bugs.webkit.org/show_bug.cgi?id=137119
+
+        Reviewed by Carlos Garcia Campos.
+
+        Remove obsolete QTKit code that would fall back to rendering into an NSView.
+        Aside from being dead code, it was only used when accelerated compositing
+        was not enabled and tha hasn't been possible for a long time, it required a
+        layering violation to get the FrameView.
+
+        * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
+        * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
+        (WebCore::MediaPlayerPrivateQTKit::currentRenderingMode):
+        (WebCore::MediaPlayerPrivateQTKit::preferredRenderingMode):
+        (WebCore::MediaPlayerPrivateQTKit::setUpVideoRendering):
+        (WebCore::MediaPlayerPrivateQTKit::tearDownVideoRendering):
+        (WebCore::MediaPlayerPrivateQTKit::hasSetUpVideoRendering):
+        (WebCore::MediaPlayerPrivateQTKit::setSize):
+        (WebCore::MediaPlayerPrivateQTKit::paint):
+        (WebCore::mainThreadSetNeedsDisplay): Deleted.
+        (WebCore::MediaPlayerPrivateQTKit::createQTMovieView): Deleted.
+        (WebCore::MediaPlayerPrivateQTKit::detachQTMovieView): Deleted.
+        (-[WebCoreMovieObserver menuForEventDelegate:]): Deleted.
+        (-[WebCoreMovieObserver setView:]): Deleted.
+
</ins><span class="cx"> 2014-09-30  Carlos Garcia Campos  &lt;cgarcia@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [GTK] Move GtkPopupMenu implementation to WebPopupMenuProxyGtk
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsmacMediaPlayerPrivateQTKith"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.h (174105 => 174106)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.h        2014-09-30 13:38:03 UTC (rev 174105)
+++ trunk/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.h        2014-09-30 14:30:34 UTC (rev 174106)
</span><span class="lines">@@ -42,7 +42,6 @@
</span><span class="cx"> OBJC_CLASS NSDictionary;
</span><span class="cx"> OBJC_CLASS NSMutableDictionary;
</span><span class="cx"> OBJC_CLASS QTMovie;
</span><del>-OBJC_CLASS QTMovieView;
</del><span class="cx"> OBJC_CLASS QTMovieLayer;
</span><span class="cx"> OBJC_CLASS QTVideoRendererWebKitOnly;
</span><span class="cx"> OBJC_CLASS WebCoreMovieObserver;
</span><span class="lines">@@ -139,7 +138,7 @@
</span><span class="cx">     void createQTMovie(const String&amp; url);
</span><span class="cx">     void createQTMovie(NSURL *, NSDictionary *movieAttributes);
</span><span class="cx"> 
</span><del>-    enum MediaRenderingMode { MediaRenderingNone, MediaRenderingMovieView, MediaRenderingSoftwareRenderer, MediaRenderingMovieLayer };
</del><ins>+    enum MediaRenderingMode { MediaRenderingNone, MediaRenderingSoftwareRenderer, MediaRenderingMovieLayer };
</ins><span class="cx">     MediaRenderingMode currentRenderingMode() const;
</span><span class="cx">     MediaRenderingMode preferredRenderingMode() const;
</span><span class="cx">     
</span><span class="lines">@@ -147,9 +146,6 @@
</span><span class="cx">     void tearDownVideoRendering();
</span><span class="cx">     bool hasSetUpVideoRendering() const;
</span><span class="cx">     
</span><del>-    void createQTMovieView();
-    void detachQTMovieView();
-    
</del><span class="cx">     enum QTVideoRendererMode { QTVideoRendererModeDefault, QTVideoRendererModeListensForNewImages };
</span><span class="cx">     void createQTVideoRenderer(QTVideoRendererMode rendererMode);
</span><span class="cx">     void destroyQTVideoRenderer();
</span><span class="lines">@@ -180,7 +176,6 @@
</span><span class="cx"> 
</span><span class="cx">     MediaPlayer* m_player;
</span><span class="cx">     RetainPtr&lt;QTMovie&gt; m_qtMovie;
</span><del>-    RetainPtr&lt;QTMovieView&gt; m_qtMovieView;
</del><span class="cx">     RetainPtr&lt;QTVideoRendererWebKitOnly&gt; m_qtVideoRenderer;
</span><span class="cx">     RetainPtr&lt;WebCoreMovieObserver&gt; m_objcObserver;
</span><span class="cx">     String m_movieURL;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsmacMediaPlayerPrivateQTKitmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm (174105 => 174106)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm        2014-09-30 13:38:03 UTC (rev 174105)
+++ trunk/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm        2014-09-30 14:30:34 UTC (rev 174106)
</span><span class="lines">@@ -32,7 +32,6 @@
</span><span class="cx"> #import &quot;BlockExceptions.h&quot;
</span><span class="cx"> #import &quot;DocumentLoader.h&quot;
</span><span class="cx"> #import &quot;Frame.h&quot;
</span><del>-#import &quot;FrameView.h&quot;
</del><span class="cx"> #import &quot;HostWindow.h&quot;
</span><span class="cx"> #import &quot;GraphicsContext.h&quot;
</span><span class="cx"> #import &quot;URL.h&quot;
</span><span class="lines">@@ -52,7 +51,6 @@
</span><span class="cx"> SOFT_LINK(QTKit, QTMakeTime, QTTime, (long long timeValue, long timeScale), (timeValue, timeScale))
</span><span class="cx"> 
</span><span class="cx"> SOFT_LINK_CLASS(QTKit, QTMovie)
</span><del>-SOFT_LINK_CLASS(QTKit, QTMovieView)
</del><span class="cx"> SOFT_LINK_CLASS(QTKit, QTMovieLayer)
</span><span class="cx"> 
</span><span class="cx"> SOFT_LINK_POINTER(QTKit, QTTrackMediaTypeAttribute, NSString *)
</span><span class="lines">@@ -97,7 +95,6 @@
</span><span class="cx"> @end
</span><span class="cx"> 
</span><span class="cx"> #define QTMovie getQTMovieClass()
</span><del>-#define QTMovieView getQTMovieViewClass()
</del><span class="cx"> #define QTMovieLayer getQTMovieLayerClass()
</span><span class="cx"> 
</span><span class="cx"> #define QTTrackMediaTypeAttribute getQTTrackMediaTypeAttribute()
</span><span class="lines">@@ -145,21 +142,15 @@
</span><span class="cx"> };
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-@interface FakeQTMovieView : NSObject
-- (WebCoreMovieObserver *)delegate;
-@end
-
</del><span class="cx"> using namespace WebCore;
</span><span class="cx"> 
</span><span class="cx"> @interface WebCoreMovieObserver : NSObject
</span><span class="cx"> {
</span><span class="cx">     MediaPlayerPrivateQTKit* m_callback;
</span><del>-    NSView* m_view;
</del><span class="cx">     BOOL m_delayCallbacks;
</span><span class="cx"> }
</span><span class="cx"> -(id)initWithCallback:(MediaPlayerPrivateQTKit*)callback;
</span><span class="cx"> -(void)disconnect;
</span><del>--(void)setView:(NSView*)view;
</del><span class="cx"> -(void)repaint;
</span><span class="cx"> -(void)setDelayCallbacks:(BOOL)shouldDelay;
</span><span class="cx"> -(void)loadStateChanged:(NSNotification *)notification;
</span><span class="lines">@@ -381,81 +372,12 @@
</span><span class="cx">                                                object:m_qtMovie.get()];
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static void mainThreadSetNeedsDisplay(id self, SEL)
-{
-    id view = [self superview];
-    ASSERT(!view || [view isKindOfClass:[QTMovieView class]]);
-    if (!view || ![view isKindOfClass:[QTMovieView class]])
-        return;
-
-    FakeQTMovieView *movieView = static_cast&lt;FakeQTMovieView *&gt;(view);
-    WebCoreMovieObserver* delegate = [movieView delegate];
-    ASSERT(!delegate || [delegate isKindOfClass:[WebCoreMovieObserver class]]);
-    if (!delegate || ![delegate isKindOfClass:[WebCoreMovieObserver class]])
-        return;
-
-    [delegate repaint];
-}
-
</del><span class="cx"> static Class QTVideoRendererClass()
</span><span class="cx"> {
</span><span class="cx">      static Class QTVideoRendererWebKitOnlyClass = NSClassFromString(@&quot;QTVideoRendererWebKitOnly&quot;);
</span><span class="cx">      return QTVideoRendererWebKitOnlyClass;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void MediaPlayerPrivateQTKit::createQTMovieView()
-{
-    LOG(Media, &quot;MediaPlayerPrivateQTKit::createQTMovieView(%p)&quot;, this);
-    detachQTMovieView();
-
-    static bool addedCustomMethods = false;
-    if (!m_player-&gt;inMediaDocument() &amp;&amp; !addedCustomMethods) {
-        Class QTMovieContentViewClass = NSClassFromString(@&quot;QTMovieContentView&quot;);
-        ASSERT(QTMovieContentViewClass);
-
-        Method mainThreadSetNeedsDisplayMethod = class_getInstanceMethod(QTMovieContentViewClass, @selector(_mainThreadSetNeedsDisplay));
-        ASSERT(mainThreadSetNeedsDisplayMethod);
-
-        method_setImplementation(mainThreadSetNeedsDisplayMethod, reinterpret_cast&lt;IMP&gt;(mainThreadSetNeedsDisplay));
-        addedCustomMethods = true;
-    }
-
-    // delay callbacks as we *will* get notifications during setup
-    [m_objcObserver.get() setDelayCallbacks:YES];
-
-    m_qtMovieView = adoptNS([[QTMovieView alloc] init]);
-    setSize(m_player-&gt;size());
-    NSView* parentView = 0;
-    parentView = m_player-&gt;frameView()-&gt;documentView();
-    [parentView addSubview:m_qtMovieView.get()];
-    [m_qtMovieView.get() setDelegate:m_objcObserver.get()];
-    [m_objcObserver.get() setView:m_qtMovieView.get()];
-    [m_qtMovieView.get() setMovie:m_qtMovie.get()];
-    [m_qtMovieView.get() setControllerVisible:NO];
-    [m_qtMovieView.get() setPreservesAspectRatio:NO];
-    // the area not covered by video should be transparent
-    [m_qtMovieView.get() setFillColor:[NSColor clearColor]];
-
-    // If we're in a media document, allow QTMovieView to render in its default mode;
-    // otherwise tell it to draw synchronously.
-    // Note that we expect mainThreadSetNeedsDisplay to be invoked only when synchronous drawing is requested.
-    if (!m_player-&gt;inMediaDocument())
-        wkQTMovieViewSetDrawSynchronously(m_qtMovieView.get(), YES);
-
-    [m_objcObserver.get() setDelayCallbacks:NO];
-}
-
-void MediaPlayerPrivateQTKit::detachQTMovieView()
-{
-    LOG(Media, &quot;MediaPlayerPrivateQTKit::detachQTMovieView(%p)&quot;, this);
-    if (m_qtMovieView) {
-        [m_objcObserver.get() setView:nil];
-        [m_qtMovieView.get() setDelegate:nil];
-        [m_qtMovieView.get() removeFromSuperview];
-        m_qtMovieView = nil;
-    }
-}
-
</del><span class="cx"> void MediaPlayerPrivateQTKit::createQTVideoRenderer(QTVideoRendererMode rendererMode)
</span><span class="cx"> {
</span><span class="cx">     LOG(Media, &quot;MediaPlayerPrivateQTKit::createQTVideoRenderer(%p)&quot;, this);
</span><span class="lines">@@ -528,9 +450,6 @@
</span><span class="cx"> 
</span><span class="cx"> MediaPlayerPrivateQTKit::MediaRenderingMode MediaPlayerPrivateQTKit::currentRenderingMode() const
</span><span class="cx"> {
</span><del>-    if (m_qtMovieView)
-        return MediaRenderingMovieView;
-    
</del><span class="cx">     if (m_qtVideoLayer)
</span><span class="cx">         return MediaRenderingMovieLayer;
</span><span class="cx"> 
</span><span class="lines">@@ -542,14 +461,14 @@
</span><span class="cx"> 
</span><span class="cx"> MediaPlayerPrivateQTKit::MediaRenderingMode MediaPlayerPrivateQTKit::preferredRenderingMode() const
</span><span class="cx"> {
</span><del>-    if (!m_player-&gt;frameView() || !m_qtMovie)
</del><ins>+    if (!m_qtMovie)
</ins><span class="cx">         return MediaRenderingNone;
</span><span class="cx"> 
</span><span class="cx">     if (supportsAcceleratedRendering() &amp;&amp; m_player-&gt;mediaPlayerClient()-&gt;mediaPlayerRenderingCanBeAccelerated(m_player))
</span><span class="cx">         return MediaRenderingMovieLayer;
</span><span class="cx"> 
</span><span class="cx">     if (!QTVideoRendererClass())
</span><del>-        return MediaRenderingMovieView;
</del><ins>+        return MediaRenderingNone;
</ins><span class="cx">     
</span><span class="cx">     return MediaRenderingSoftwareRenderer;
</span><span class="cx"> }
</span><span class="lines">@@ -569,9 +488,6 @@
</span><span class="cx">         tearDownVideoRendering();
</span><span class="cx"> 
</span><span class="cx">     switch (preferredMode) {
</span><del>-    case MediaRenderingMovieView:
-        createQTMovieView();
-        break;
</del><span class="cx">     case MediaRenderingNone:
</span><span class="cx">     case MediaRenderingSoftwareRenderer:
</span><span class="cx">         createQTVideoRenderer(QTVideoRendererModeListensForNewImages);
</span><span class="lines">@@ -589,8 +505,6 @@
</span><span class="cx"> void MediaPlayerPrivateQTKit::tearDownVideoRendering()
</span><span class="cx"> {
</span><span class="cx">     LOG(Media, &quot;MediaPlayerPrivateQTKit::tearDownVideoRendering(%p)&quot;, this);
</span><del>-    if (m_qtMovieView)
-        detachQTMovieView();
</del><span class="cx">     if (m_qtVideoRenderer)
</span><span class="cx">         destroyQTVideoRenderer();
</span><span class="cx">     if (m_qtVideoLayer)
</span><span class="lines">@@ -599,8 +513,7 @@
</span><span class="cx"> 
</span><span class="cx"> bool MediaPlayerPrivateQTKit::hasSetUpVideoRendering() const
</span><span class="cx"> {
</span><del>-    return m_qtMovieView
-        || m_qtVideoLayer
</del><ins>+    return m_qtVideoLayer
</ins><span class="cx">         || m_qtVideoRenderer;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1219,13 +1132,6 @@
</span><span class="cx"> 
</span><span class="cx"> void MediaPlayerPrivateQTKit::setSize(const IntSize&amp;) 
</span><span class="cx"> { 
</span><del>-    // Don't resize the view now because [view setFrame] also resizes the movie itself, and because
-    // the renderer calls this function immediately when we report a size change (QTMovieSizeDidChangeNotification)
-    // we can get into a feedback loop observing the size change and resetting the size, and this can cause
-    // QuickTime to miss resetting a movie's size when the media size changes (as happens with an rtsp movie
-    // once the rtsp server sends the track sizes). Instead we remember the size passed to paint() and resize
-    // the view when it changes.
-    // &lt;rdar://problem/6336092&gt; REGRESSION: rtsp movie does not resize correctly
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void MediaPlayerPrivateQTKit::setVisible(bool b)
</span><span class="lines">@@ -1280,9 +1186,8 @@
</span><span class="cx"> {
</span><span class="cx">     if (context-&gt;paintingDisabled() || m_hasUnsupportedTracks)
</span><span class="cx">         return;
</span><del>-    NSView *view = m_qtMovieView.get();
</del><span class="cx">     id qtVideoRenderer = m_qtVideoRenderer.get();
</span><del>-    if (!view &amp;&amp; !qtVideoRenderer)
</del><ins>+    if (!qtVideoRenderer)
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     [m_objcObserver.get() setDelayCallbacks:YES];
</span><span class="lines">@@ -1298,37 +1203,11 @@
</span><span class="cx"> 
</span><span class="cx">     newContext = [NSGraphicsContext graphicsContextWithGraphicsPort:context-&gt;platformContext() flipped:NO];
</span><span class="cx"> 
</span><del>-    // draw the current video frame
-    if (qtVideoRenderer) {
-        [NSGraphicsContext saveGraphicsState];
-        [NSGraphicsContext setCurrentContext:newContext];
-        [(id&lt;WebKitVideoRenderingDetails&gt;)qtVideoRenderer drawInRect:paintRect];
-        [NSGraphicsContext restoreGraphicsState];
-    } else {
-        if (m_rect != r) {
-             m_rect = r;
-            if (m_player-&gt;inMediaDocument()) {
-                // the QTMovieView needs to be placed in the proper location for document mode
-                [view setFrame:m_rect];
-            }
-            else {
-                // We don't really need the QTMovieView in any specific location so let's just get it out of the way
-                // where it won't intercept events or try to bring up the context menu.
-                IntRect farAwayButCorrectSize(m_rect);
-                farAwayButCorrectSize.move(-1000000, -1000000);
-                [view setFrame:farAwayButCorrectSize];
-            }
-        }
</del><ins>+    [NSGraphicsContext saveGraphicsState];
+    [NSGraphicsContext setCurrentContext:newContext];
+    [(id&lt;WebKitVideoRenderingDetails&gt;)qtVideoRenderer drawInRect:paintRect];
+    [NSGraphicsContext restoreGraphicsState];
</ins><span class="cx"> 
</span><del>-        if (m_player-&gt;inMediaDocument()) {
-            // If we're using a QTMovieView in a media document, the view may get layer-backed. AppKit won't update
-            // the layer hosting correctly if we call displayRectIgnoringOpacity:inContext:, so use displayRectIgnoringOpacity:
-            // in this case. See &lt;rdar://problem/6702882&gt;.
-            [view displayRectIgnoringOpacity:paintRect];
-        } else
-            [view displayRectIgnoringOpacity:paintRect inContext:newContext];
-    }
-
</del><span class="cx">     END_BLOCK_OBJC_EXCEPTIONS;
</span><span class="cx">     [m_objcObserver.get() setDelayCallbacks:NO];
</span><span class="cx"> }
</span><span class="lines">@@ -1642,17 +1521,6 @@
</span><span class="cx">     m_callback = 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>--(NSMenu*)menuForEventDelegate:(NSEvent*)theEvent
-{
-    // Get the contextual menu from the QTMovieView's superview, the frame view
-    return [[m_view superview] menuForEvent:theEvent];
-}
-
--(void)setView:(NSView*)view
-{
-    m_view = view;
-}
-
</del><span class="cx"> -(void)repaint
</span><span class="cx"> {
</span><span class="cx">     if (m_delayCallbacks)
</span></span></pre>
</div>
</div>

</body>
</html>