Index: Source/core/html/HTMLMediaElement.h |
diff --git a/Source/core/html/HTMLMediaElement.h b/Source/core/html/HTMLMediaElement.h |
index 6cdc6faf30d5ba317298a5e871fc2c74c89f502e..ff5045eec3480e9f76d2120710eb4aab6cdb7dd2 100644 |
--- a/Source/core/html/HTMLMediaElement.h |
+++ b/Source/core/html/HTMLMediaElement.h |
@@ -265,6 +265,14 @@ public: |
virtual bool isHTMLAudioElement() const { return false; } |
virtual bool isHTMLVideoElement() const { return false; } |
+ // Notify us that we have changed layout size. This is useful so that we |
+ // can paint based on our last known size, without having to trigger a |
+ // layout mid-paint. |
+ void notifySizeChanged(const LayoutSize& newSize); |
+ |
+ // Get the last known layout size that we were given by notifySizeChanged. |
+ const LayoutSize& cachedLayoutSize() const { return m_cachedSize; } |
+ |
protected: |
HTMLMediaElement(const QualifiedName&, Document&); |
~HTMLMediaElement() override; |
@@ -620,6 +628,8 @@ private: |
friend class MediaController; |
PersistentWillBeMember<MediaController> m_mediaController; |
+ LayoutSize m_cachedSize; |
+ |
friend class Internals; |
friend class TrackDisplayUpdateScope; |