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

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: Rebase 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 064d96b5ac6716bbc5c53bad208dfd17742d8c68..8c8ca84c904b7b9d82a0fadd28987e5bd054ca43 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 {
kDidStartExposingControls
};
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> video_size_observer_;
+ float default_font_size_;
};
DEFINE_ELEMENT_TYPE_CASTS(TextTrackContainer, IsTextTrackContainer());

Powered by Google App Engine
This is Rietveld 408576698