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..e313234aa7d3415ae4b3bc7665011963f94900bc 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 |
@@ -78,7 +83,8 @@ void LayoutMedia::layout() { |
continue; |
LayoutUnit width = newRect.width(); |
- if (child->node()->isMediaControls()) { |
+ if (child->node()->isMediaControls() || |
+ child->node()->isMediaRemotingInterstitial()) { |
mlamouri (slow - plz ping)
2017/04/07 13:18:37
I don't think you want this.
xjz
2017/04/07 23:07:01
Done.
|
width = computePanelWidth(newRect); |
} |
@@ -118,6 +124,9 @@ bool LayoutMedia::isChildAllowed(LayoutObject* child, |
if (child->node()->isTextTrackContainer()) |
return true; |
+ if (child->node()->isMediaRemotingInterstitial()) |
+ return true; |
mlamouri (slow - plz ping)
2017/04/07 13:18:37
Can you merge this with the isTextTrackContainer()
xjz
2017/04/07 23:07:01
Done.
|
+ |
return false; |
} |