Chromium Code Reviews| 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(); |
|
fs
2015/03/06 17:50:03
Had to get a bit "creative" here...
philipj_slow
2015/03/06 18:12:27
Uh, yeah :)
|
| + textTrackContainer->updateSizes(mediaElementLayoutObject); |
| } |
| } // namespace blink |