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

Unified Diff: Source/core/html/track/vtt/VTTRegion.cpp

Issue 420193007: Use new Traversal<> API more in the code base (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Take feedback into consideration Created 6 years, 5 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 | « Source/core/html/HTMLLabelElement.cpp ('k') | Source/core/rendering/svg/RenderSVGResourceClipper.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « Source/core/html/HTMLLabelElement.cpp ('k') | Source/core/rendering/svg/RenderSVGResourceClipper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698