| Index: third_party/WebKit/Source/core/layout/LayoutMedia.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/LayoutMedia.cpp b/third_party/WebKit/Source/core/layout/LayoutMedia.cpp
|
| index d124303a4a5cdff4858b60a54092d174bda3bb3d..690574eeaae27d0c382f3359e851a5e5f0eab167 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutMedia.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutMedia.cpp
|
| @@ -59,16 +59,21 @@ void LayoutMedia::layout() {
|
| // overlap checking, see LayoutVTTCue.
|
| #if DCHECK_IS_ON()
|
| bool seenTextTrackContainer = false;
|
| + bool seenMediaRemotingInterstitial = false;
|
| #endif
|
| for (LayoutObject* child = m_children.lastChild(); child;
|
| child = child->previousSibling()) {
|
| #if DCHECK_IS_ON()
|
| - if (child->node()->isMediaControls())
|
| - ASSERT(!seenTextTrackContainer);
|
| - else if (child->node()->isTextTrackContainer())
|
| + if (child->node()->isMediaControls()) {
|
| + DCHECK(!seenTextTrackContainer);
|
| + } else if (child->node()->isTextTrackContainer()) {
|
| seenTextTrackContainer = true;
|
| - else
|
| + DCHECK(!seenMediaRemotingInterstitial);
|
| + } else if (child->node()->isMediaRemotingInterstitial()) {
|
| + seenMediaRemotingInterstitial = true;
|
| + } else {
|
| NOTREACHED();
|
| + }
|
| #endif
|
|
|
| // TODO(mlamouri): we miss some layouts because needsLayout returns false in
|
| @@ -115,7 +120,8 @@ bool LayoutMedia::isChildAllowed(LayoutObject* child,
|
| if (child->node()->isMediaControls())
|
| return child->isFlexibleBox();
|
|
|
| - if (child->node()->isTextTrackContainer())
|
| + if (child->node()->isTextTrackContainer() ||
|
| + child->node()->isMediaRemotingInterstitial())
|
| return true;
|
|
|
| return false;
|
|
|