| Index: Source/core/html/track/vtt/VTTRegion.cpp
|
| diff --git a/Source/core/html/track/vtt/VTTRegion.cpp b/Source/core/html/track/vtt/VTTRegion.cpp
|
| index d2bc0555291250fa36c8f3b8a7fb8f540a688bb2..79f8164fca4fc3f3bd06d09e98757b63ca704176 100644
|
| --- a/Source/core/html/track/vtt/VTTRegion.cpp
|
| +++ b/Source/core/html/track/vtt/VTTRegion.cpp
|
| @@ -374,8 +374,9 @@ void VTTRegion::displayLastVTTCueBox()
|
|
|
| // Find first cue that is not entirely displayed and scroll it upwards.
|
| for (Element* child = ElementTraversal::firstChild(*m_cueContainer); child && !m_scrollTimer.isActive(); child = ElementTraversal::nextSibling(*child)) {
|
| - float childTop = toHTMLDivElement(child)->getBoundingClientRect()->top();
|
| - float childBottom = toHTMLDivElement(child)->getBoundingClientRect()->bottom();
|
| + RefPtrWillBeRawPtr<ClientRect> clientRect = child->getBoundingClientRect();
|
| + float childTop = clientRect->top();
|
| + float childBottom = clientRect->bottom();
|
|
|
| if (regionBottom >= childBottom)
|
| continue;
|
|
|