Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(917)

Unified Diff: Source/core/rendering/RenderVideo.cpp

Issue 38313002: Remove <video> width and height attributes from intrisic size logic (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: learn to indent Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/media/video-intrinsic-width-height-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderVideo.cpp
diff --git a/Source/core/rendering/RenderVideo.cpp b/Source/core/rendering/RenderVideo.cpp
index fb198bd51e6e0eb3ea1d86d6fa35eb22b272a329..a7bd7be990703545ff93d238eee8d94ef3981d55 100644
--- a/Source/core/rendering/RenderVideo.cpp
+++ b/Source/core/rendering/RenderVideo.cpp
@@ -107,12 +107,6 @@ LayoutSize RenderVideo::calculateIntrinsicSize()
if (video->shouldDisplayPosterImage() && !m_cachedImageSize.isEmpty() && !imageResource()->errorOccurred())
return m_cachedImageSize;
- // When the natural size of the video is unavailable, we use the provided
- // width and height attributes of the video element as the intrinsic size until
- // better values become available.
- if (video->hasAttribute(widthAttr) && video->hasAttribute(heightAttr))
- return LayoutSize(video->width(), video->height());
-
// <video> in standalone media documents should not use the default 300x150
// size since they also have audio-only files. By setting the intrinsic
// size to 300x1 the video will resize itself in these cases, and audio will
« no previous file with comments | « LayoutTests/media/video-intrinsic-width-height-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698