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

Side by Side Diff: Source/WebCore/html/HTMLVideoElement.cpp

Issue 10870090: Merge 125052 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1229/
Patch Set: Created 8 years, 3 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 unified diff | Download patch
« no previous file with comments | « Source/WebCore/html/HTMLVideoElement.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 if (shouldDisplayPosterImage()) { 80 if (shouldDisplayPosterImage()) {
81 if (!m_imageLoader) 81 if (!m_imageLoader)
82 m_imageLoader = adoptPtr(new HTMLImageLoader(this)); 82 m_imageLoader = adoptPtr(new HTMLImageLoader(this));
83 m_imageLoader->updateFromElement(); 83 m_imageLoader->updateFromElement();
84 if (renderer()) 84 if (renderer())
85 toRenderImage(renderer())->imageResource()->setCachedImage(m_imageLo ader->image()); 85 toRenderImage(renderer())->imageResource()->setCachedImage(m_imageLo ader->image());
86 } 86 }
87 #endif 87 #endif
88 } 88 }
89 89
90 void HTMLVideoElement::detach()
91 {
92 HTMLMediaElement::detach();
93
94 if (!shouldDisplayPosterImage() && m_imageLoader)
95 m_imageLoader.clear();
96 }
97
98 void HTMLVideoElement::collectStyleForAttribute(const Attribute& attribute, Styl ePropertySet* style) 90 void HTMLVideoElement::collectStyleForAttribute(const Attribute& attribute, Styl ePropertySet* style)
99 { 91 {
100 if (attribute.name() == widthAttr) 92 if (attribute.name() == widthAttr)
101 addHTMLLengthToStyle(style, CSSPropertyWidth, attribute.value()); 93 addHTMLLengthToStyle(style, CSSPropertyWidth, attribute.value());
102 else if (attribute.name() == heightAttr) 94 else if (attribute.name() == heightAttr)
103 addHTMLLengthToStyle(style, CSSPropertyHeight, attribute.value()); 95 addHTMLLengthToStyle(style, CSSPropertyHeight, attribute.value());
104 else 96 else
105 HTMLMediaElement::collectStyleForAttribute(attribute, style); 97 HTMLMediaElement::collectStyleForAttribute(attribute, style);
106 } 98 }
107 99
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 if (!player()) 300 if (!player())
309 return 0; 301 return 0;
310 302
311 return player()->droppedFrameCount(); 303 return player()->droppedFrameCount();
312 } 304 }
313 #endif 305 #endif
314 306
315 } 307 }
316 308
317 #endif 309 #endif
OLDNEW
« no previous file with comments | « Source/WebCore/html/HTMLVideoElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698