Chromium Code Reviews| 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 03339999edfbd5bf8c3e29076b99454fef831d41..bf0b479b8f3439b03c12e7d7eff69fe68ac2b9f2 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/Settings.h" |
| #include "core/frame/UseCounter.h" |
| #include "core/html/HTMLDivElement.h" |
| #include "core/html/track/TextTrack.h" |
| @@ -46,6 +47,7 @@ |
| #include "core/html/track/vtt/VTTParser.h" |
| #include "core/html/track/vtt/VTTRegionList.h" |
| #include "core/html/track/vtt/VTTScanner.h" |
| +#include "core/page/Page.h" |
| #include "core/rendering/RenderVTTCue.h" |
| #include "platform/FloatConversion.h" |
| #include "platform/RuntimeEnabledFeatures.h" |
| @@ -204,6 +206,19 @@ void VTTCueBox::applyCSSProperties(const VTTDisplayParameters& displayParameters |
| setInlineStyleProperty(CSSPropertyWhiteSpace, CSSValuePre); |
| } |
| + |
| + if (m_cue->element()->ownerDocument()->page()) { |
|
fs
2015/02/13 13:13:16
Use document() rather than ownerDocument(). Also u
srivats
2015/02/18 01:46:51
Done.
|
| + Settings& settings = m_cue->element()->ownerDocument()->page()->settings(); |
| + m_cue->element()->setInlineStyleProperty(CSSPropertyColor, settings.textTrackTextColor(), true); |
|
fs
2015/02/13 13:13:15
I think it would make more sense to handle the sty
srivats
2015/02/16 22:50:14
Yes the "" means no override and we would use it w
fs
2015/02/17 09:43:46
What I meant was that passing "" to this particula
srivats
2015/02/18 01:46:51
Done.
|
| + m_cue->element()->setInlineStyleProperty(CSSPropertyBackgroundColor, settings.textTrackBackgroundColor(), true); |
| + m_cue->element()->setInlineStyleProperty(CSSPropertyTextShadow, settings.textTrackTextShadow(), true); |
| + m_cue->element()->setInlineStyleProperty(CSSPropertyFontSize, settings.textTrackTextSize(), true); |
| + m_cue->element()->setInlineStyleProperty(CSSPropertyFontFamily, settings.textTrackFontFamily(), true); |
| + m_cue->element()->setInlineStyleProperty(CSSPropertyFontStyle, settings.textTrackFontStyle(), true); |
| + m_cue->element()->setInlineStyleProperty(CSSPropertyFontVariant, settings.textTrackFontVariant(), true); |
| + // Set background color for text track display |
|
fs
2015/02/13 13:13:15
"text track display" -> "the cue box."; and maybe
srivats
2015/02/18 01:46:51
Done.
|
| + setInlineStyleProperty(CSSPropertyBackgroundColor, settings.textTrackWindowColor(), true); |
| + } |
| } |
| LayoutObject* VTTCueBox::createRenderer(const LayoutStyle&) |