Title: [88505] trunk/Source/WebCore
Revision
88505
Author
[email protected]
Date
2011-06-09 17:03:18 -0700 (Thu, 09 Jun 2011)

Log Message

2011-06-09  Jer Noble  <[email protected]>

        Reviewed by David Hyatt.

        Roll out r88468, and fix bug #61911 without making Element::offset functions virtual.
        https://bugs.webkit.org/show_bug.cgi?id=62400

        No new tests; covered by existing fullscreen/full-screen-video-offset.html test.

        * rendering/RenderVideo.cpp:
        (WebCore::rendererPlaceholder): Added; returns the placeholder block, if it exists.
        (WebCore::RenderVideo::offsetLeft): Pass the offset request to the placeholder block.
        (WebCore::RenderVideo::offsetTop): Ditto.
        (WebCore::RenderVideo::offsetWidth): Ditto.
        (WebCore::RenderVideo::offsetHeight): Ditto.
        * rendering/RenderVideo.h: Added virtual overrides for the offset functions.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (88504 => 88505)


--- trunk/Source/WebCore/ChangeLog	2011-06-10 00:02:23 UTC (rev 88504)
+++ trunk/Source/WebCore/ChangeLog	2011-06-10 00:03:18 UTC (rev 88505)
@@ -1,3 +1,20 @@
+2011-06-09  Jer Noble  <[email protected]>
+
+        Reviewed by David Hyatt.
+
+        Roll out r88468, and fix bug #61911 without making Element::offset functions virtual.
+        https://bugs.webkit.org/show_bug.cgi?id=62400
+
+        No new tests; covered by existing fullscreen/full-screen-video-offset.html test.
+
+        * rendering/RenderVideo.cpp:
+        (WebCore::rendererPlaceholder): Added; returns the placeholder block, if it exists.
+        (WebCore::RenderVideo::offsetLeft): Pass the offset request to the placeholder block.
+        (WebCore::RenderVideo::offsetTop): Ditto.
+        (WebCore::RenderVideo::offsetWidth): Ditto.
+        (WebCore::RenderVideo::offsetHeight): Ditto.
+        * rendering/RenderVideo.h: Added virtual overrides for the offset functions.
+
 2011-06-09  James Robinson  <[email protected]>
 
         Reviewed by Kenneth Russell.

Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (88504 => 88505)


--- trunk/Source/WebCore/html/HTMLMediaElement.cpp	2011-06-10 00:02:23 UTC (rev 88504)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp	2011-06-10 00:03:18 UTC (rev 88505)
@@ -2716,7 +2716,6 @@
     return 0;
 }
 
-
 }
 
 #endif

Modified: trunk/Source/WebCore/rendering/RenderVideo.cpp (88504 => 88505)


--- trunk/Source/WebCore/rendering/RenderVideo.cpp	2011-06-10 00:02:23 UTC (rev 88504)
+++ trunk/Source/WebCore/rendering/RenderVideo.cpp	2011-06-10 00:03:18 UTC (rev 88505)
@@ -37,6 +37,10 @@
 #include "PaintInfo.h"
 #include "RenderView.h"
 
+#if ENABLE(FULLSCREEN_API)
+#include "RenderFullScreen.h"
+#endif
+
 #if USE(ACCELERATED_COMPOSITING)
 #include "RenderLayer.h"
 #include "RenderLayerBacking.h"
@@ -282,6 +286,49 @@
 }
 #endif  // USE(ACCELERATED_COMPOSITING)
 
+#if ENABLE(FULLSCREEN_API)
+static const RenderBlock* rendererPlaceholder(const RenderObject* renderer)
+{
+    RenderObject* parent = renderer->parent();
+    if (!parent)
+        return 0;
+    
+    RenderFullScreen* fullScreen = parent->isRenderFullScreen() ? toRenderFullScreen(parent) : 0;
+    if (!fullScreen)
+        return 0;
+    
+    return fullScreen->placeholder();
+}
+
+int RenderVideo::offsetLeft() const
+{
+    if (const RenderBlock* block = rendererPlaceholder(this))
+        return block->offsetLeft();
+    return RenderMedia::offsetLeft();
+}
+
+int RenderVideo::offsetTop() const
+{
+    if (const RenderBlock* block = rendererPlaceholder(this))
+        return block->offsetTop();
+    return RenderMedia::offsetTop();
+}
+
+int RenderVideo::offsetWidth() const
+{
+    if (const RenderBlock* block = rendererPlaceholder(this))
+        return block->offsetWidth();
+    return RenderMedia::offsetWidth();
+}
+
+int RenderVideo::offsetHeight() const
+{
+    if (const RenderBlock* block = rendererPlaceholder(this))
+        return block->offsetHeight();
+    return RenderMedia::offsetHeight();
+}
+#endif
+
 } // namespace WebCore
 
 #endif

Modified: trunk/Source/WebCore/rendering/RenderVideo.h (88504 => 88505)


--- trunk/Source/WebCore/rendering/RenderVideo.h	2011-06-10 00:02:23 UTC (rev 88504)
+++ trunk/Source/WebCore/rendering/RenderVideo.h	2011-06-10 00:03:18 UTC (rev 88505)
@@ -74,6 +74,13 @@
     virtual int computeReplacedLogicalHeight() const;
     virtual int minimumReplacedHeight() const;
 
+#if ENABLE(FULLSCREEN_API)
+    virtual int offsetLeft() const;
+    virtual int offsetTop() const;
+    virtual int offsetWidth() const;
+    virtual int offsetHeight() const;
+#endif
+
     void updatePlayer();
 
     IntSize m_cachedImageSize;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to