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

Unified Diff: Source/core/rendering/RenderVTTCue.cpp

Issue 847813003: Avoid unnecessary float<->LayoutUnit conversions in RenderVTTCue (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 11 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/rendering/RenderVTTCue.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderVTTCue.cpp
diff --git a/Source/core/rendering/RenderVTTCue.cpp b/Source/core/rendering/RenderVTTCue.cpp
index 0c239fd2665b27c45506db600a906a999073b4b9..2bfd886e05db7d7140d830a34928f455aff2522e 100644
--- a/Source/core/rendering/RenderVTTCue.cpp
+++ b/Source/core/rendering/RenderVTTCue.cpp
@@ -27,7 +27,8 @@
#include "core/rendering/RenderVTTCue.h"
#include "core/html/track/vtt/VTTCue.h"
-#include "core/rendering/RenderView.h"
+#include "core/rendering/LayoutState.h"
+#include "core/rendering/RenderInline.h"
namespace blink {
@@ -129,8 +130,7 @@ void RenderVTTCue::placeBoxInDefaultPosition(LayoutUnit position, bool& switched
// 9. Default: Remember the position of all the boxes in boxes as their
// default position.
- // FIXME: Why the direct conversion between float and LayoutUnit? crbug.com/350474
- m_fallbackPosition = FloatPoint(location());
+ m_defaultPosition = location();
// 10. Let switched be false.
switched = false;
@@ -200,8 +200,7 @@ bool RenderVTTCue::switchDirection(bool& switched, LayoutUnit& step)
{
// 15. Switch direction: Move all the boxes in boxes back to their
// default position as determined in the step above labeled default.
- setX(m_fallbackPosition.x());
- setY(m_fallbackPosition.y());
+ setLocation(m_defaultPosition);
// 16. If switched is true, jump to the step labeled done
// positioning below.
« no previous file with comments | « Source/core/rendering/RenderVTTCue.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698