| Index: third_party/WebKit/Source/core/html/AutoplayExperimentHelper.cpp
|
| diff --git a/third_party/WebKit/Source/core/html/AutoplayExperimentHelper.cpp b/third_party/WebKit/Source/core/html/AutoplayExperimentHelper.cpp
|
| index bbfbbe36f2c0692d0d8d03247198e7fff8e36e28..80ead256c3e68e9c3b13db9a8171fbf7799cfa95 100644
|
| --- a/third_party/WebKit/Source/core/html/AutoplayExperimentHelper.cpp
|
| +++ b/third_party/WebKit/Source/core/html/AutoplayExperimentHelper.cpp
|
| @@ -327,6 +327,10 @@ bool AutoplayExperimentHelper::isEligible() const
|
| && !client().isLegacyViewportType())
|
| return false;
|
|
|
| + // If we require same-origin, then check the origin.
|
| + if (enabled(IfSameOrigin) && client().isCrossOrigin())
|
| + return false;
|
| +
|
| // If we require muted media and this is muted, then it is eligible.
|
| if (enabled(IfMuted))
|
| return client().muted();
|
| @@ -394,6 +398,8 @@ AutoplayExperimentHelper::Mode AutoplayExperimentHelper::fromString(const String
|
| value |= IfMuted;
|
| if (mode.contains("-ifmobile"))
|
| value |= IfMobile;
|
| + if (mode.contains("-ifsameorigin"))
|
| + value |= IfSameOrigin;
|
| if (mode.contains("-playmuted"))
|
| value |= PlayMuted;
|
|
|
|
|