Chromium Code Reviews| Index: third_party/WebKit/Source/core/html/HTMLMediaElement.cpp |
| diff --git a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp |
| index 7beecb9dd4be9a28665ac847fe9e6f45f67b085f..897f538769f9fd7766a109fddb8e0c879802bbc2 100644 |
| --- a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp |
| +++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp |
| @@ -487,6 +487,13 @@ void HTMLMediaElement::didMoveToNewDocument(Document& oldDocument) |
| { |
| DVLOG(MEDIA_LOG_LEVEL) << "didMoveToNewDocument(" << (void*)this << ")"; |
| + // If any experiment is enabled, then we want to enable a user gesture by |
| + // default, otherwise the experiment does nothing. |
| + if ((document().settings() && document().settings()->mediaPlaybackRequiresUserGesture()) |
| + || m_autoplayHelper->isExperimentEnabled()) { |
|
mlamouri (slow - plz ping)
2016/06/07 15:40:28
I think you should do something like:
```
bool old
Zhiqiang Zhang (Slow)
2016/06/07 17:02:40
Done.
|
| + m_lockedPendingUserGesture = true; |
| + } |
| + |
| if (m_shouldDelayLoadEvent) { |
| document().incrementLoadEventDelayCount(); |
| // Note: Keeping the load event delay count increment on oldDocument that was added |