Chromium Code Reviews| 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); |
| } |