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

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

Issue 988763002: Start separating the text track container from the media controls (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase. 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/layout/LayoutTextTrackContainer.h ('k') | Source/core/layout/LayoutTextTrackContainerElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutTextTrackContainer.cpp
diff --git a/Source/core/layout/LayoutTextTrackContainerElement.cpp b/Source/core/layout/LayoutTextTrackContainer.cpp
similarity index 76%
rename from Source/core/layout/LayoutTextTrackContainerElement.cpp
rename to Source/core/layout/LayoutTextTrackContainer.cpp
index 27ef571dd57a3f0cdb2a59e9bd742bec91abc613..2ca076ae06a162802f44514dd7bea813c0f72239 100644
--- a/Source/core/layout/LayoutTextTrackContainerElement.cpp
+++ b/Source/core/layout/LayoutTextTrackContainer.cpp
@@ -26,30 +26,32 @@
*/
#include "config.h"
-
-#include "core/layout/LayoutTextTrackContainerElement.h"
+#include "core/layout/LayoutTextTrackContainer.h"
#include "core/frame/DeprecatedScheduleStyleRecalcDuringLayout.h"
-#include "core/layout/LayoutView.h"
+#include "core/html/HTMLMediaElement.h"
+#include "core/html/track/TextTrackContainer.h"
namespace blink {
-LayoutTextTrackContainerElement::LayoutTextTrackContainerElement(Element* element)
+LayoutTextTrackContainer::LayoutTextTrackContainer(Element* element)
: LayoutBlockFlow(element)
{
}
-void LayoutTextTrackContainerElement::layout()
+void LayoutTextTrackContainer::layout()
{
LayoutBlockFlow::layout();
if (style()->display() == NONE)
return;
- ASSERT(mediaControlElementType(node()) == MediaTextTrackDisplayContainer);
-
DeprecatedScheduleStyleRecalcDuringLayout marker(node()->document().lifecycle());
- static_cast<MediaControlTextTrackContainerElement*>(node())->updateSizes();
+ TextTrackContainer* textTrackContainer = toTextTrackContainer(node());
+ ASSERT(textTrackContainer);
+ // Overlay enclosure -> Media controls -> Media element
+ LayoutObject* mediaElementLayoutObject = parent()->parent()->parent();
+ textTrackContainer->updateSizes(mediaElementLayoutObject);
}
} // namespace blink
« no previous file with comments | « Source/core/layout/LayoutTextTrackContainer.h ('k') | Source/core/layout/LayoutTextTrackContainerElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698