[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

vestbo at webkit.org vestbo at webkit.org
Wed Dec 22 12:14:05 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 9ad9365033fecffb4acd81fda15b88e449d5888f
Author: vestbo at webkit.org <vestbo at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Aug 17 17:18:22 2010 +0000

    Restore intrinsic size of video elements after loading poster
    
    Reviewed by Eric Carlson.
    
    The element might already have the instrinsic size of the video, in
    which case we don't want to override it witht that of the image.
    
    * rendering/RenderVideo.cpp: call updateIntrinsicSize() to restore size
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65514 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 0f583e9..36b6d12 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,14 @@
+2010-08-17  Tor Arne Vestbø  <tor.arne.vestbo at nokia.com>
+
+        Reviewed by Eric Carlson.
+
+        Restore intrinsic size of video elements after loading poster
+
+        The element might already have the instrinsic size of the video, in
+        which case we don't want to override it witht that of the image.
+
+        * rendering/RenderVideo.cpp: call updateIntrinsicSize() to restore size
+
 2010-08-17  Mahesh Kulkarni  <mahesh.kulkarni at nokia.com>
 
         Reviewed by Steve Block.
diff --git a/WebCore/rendering/RenderVideo.cpp b/WebCore/rendering/RenderVideo.cpp
index ab969cc..0f444b2 100644
--- a/WebCore/rendering/RenderVideo.cpp
+++ b/WebCore/rendering/RenderVideo.cpp
@@ -134,13 +134,14 @@ void RenderVideo::imageChanged(WrappedImagePtr newImage, const IntRect* rect)
     RenderMedia::imageChanged(newImage, rect);
 
     // Cache the image intrinsic size so we can continue to use it to draw the image correctly
-    // even after we know the video intrisic size but aren't able to draw video frames yet
-    // (we don't want to scale the poster to the video size).
-    if (videoElement()->shouldDisplayPosterImage()) {
-        if (errorOccurred())
-            updateIntrinsicSize();
+    // even if we know the video intrinsic size but aren't able to draw video frames yet
+    // (we don't want to scale the poster to the video size without keeping aspect ratio).
+    if (videoElement()->shouldDisplayPosterImage())
         m_cachedImageSize = intrinsicSize();
-    }
+
+    // The intrinsic size is now that of the image, but in case we already had the
+    // intrinsic size of the video we call this here to restore the video size.
+    updateIntrinsicSize();
 }
 
 IntRect RenderVideo::videoBox() const

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list