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

Unified Diff: Source/core/html/track/TextTrackContainer.cpp

Issue 949203002: Separate the text track container from the media controls (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: address nits Created 5 years, 9 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/html/shadow/MediaControls.cpp ('k') | Source/core/layout/LayoutMedia.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/track/TextTrackContainer.cpp
diff --git a/Source/core/html/track/TextTrackContainer.cpp b/Source/core/html/track/TextTrackContainer.cpp
index d2c4a08146eb02017f59302bb93bb5f743e91ce7..bb0935eeacb5a0a05fb0da6f300da18500ed0d04 100644
--- a/Source/core/html/track/TextTrackContainer.cpp
+++ b/Source/core/html/track/TextTrackContainer.cpp
@@ -45,7 +45,6 @@ PassRefPtrWillBeRawPtr<TextTrackContainer> TextTrackContainer::create(Document&
{
RefPtrWillBeRawPtr<TextTrackContainer> element = adoptRefWillBeNoop(new TextTrackContainer(document));
element->setShadowPseudoId(AtomicString("-webkit-media-text-track-container", AtomicString::ConstructFromLiteral));
- element->setInlineStyleProperty(CSSPropertyDisplay, CSSValueNone);
return element.release();
}
@@ -74,6 +73,11 @@ void TextTrackContainer::updateDisplay(HTMLMediaElement& mediaElement)
// 3. Let output be an empty list of absolutely positioned CSS block boxes.
+ // Note: This is a layout algorithm, expressed terms of appending CSS block
+ // boxes to output, and the "apply WebVTT cue settings" part is implemented
+ // in LayoutVTTCue. Here we merely create the DOM tree from which the layout
+ // tree is built and append it to this TextTrackContainer.
+
// 4. If the user agent is exposing a user interface for video, add to
// output one or more completely transparent positioned CSS block boxes that
// cover the same region as the user interface.
@@ -82,9 +86,7 @@ void TextTrackContainer::updateDisplay(HTMLMediaElement& mediaElement)
// a user interface for video, but now it is, let reset be true. Otherwise,
// let reset be false.
- // There is nothing to be done explicitly for 4th and 5th steps, as
- // everything is handled through CSS. The caption box is on top of the
- // controls box, in a container set with the -webkit-box display property.
+ // TODO(philipj): Implement step 4 and 5.
// 6. Let tracks be the subset of video's list of text tracks that have as
// their rules for updating the text track rendering these rules for
@@ -119,10 +121,7 @@ void TextTrackContainer::updateDisplay(HTMLMediaElement& mediaElement)
}
// 11. Return output.
- if (hasChildren())
- removeInlineStyleProperty(CSSPropertyDisplay);
- else
- setInlineStyleProperty(CSSPropertyDisplay, CSSValueNone);
+ // See the note for step 3 for why there is no output to return.
}
} // namespace blink
« no previous file with comments | « Source/core/html/shadow/MediaControls.cpp ('k') | Source/core/layout/LayoutMedia.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698