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

Unified Diff: third_party/WebKit/Source/core/html/shadow/MediaRemotingElements.cpp

Issue 2898553002: [Media,Remoting] Remove the disable remoting button on Android (Closed)
Patch Set: Use Android CSS to disable the button Created 3 years, 7 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
« no previous file with comments | « third_party/WebKit/Source/core/css/mediaControlsAndroid.css ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/shadow/MediaRemotingElements.cpp
diff --git a/third_party/WebKit/Source/core/html/shadow/MediaRemotingElements.cpp b/third_party/WebKit/Source/core/html/shadow/MediaRemotingElements.cpp
index c53bc9d89a9bc70e4e54f558e73914a91e81f0cd..7944d4c8924e6af90fa52d15283f5d5f3f354a04 100644
--- a/third_party/WebKit/Source/core/html/shadow/MediaRemotingElements.cpp
+++ b/third_party/WebKit/Source/core/html/shadow/MediaRemotingElements.cpp
@@ -64,10 +64,18 @@ MediaRemotingExitButtonElement::MediaRemotingExitButtonElement(
}
void MediaRemotingExitButtonElement::OnShown() {
+ if (const ComputedStyle* style = NonLayoutObjectComputedStyle()) {
+ if (style->Display() == EDisplay::kNone)
xjz 2017/05/25 19:02:18 Have you tested on this? I am not sure whether thi
whywhat 2017/05/25 20:26:29 The hiding of the button happens via the mediacont
xjz 2017/05/25 21:20:34 Yes, you are correct. When showing/hiding the inte
rune 2017/05/26 11:17:57 Querying the computed style requires that the comp
+ return;
+ }
GetDocument().addEventListener(EventTypeNames::click, listener_, true);
}
void MediaRemotingExitButtonElement::OnHidden() {
+ if (const ComputedStyle* style = NonLayoutObjectComputedStyle()) {
+ if (style->Display() == EDisplay::kNone)
+ return;
+ }
GetDocument().removeEventListener(EventTypeNames::click, listener_, true);
}
« no previous file with comments | « third_party/WebKit/Source/core/css/mediaControlsAndroid.css ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698