Index: third_party/WebKit/Source/core/paint/MediaControlsPainter.cpp |
diff --git a/third_party/WebKit/Source/core/paint/MediaControlsPainter.cpp b/third_party/WebKit/Source/core/paint/MediaControlsPainter.cpp |
index 827389b4b94b143b7d0724e0a2ba353bf814f0e6..6c6ae44f59a241eb5e0ab5479b27c24650474c64 100644 |
--- a/third_party/WebKit/Source/core/paint/MediaControlsPainter.cpp |
+++ b/third_party/WebKit/Source/core/paint/MediaControlsPainter.cpp |
@@ -31,6 +31,7 @@ |
#include "core/html/HTMLMediaElement.h" |
#include "core/html/TimeRanges.h" |
#include "core/html/shadow/MediaControlElementTypes.h" |
+#include "core/html/shadow/MediaControls.h" |
#include "core/paint/PaintInfo.h" |
#include "core/style/ComputedStyle.h" |
#include "platform/graphics/Gradient.h" |
@@ -325,9 +326,12 @@ void MediaControlsPainter::paintMediaSliderInternal(const LayoutObject& object, |
paintRoundedSliderBackground(rect, style, context, sliderBackgroundColor); |
+ TimeRanges* bufferedTimeRanges = mediaElement->mediaControls()->bufferedRangesForPainting(); |
liberato (no reviews please)
2016/08/29 15:25:34
could one use mediaElement->buffered() here as wel
Xianzhu
2016/08/29 18:04:14
This is required in the under-invalidation checkin
|
+ if (!bufferedTimeRanges) |
+ return; |
+ |
// Draw the buffered range. Since the element may have multiple buffered ranges and it'd be |
// distracting/'busy' to show all of them, show only the buffered range containing the current play head. |
- TimeRanges* bufferedTimeRanges = mediaElement->buffered(); |
float duration = mediaElement->duration(); |
float currentTime = mediaElement->currentTime(); |
if (std::isnan(duration) || std::isinf(duration) || !duration || std::isnan(currentTime)) |