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

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: Rebased. 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 50fd030e94810d06329d65ee7c6a82a5bfc2c478..e0dcf82897d0bc37e604e8e52d0e3ae56b3e2d4c 100644
--- a/third_party/WebKit/Source/core/layout/LayoutMedia.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutMedia.cpp
@@ -59,16 +59,22 @@ void LayoutMedia::UpdateLayout() {
// overlap checking, see LayoutVTTCue.
#if DCHECK_IS_ON()
bool seen_text_track_container = false;
+ bool seen_media_remoting_interstitial = false;
#endif
for (LayoutObject* child = children_.LastChild(); child;
child = child->PreviousSibling()) {
#if DCHECK_IS_ON()
- if (child->GetNode()->IsMediaControls())
+ if (child->GetNode()->IsMediaControls()) {
DCHECK(!seen_text_track_container);
- else if (child->GetNode()->IsTextTrackContainer())
+ DCHECK(!seen_media_remoting_interstitial);
+ } else if (child->GetNode()->IsTextTrackContainer()) {
seen_text_track_container = true;
- else
+ DCHECK(!seen_media_remoting_interstitial);
+ } else if (child->GetNode()->IsMediaRemotingInterstitial()) {
+ seen_media_remoting_interstitial = true;
+ } else {
NOTREACHED();
+ }
#endif
// TODO(mlamouri): we miss some layouts because needsLayout returns false in
@@ -115,7 +121,8 @@ bool LayoutMedia::IsChildAllowed(LayoutObject* child,
if (child->GetNode()->IsMediaControls())
return child->IsFlexibleBox();
- if (child->GetNode()->IsTextTrackContainer())
+ if (child->GetNode()->IsTextTrackContainer() ||
+ child->GetNode()->IsMediaRemotingInterstitial())
return true;
return false;

Powered by Google App Engine
This is Rietveld 408576698