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

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

Issue 263213002: Add use counters for VTTCue use/rendering and its attributes (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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/frame/UseCounter.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/track/vtt/VTTCue.cpp
diff --git a/Source/core/html/track/vtt/VTTCue.cpp b/Source/core/html/track/vtt/VTTCue.cpp
index df8cdf4c01ba630fb5cebaf02b63ee3431a89bd3..884063387655aa6073dc850c52b28eb4956e68c3 100644
--- a/Source/core/html/track/vtt/VTTCue.cpp
+++ b/Source/core/html/track/vtt/VTTCue.cpp
@@ -38,6 +38,7 @@
#include "core/dom/DocumentFragment.h"
#include "core/dom/NodeTraversal.h"
#include "core/events/Event.h"
+#include "core/frame/UseCounter.h"
#include "core/html/HTMLDivElement.h"
#include "core/html/track/TextTrack.h"
#include "core/html/track/TextTrackCueList.h"
@@ -217,6 +218,7 @@ VTTCue::VTTCue(Document& document, double startTime, double endTime, const Strin
, m_notifyRegion(true)
{
ScriptWrappable::init(this);
+ UseCounter::count(document, UseCounter::VTTCue);
}
VTTCue::~VTTCue()
@@ -760,6 +762,26 @@ void VTTCue::removeDisplayTree()
void VTTCue::updateDisplay(const IntSize& videoSize, HTMLDivElement& container)
{
+ UseCounter::count(document(), UseCounter::VTTCueRender);
+
+ if (m_writingDirection != Horizontal)
+ UseCounter::count(document(), UseCounter::VTTCueRenderVertical);
+
+ if (!m_snapToLines)
+ UseCounter::count(document(), UseCounter::VTTCueRenderSnapToLinesFalse);
+
+ if (m_linePosition != undefinedPosition)
+ UseCounter::count(document(), UseCounter::VTTCueRenderLineNotAuto);
+
+ if (m_textPosition != 50)
+ UseCounter::count(document(), UseCounter::VTTCueRenderPositionNot50);
+
+ if (m_cueSize != 100)
+ UseCounter::count(document(), UseCounter::VTTCueRenderSizeNot100);
+
+ if (m_cueAlignment != Middle)
+ UseCounter::count(document(), UseCounter::VTTCueRenderAlignNotMiddle);
+
RefPtr<VTTCueBox> displayBox = getDisplayTree(videoSize);
VTTRegion* region = 0;
if (track()->regions())
« no previous file with comments | « Source/core/frame/UseCounter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698