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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutMedia.cpp

Issue 2767823002: Media Remoting: Add interstitial elements to media element shadow dom. (Closed)
Patch Set: Addressed mlamouri's comments. Created 3 years, 8 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: 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;

Powered by Google App Engine
This is Rietveld 408576698