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

Unified Diff: third_party/WebKit/Source/core/html/track/TextTrackContainer.h

Issue 2803243002: Use a ResizeObserver to determine default font-size for text tracks (Closed)
Patch Set: Update media/track/track-cue-rendering.html Created 3 years, 8 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
Index: third_party/WebKit/Source/core/html/track/TextTrackContainer.h
diff --git a/third_party/WebKit/Source/core/html/track/TextTrackContainer.h b/third_party/WebKit/Source/core/html/track/TextTrackContainer.h
index 9f864c44941b5d72d450bde335b7e11773accd32..decf3a3df12a5f804e3a4896498bc1c2121f0092 100644
--- a/third_party/WebKit/Source/core/html/track/TextTrackContainer.h
+++ b/third_party/WebKit/Source/core/html/track/TextTrackContainer.h
@@ -38,7 +38,7 @@ class HTMLMediaElement;
class TextTrackContainer final : public HTMLDivElement {
public:
- static TextTrackContainer* create(Document&);
+ static TextTrackContainer* create(HTMLMediaElement&);
// Runs the "rules for updating the text track rendering". The
// ExposingControls enum is used in the WebVTT processing model to reset the
@@ -48,13 +48,20 @@ class TextTrackContainer final : public HTMLDivElement {
DidStartExposingControls
};
void updateDisplay(HTMLMediaElement&, ExposingControls);
+ void updateDefaultFontSize(LayoutObject*);
+
+ DECLARE_VIRTUAL_TRACE();
private:
TextTrackContainer(Document&);
bool isTextTrackContainer() const override { return true; }
+ void observeSizeChanges(Element&);
LayoutObject* createLayoutObject(const ComputedStyle&) override;
+
+ Member<ResizeObserver> m_videoSizeObserver;
+ float m_defaultFontSize;
};
DEFINE_ELEMENT_TYPE_CASTS(TextTrackContainer, isTextTrackContainer());

Powered by Google App Engine
This is Rietveld 408576698