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

Unified Diff: Source/core/layout/LayoutTextTrackContainer.cpp

Issue 949203002: Separate the text track container from the media controls (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: same size as media controls Created 5 years, 10 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: Source/core/layout/LayoutTextTrackContainer.cpp
diff --git a/Source/core/layout/LayoutTextTrackContainerElement.cpp b/Source/core/layout/LayoutTextTrackContainer.cpp
similarity index 82%
rename from Source/core/layout/LayoutTextTrackContainerElement.cpp
rename to Source/core/layout/LayoutTextTrackContainer.cpp
index 428a26f7ea6ca415e414d021ddf14fc09856544c..c32badd36f76a75bb750f880479bfeed7d67a603 100644
--- a/Source/core/layout/LayoutTextTrackContainerElement.cpp
+++ b/Source/core/layout/LayoutTextTrackContainer.cpp
@@ -27,29 +27,32 @@
#include "config.h"
-#include "core/layout/LayoutTextTrackContainerElement.h"
+#include "core/layout/LayoutTextTrackContainer.h"
#include "core/frame/DeprecatedScheduleStyleRecalcDuringLayout.h"
+#include "core/html/shadow/MediaControlElementTypes.h"
philipj_slow 2015/02/26 09:51:52 OK, this is ugly. Should I replace this with a sim
fs 2015/02/26 12:30:52 I get the feeling that could just use the layout t
rune 2015/02/26 13:17:15 I don't understand this comment about an include f
philipj_slow 2015/02/27 07:13:52 Do you mean the CueDisplayContext idea? Yeah, what
#include "core/layout/LayoutView.h"
namespace blink {
-LayoutTextTrackContainerElement::LayoutTextTrackContainerElement(Element* element)
+LayoutTextTrackContainer::LayoutTextTrackContainer(Element* element)
: RenderBlockFlow(element)
{
}
-void LayoutTextTrackContainerElement::layout()
+void LayoutTextTrackContainer::layout()
{
RenderBlockFlow::layout();
if (style()->display() == NONE)
philipj_slow 2015/02/26 09:51:52 Rune, is this even possible? I thought that Layout
rune 2015/02/26 13:17:15 This shouldn't happen as long as the renderer is c
return;
- ASSERT(mediaControlElementType(node()) == MediaTextTrackDisplayContainer);
+ HTMLMediaElement* mediaElement = toParentMediaElement(node());
+ if (!mediaElement)
+ return;
DeprecatedScheduleStyleRecalcDuringLayout marker(node()->document().lifecycle());
- static_cast<MediaControlTextTrackContainerElement*>(node())->updateSizes();
+ toTextTrackContainer(node())->updateSizes(*mediaElement);
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698