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

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: Remove cast text message element. Not assuming remoting interstitial is media control. 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..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;
}

Powered by Google App Engine
This is Rietveld 408576698