Diff
Modified: trunk/LayoutTests/ChangeLog (203751 => 203752)
--- trunk/LayoutTests/ChangeLog 2016-07-26 23:33:58 UTC (rev 203751)
+++ trunk/LayoutTests/ChangeLog 2016-07-26 23:36:52 UTC (rev 203752)
@@ -1,3 +1,16 @@
+2016-07-26 Myles C. Maxfield <mmaxfi...@apple.com>
+
+ [iPhone] Playing a video on tudou.com plays only sound, no video
+ https://bugs.webkit.org/show_bug.cgi?id=160178
+ <rdar://problem/27535468>
+
+ Reviewed by Eric Carlson and Dan Bernstein.
+
+ * media/video-playsinline-expected.txt:
+ * media/video-playsinline.html:
+ * media/video-webkit-playsinline-expected.txt: Added.
+ * media/video-webkit-playsinline.html: Added.
+
2016-07-26 Chris Dumez <cdu...@apple.com>
Align CSSStyleDeclaration with the specification
Modified: trunk/LayoutTests/media/video-playsinline-expected.txt (203751 => 203752)
--- trunk/LayoutTests/media/video-playsinline-expected.txt 2016-07-26 23:33:58 UTC (rev 203751)
+++ trunk/LayoutTests/media/video-playsinline-expected.txt 2016-07-26 23:36:52 UTC (rev 203752)
@@ -1,130 +1,26 @@
-RUN(internals.settings.setAllowsInlineMediaPlaybackWithPlaysInlineAttribute(true))
-RUN(internals.settings.setAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute(true))
+RUN(internals.settings.setInlineMediaPlaybackRequiresPlaysInlineAttribute(true))
RUN(video.playsInline = false)
-RUN(video.removeAttribute("webkit-playsinline", ""))
EVENT(canplaythrough)
RUN(video.play())
EVENT(playing)
EXPECTED (video.webkitDisplayingFullscreen == 'true') OK
-RUN(internals.settings.setAllowsInlineMediaPlaybackWithPlaysInlineAttribute(true))
-RUN(internals.settings.setAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute(true))
-RUN(video.playsInline = false)
-RUN(video.setAttribute("webkit-playsinline", ""))
-EVENT(canplaythrough)
-RUN(video.play())
-EVENT(playing)
-EXPECTED (video.webkitDisplayingFullscreen == 'false') OK
-RUN(internals.settings.setAllowsInlineMediaPlaybackWithPlaysInlineAttribute(true))
-RUN(internals.settings.setAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute(false))
-RUN(video.playsInline = false)
-RUN(video.setAttribute("webkit-playsinline", ""))
-EVENT(canplaythrough)
-RUN(video.play())
-EVENT(playing)
-EXPECTED (video.webkitDisplayingFullscreen == 'true') OK
-RUN(internals.settings.setAllowsInlineMediaPlaybackWithPlaysInlineAttribute(true))
-RUN(internals.settings.setAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute(false))
-RUN(video.playsInline = false)
-RUN(video.removeAttribute("webkit-playsinline", ""))
-EVENT(canplaythrough)
-RUN(video.play())
-EVENT(playing)
-EXPECTED (video.webkitDisplayingFullscreen == 'true') OK
-RUN(internals.settings.setAllowsInlineMediaPlaybackWithPlaysInlineAttribute(true))
-RUN(internals.settings.setAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute(true))
+RUN(internals.settings.setInlineMediaPlaybackRequiresPlaysInlineAttribute(true))
RUN(video.playsInline = true)
-RUN(video.setAttribute("webkit-playsinline", ""))
EVENT(canplaythrough)
RUN(video.play())
EVENT(playing)
EXPECTED (video.webkitDisplayingFullscreen == 'false') OK
-RUN(internals.settings.setAllowsInlineMediaPlaybackWithPlaysInlineAttribute(true))
-RUN(internals.settings.setAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute(true))
-RUN(video.playsInline = true)
-RUN(video.removeAttribute("webkit-playsinline", ""))
-EVENT(canplaythrough)
-RUN(video.play())
-EVENT(playing)
-EXPECTED (video.webkitDisplayingFullscreen == 'false') OK
-RUN(internals.settings.setAllowsInlineMediaPlaybackWithPlaysInlineAttribute(true))
-RUN(internals.settings.setAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute(false))
-RUN(video.playsInline = true)
-RUN(video.setAttribute("webkit-playsinline", ""))
-EVENT(canplaythrough)
-RUN(video.play())
-EVENT(playing)
-EXPECTED (video.webkitDisplayingFullscreen == 'false') OK
-RUN(internals.settings.setAllowsInlineMediaPlaybackWithPlaysInlineAttribute(true))
-RUN(internals.settings.setAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute(false))
-RUN(video.playsInline = true)
-RUN(video.removeAttribute("webkit-playsinline", ""))
-EVENT(canplaythrough)
-RUN(video.play())
-EVENT(playing)
-EXPECTED (video.webkitDisplayingFullscreen == 'false') OK
-RUN(internals.settings.setAllowsInlineMediaPlaybackWithPlaysInlineAttribute(false))
-RUN(internals.settings.setAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute(true))
+RUN(internals.settings.setInlineMediaPlaybackRequiresPlaysInlineAttribute(false))
RUN(video.playsInline = false)
-RUN(video.setAttribute("webkit-playsinline", ""))
EVENT(canplaythrough)
RUN(video.play())
EVENT(playing)
EXPECTED (video.webkitDisplayingFullscreen == 'false') OK
-RUN(internals.settings.setAllowsInlineMediaPlaybackWithPlaysInlineAttribute(false))
-RUN(internals.settings.setAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute(true))
-RUN(video.playsInline = false)
-RUN(video.removeAttribute("webkit-playsinline", ""))
-EVENT(canplaythrough)
-RUN(video.play())
-EVENT(playing)
-EXPECTED (video.webkitDisplayingFullscreen == 'true') OK
-RUN(internals.settings.setAllowsInlineMediaPlaybackWithPlaysInlineAttribute(false))
-RUN(internals.settings.setAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute(false))
-RUN(video.playsInline = false)
-RUN(video.setAttribute("webkit-playsinline", ""))
-EVENT(canplaythrough)
-RUN(video.play())
-EVENT(playing)
-EXPECTED (video.webkitDisplayingFullscreen == 'false') OK
-RUN(internals.settings.setAllowsInlineMediaPlaybackWithPlaysInlineAttribute(false))
-RUN(internals.settings.setAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute(false))
-RUN(video.playsInline = false)
-RUN(video.removeAttribute("webkit-playsinline", ""))
-EVENT(canplaythrough)
-RUN(video.play())
-EVENT(playing)
-EXPECTED (video.webkitDisplayingFullscreen == 'false') OK
-RUN(internals.settings.setAllowsInlineMediaPlaybackWithPlaysInlineAttribute(false))
-RUN(internals.settings.setAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute(true))
+RUN(internals.settings.setInlineMediaPlaybackRequiresPlaysInlineAttribute(false))
RUN(video.playsInline = true)
-RUN(video.setAttribute("webkit-playsinline", ""))
EVENT(canplaythrough)
RUN(video.play())
EVENT(playing)
EXPECTED (video.webkitDisplayingFullscreen == 'false') OK
-RUN(internals.settings.setAllowsInlineMediaPlaybackWithPlaysInlineAttribute(false))
-RUN(internals.settings.setAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute(true))
-RUN(video.playsInline = true)
-RUN(video.removeAttribute("webkit-playsinline", ""))
-EVENT(canplaythrough)
-RUN(video.play())
-EVENT(playing)
-EXPECTED (video.webkitDisplayingFullscreen == 'true') OK
-RUN(internals.settings.setAllowsInlineMediaPlaybackWithPlaysInlineAttribute(false))
-RUN(internals.settings.setAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute(false))
-RUN(video.playsInline = true)
-RUN(video.setAttribute("webkit-playsinline", ""))
-EVENT(canplaythrough)
-RUN(video.play())
-EVENT(playing)
-EXPECTED (video.webkitDisplayingFullscreen == 'false') OK
-RUN(internals.settings.setAllowsInlineMediaPlaybackWithPlaysInlineAttribute(false))
-RUN(internals.settings.setAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute(false))
-RUN(video.playsInline = true)
-RUN(video.removeAttribute("webkit-playsinline", ""))
-EVENT(canplaythrough)
-RUN(video.play())
-EVENT(playing)
-EXPECTED (video.webkitDisplayingFullscreen == 'false') OK
END OF TEST
Modified: trunk/LayoutTests/media/video-playsinline.html (203751 => 203752)
--- trunk/LayoutTests/media/video-playsinline.html 2016-07-26 23:33:58 UTC (rev 203751)
+++ trunk/LayoutTests/media/video-playsinline.html 2016-07-26 23:36:52 UTC (rev 203752)
@@ -17,16 +17,14 @@
endTest();
}
-function testPlaysInline(requiresPlaysInline, requiresWebKitPlaysInline, hasPlaysInline, hasWebKitPlaysInline, expectedDisplayingFullscreen)
+function testPlaysInline(requiresPlaysInline, hasPlaysInline, expectedDisplayingFullscreen)
{
- run('internals.settings.setAllowsInlineMediaPlaybackWithPlaysInlineAttribute(' + requiresPlaysInline + ')');
- run('internals.settings.setAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute(' + requiresWebKitPlaysInline + ')');
+ run('internals.settings.setInlineMediaPlaybackRequiresPlaysInlineAttribute(' + requiresPlaysInline + ')');
video = media = document.createElement('video');
document.body.appendChild(video);
video.controls = true;
video.src = "" 'content/test');
run('video.playsInline = ' + hasPlaysInline);
- run('video.' + (hasWebKitPlaysInline ? 'set' : 'remove') + 'Attribute("webkit-playsinline", "")');
waitForEventOnce('canplaythrough', () => {
runWithKeyDown(() => {
run('video.play()');
@@ -41,101 +39,29 @@
function testRequiresPlaysInlineAndDoesntHaveIt()
{
- testPlaysInline(true, true, false, false, true);
+ testPlaysInline(true, false, true);
}
-function testRequiresPlaysInlineAndDoesntHaveIt2()
-{
- testPlaysInline(true, true, false, true, false);
-}
-
-function testRequiresPlaysInlineAndDoesntHaveIt3()
-{
- testPlaysInline(true, false, false, true, true);
-}
-
-function testRequiresPlaysInlineAndDoesntHaveIt4()
-{
- testPlaysInline(true, false, false, false, true);
-}
-
function testRequiresPlaysInlineAndDoesHaveIt()
{
- testPlaysInline(true, true, true, true, false);
+ testPlaysInline(true, true, false);
}
-function testRequiresPlaysInlineAndDoesHaveIt2()
-{
- testPlaysInline(true, true, true, false, false);
-}
-
-function testRequiresPlaysInlineAndDoesHaveIt3()
-{
- testPlaysInline(true, false, true, true, false);
-}
-
-function testRequiresPlaysInlineAndDoesHaveIt4()
-{
- testPlaysInline(true, false, true, false, false);
-}
-
function testDoesNotRequirePlaysInlineAndDoesntHaveIt()
{
- testPlaysInline(false, true, false, true, false);
+ testPlaysInline(false, false, false);
}
-function testDoesNotRequirePlaysInlineAndDoesntHaveIt2()
-{
- testPlaysInline(false, true, false, false, true);
-}
-
-function testDoesNotRequirePlaysInlineAndDoesntHaveIt3()
-{
- testPlaysInline(false, false, false, true, false);
-}
-
-function testDoesNotRequirePlaysInlineAndDoesntHaveIt4()
-{
- testPlaysInline(false, false, false, false, false);
-}
-
function testDoesNotRequirePlaysInlineAndDoesHaveIt()
{
- testPlaysInline(false, true, true, true, false);
+ testPlaysInline(false, true, false);
}
-function testDoesNotRequirePlaysInlineAndDoesHaveIt2()
-{
- testPlaysInline(false, true, true, false, true);
-}
-
-function testDoesNotRequirePlaysInlineAndDoesHaveIt3()
-{
- testPlaysInline(false, false, true, true, false);
-}
-
-function testDoesNotRequirePlaysInlineAndDoesHaveIt4()
-{
- testPlaysInline(false, false, true, false, false);
-}
-
var tests = [
testRequiresPlaysInlineAndDoesntHaveIt,
- testRequiresPlaysInlineAndDoesntHaveIt2,
- testRequiresPlaysInlineAndDoesntHaveIt3,
- testRequiresPlaysInlineAndDoesntHaveIt4,
testRequiresPlaysInlineAndDoesHaveIt,
- testRequiresPlaysInlineAndDoesHaveIt2,
- testRequiresPlaysInlineAndDoesHaveIt3,
- testRequiresPlaysInlineAndDoesHaveIt4,
testDoesNotRequirePlaysInlineAndDoesntHaveIt,
- testDoesNotRequirePlaysInlineAndDoesntHaveIt2,
- testDoesNotRequirePlaysInlineAndDoesntHaveIt3,
- testDoesNotRequirePlaysInlineAndDoesntHaveIt4,
testDoesNotRequirePlaysInlineAndDoesHaveIt,
- testDoesNotRequirePlaysInlineAndDoesHaveIt2,
- testDoesNotRequirePlaysInlineAndDoesHaveIt3,
- testDoesNotRequirePlaysInlineAndDoesHaveIt4
];
</script>
Added: trunk/LayoutTests/media/video-webkit-playsinline-expected.txt (0 => 203752)
--- trunk/LayoutTests/media/video-webkit-playsinline-expected.txt (rev 0)
+++ trunk/LayoutTests/media/video-webkit-playsinline-expected.txt 2016-07-26 23:36:52 UTC (rev 203752)
@@ -0,0 +1,26 @@
+RUN(internals.settings.setInlineMediaPlaybackRequiresPlaysInlineAttribute(true))
+RUN(video.removeAttribute("webkit-playsinline", ""))
+EVENT(canplaythrough)
+RUN(video.play())
+EVENT(playing)
+EXPECTED (video.webkitDisplayingFullscreen == 'true') OK
+RUN(internals.settings.setInlineMediaPlaybackRequiresPlaysInlineAttribute(true))
+RUN(video.setAttribute("webkit-playsinline", ""))
+EVENT(canplaythrough)
+RUN(video.play())
+EVENT(playing)
+EXPECTED (video.webkitDisplayingFullscreen == 'true') OK
+RUN(internals.settings.setInlineMediaPlaybackRequiresPlaysInlineAttribute(false))
+RUN(video.removeAttribute("webkit-playsinline", ""))
+EVENT(canplaythrough)
+RUN(video.play())
+EVENT(playing)
+EXPECTED (video.webkitDisplayingFullscreen == 'false') OK
+RUN(internals.settings.setInlineMediaPlaybackRequiresPlaysInlineAttribute(false))
+RUN(video.setAttribute("webkit-playsinline", ""))
+EVENT(canplaythrough)
+RUN(video.play())
+EVENT(playing)
+EXPECTED (video.webkitDisplayingFullscreen == 'false') OK
+END OF TEST
+
Property changes on: trunk/LayoutTests/media/video-webkit-playsinline-expected.txt
___________________________________________________________________
Added: svn:eol-style
+native
\ No newline at end of property
Added: svn:keywords
+Author Date Id Rev URL
\ No newline at end of property
Added: trunk/LayoutTests/media/video-webkit-playsinline.html (0 => 203752)
--- trunk/LayoutTests/media/video-webkit-playsinline.html (rev 0)
+++ trunk/LayoutTests/media/video-webkit-playsinline.html 2016-07-26 23:36:52 UTC (rev 203752)
@@ -0,0 +1,71 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src=""
+<script src=""
+<script>
+function go()
+{
+ runNextTest();
+}
+
+function runNextTest()
+{
+ if (tests.length)
+ tests.shift()();
+ else
+ endTest();
+}
+
+function testPlaysInline(requiresPlaysInline, hasWebkitPlaysInline, expectedDisplayingFullscreen)
+{
+ run(`internals.settings.setInlineMediaPlaybackRequiresPlaysInlineAttribute(${requiresPlaysInline})`);
+ video = media = document.createElement('video');
+ document.body.appendChild(video);
+ video.controls = true;
+ video.src = "" 'content/test');
+ run(`video.${hasWebkitPlaysInline ? 'set' : 'remove'}Attribute("webkit-playsinline", "")`);
+ waitForEventOnce('canplaythrough', () => {
+ runWithKeyDown(() => {
+ run('video.play()');
+ });
+ })
+ waitForEventOnce('playing', () => {
+ testExpected('video.webkitDisplayingFullscreen', expectedDisplayingFullscreen);
+ document.body.removeChild(video);
+ runNextTest();
+ });
+}
+
+function testRequiresPlaysInlineAndDoesntHaveIt()
+{
+ testPlaysInline(true, false, true);
+}
+
+function testRequiresPlaysInlineAndDoesHaveIt()
+{
+ testPlaysInline(true, true, true);
+}
+
+function testDoesNotRequirePlaysInlineAndDoesntHaveIt()
+{
+ testPlaysInline(false, false, false);
+}
+
+function testDoesNotRequirePlaysInlineAndDoesHaveIt()
+{
+ testPlaysInline(false, true, false);
+}
+
+var tests = [
+ testRequiresPlaysInlineAndDoesntHaveIt,
+ testRequiresPlaysInlineAndDoesHaveIt,
+ testDoesNotRequirePlaysInlineAndDoesntHaveIt,
+ testDoesNotRequirePlaysInlineAndDoesHaveIt,
+];
+
+</script>
+</head>
+<body _onload_="go()">
+</body>
+</html>
\ No newline at end of file
Modified: trunk/Source/WebCore/ChangeLog (203751 => 203752)
--- trunk/Source/WebCore/ChangeLog 2016-07-26 23:33:58 UTC (rev 203751)
+++ trunk/Source/WebCore/ChangeLog 2016-07-26 23:36:52 UTC (rev 203752)
@@ -1,3 +1,43 @@
+2016-07-26 Myles C. Maxfield <mmaxfi...@apple.com>
+
+ [iPhone] Playing a video on tudou.com plays only sound, no video
+ https://bugs.webkit.org/show_bug.cgi?id=160178
+ <rdar://problem/27535468>
+
+ Reviewed by Eric Carlson and Dan Bernstein.
+
+ This patch re-implements r203520 in a much simpler way which doesn't involve a new SPI.
+ The biggest problem with r203520 is that it make it impossible for a WKWebView to match
+ MobileSafari's behavior. Instead of adding this new SPI, a simple version check should
+ be used to keep old apps working.
+
+ The new behavior is characterized by the following table:
+
+ | iOS | Non-iOS
+ =============================================================================================
+ requiresPlayInlineAttribute == true | Old app: honor -webkit-playsinline | honor playsinline
+ | New app: honor playsinline | honor playsinline
+ ---------------------------------------------------------------------------------------------
+ requiresPlayInlineAttribute == false | Always inline | Always inline
+
+ Specifically, this patch reverts r203545 which is the commit which actually removes
+ the old SPI. As soon as Safari is migrated back to this old SPI, I'll remove the two
+ new SPIs added in r203520.
+
+ Tests: media/video-playsinline.html
+ media/video-webkit-playsinline.html
+
+ * html/MediaElementSession.cpp:
+ (WebCore::MediaElementSession::requiresFullscreenForVideoPlayback):
+ * page/Settings.cpp:
+ * page/Settings.in:
+ * testing/InternalSettings.cpp:
+ (WebCore::InternalSettings::Backup::Backup):
+ (WebCore::InternalSettings::Backup::restoreTo):
+ (WebCore::InternalSettings::setInlineMediaPlaybackRequiresPlaysInlineAttribute):
+ * testing/InternalSettings.h:
+ * testing/InternalSettings.idl:
+
2016-07-26 Zalan Bujtas <za...@apple.com>
Move RenderView::shouldDisableLayoutStateForSubtree to SubtreeLayoutStateMaintainer.
Modified: trunk/Source/WebCore/html/MediaElementSession.cpp (203751 => 203752)
--- trunk/Source/WebCore/html/MediaElementSession.cpp 2016-07-26 23:33:58 UTC (rev 203751)
+++ trunk/Source/WebCore/html/MediaElementSession.cpp 2016-07-26 23:36:52 UTC (rev 203752)
@@ -47,6 +47,7 @@
#include "RenderView.h"
#include "ScriptController.h"
#include "SourceBuffer.h"
+#include <wtf/spi/darwin/dyldSPI.h>
#if PLATFORM(IOS)
#include "AudioSession.h"
@@ -465,16 +466,14 @@
if (!settings || !settings->allowsInlineMediaPlayback())
return true;
- bool requiresPlaysInline = settings->allowsInlineMediaPlaybackWithPlaysInlineAttribute();
- bool requiresWebKitPlaysInline = settings->allowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute();
-
- if (!requiresPlaysInline && !requiresWebKitPlaysInline)
+ if (!settings->inlineMediaPlaybackRequiresPlaysInlineAttribute())
return false;
- bool hasPlaysInline = element.hasAttributeWithoutSynchronization(HTMLNames::playsinlineAttr);
- bool hasWebKitPlaysInline = element.hasAttributeWithoutSynchronization(HTMLNames::webkit_playsinlineAttr);
-
- return !((requiresPlaysInline && hasPlaysInline) || (requiresWebKitPlaysInline && hasWebKitPlaysInline));
+#if PLATFORM(IOS)
+ if (dyld_get_program_sdk_version() < DYLD_IOS_VERSION_10_0)
+ return !element.hasAttributeWithoutSynchronization(HTMLNames::webkit_playsinlineAttr);
+#endif
+ return !element.hasAttributeWithoutSynchronization(HTMLNames::playsinlineAttr);
}
bool MediaElementSession::allowsAutomaticMediaDataLoading(const HTMLMediaElement& element) const
Modified: trunk/Source/WebCore/page/Settings.cpp (203751 => 203752)
--- trunk/Source/WebCore/page/Settings.cpp 2016-07-26 23:33:58 UTC (rev 203751)
+++ trunk/Source/WebCore/page/Settings.cpp 2016-07-26 23:36:52 UTC (rev 203752)
@@ -138,6 +138,7 @@
static const bool defaultFixedBackgroundsPaintRelativeToDocument = true;
static const bool defaultAcceleratedCompositingForFixedPositionEnabled = true;
static const bool defaultAllowsInlineMediaPlayback = false;
+static const bool defaultInlineMediaPlaybackRequiresPlaysInlineAttribute = true;
static const bool defaultAllowsInlineMediaPlaybackWithPlaysInlineAttribute = true;
static const bool defaultAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute = true;
static const bool defaultVideoPlaybackRequiresUserGesture = true;
@@ -152,6 +153,7 @@
static const bool defaultFixedBackgroundsPaintRelativeToDocument = false;
static const bool defaultAcceleratedCompositingForFixedPositionEnabled = false;
static const bool defaultAllowsInlineMediaPlayback = true;
+static const bool defaultInlineMediaPlaybackRequiresPlaysInlineAttribute = false;
static const bool defaultAllowsInlineMediaPlaybackWithPlaysInlineAttribute = false;
static const bool defaultAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute = false;
static const bool defaultVideoPlaybackRequiresUserGesture = false;
Modified: trunk/Source/WebCore/page/Settings.in (203751 => 203752)
--- trunk/Source/WebCore/page/Settings.in 2016-07-26 23:33:58 UTC (rev 203751)
+++ trunk/Source/WebCore/page/Settings.in 2016-07-26 23:36:52 UTC (rev 203752)
@@ -131,6 +131,7 @@
mainContentUserGestureOverrideEnabled initial=false
allowsInlineMediaPlayback initial=defaultAllowsInlineMediaPlayback
allowsInlineMediaPlaybackAfterFullscreen initial=true
+inlineMediaPlaybackRequiresPlaysInlineAttribute initial=defaultInlineMediaPlaybackRequiresPlaysInlineAttribute
allowsInlineMediaPlaybackWithPlaysInlineAttribute initial=defaultAllowsInlineMediaPlaybackWithPlaysInlineAttribute
allowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute initial=defaultAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute
allowsPictureInPictureMediaPlayback initial=defaultAllowsPictureInPictureMediaPlayback
Modified: trunk/Source/WebCore/testing/InternalSettings.cpp (203751 => 203752)
--- trunk/Source/WebCore/testing/InternalSettings.cpp 2016-07-26 23:33:58 UTC (rev 203751)
+++ trunk/Source/WebCore/testing/InternalSettings.cpp 2016-07-26 23:36:52 UTC (rev 203752)
@@ -107,6 +107,7 @@
#endif
, m_allowsInlineMediaPlayback(settings.allowsInlineMediaPlayback())
, m_allowsInlineMediaPlaybackAfterFullscreen(settings.allowsInlineMediaPlaybackAfterFullscreen())
+ , m_inlineMediaPlaybackRequiresPlaysInlineAttribute(settings.inlineMediaPlaybackRequiresPlaysInlineAttribute())
, m_allowsInlineMediaPlaybackWithPlaysInlineAttribute(settings.allowsInlineMediaPlaybackWithPlaysInlineAttribute())
, m_allowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute(settings.allowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute())
#if ENABLE(INDEXED_DATABASE_IN_WORKERS)
@@ -184,6 +185,7 @@
#endif
settings.setAllowsInlineMediaPlayback(m_allowsInlineMediaPlayback);
settings.setAllowsInlineMediaPlaybackAfterFullscreen(m_allowsInlineMediaPlaybackAfterFullscreen);
+ settings.setInlineMediaPlaybackRequiresPlaysInlineAttribute(m_inlineMediaPlaybackRequiresPlaysInlineAttribute);
settings.setAllowsInlineMediaPlaybackWithPlaysInlineAttribute(m_allowsInlineMediaPlaybackWithPlaysInlineAttribute);
settings.setAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute(m_allowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute);
RuntimeEnabledFeatures::sharedFeatures().setPluginReplacementEnabled(m_pluginReplacementEnabled);
@@ -576,6 +578,12 @@
settings()->setAllowsInlineMediaPlaybackAfterFullscreen(allows);
}
+void InternalSettings::setInlineMediaPlaybackRequiresPlaysInlineAttribute(bool requires, ExceptionCode& ec)
+{
+ InternalSettingsGuardForSettings();
+ settings()->setInlineMediaPlaybackRequiresPlaysInlineAttribute(requires);
+}
+
void InternalSettings::setAllowsInlineMediaPlaybackWithPlaysInlineAttribute(bool requires, ExceptionCode& ec)
{
InternalSettingsGuardForSettings();
Modified: trunk/Source/WebCore/testing/InternalSettings.h (203751 => 203752)
--- trunk/Source/WebCore/testing/InternalSettings.h 2016-07-26 23:33:58 UTC (rev 203751)
+++ trunk/Source/WebCore/testing/InternalSettings.h 2016-07-26 23:36:52 UTC (rev 203752)
@@ -107,6 +107,7 @@
#endif
bool m_allowsInlineMediaPlayback;
bool m_allowsInlineMediaPlaybackAfterFullscreen;
+ bool m_inlineMediaPlaybackRequiresPlaysInlineAttribute;
bool m_allowsInlineMediaPlaybackWithPlaysInlineAttribute;
bool m_allowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute;
#if ENABLE(INDEXED_DATABASE_IN_WORKERS)
@@ -163,6 +164,7 @@
void setScrollingTreeIncludesFrames(bool, ExceptionCode&);
void setAllowsInlineMediaPlayback(bool, ExceptionCode&);
void setAllowsInlineMediaPlaybackAfterFullscreen(bool, ExceptionCode&);
+ void setInlineMediaPlaybackRequiresPlaysInlineAttribute(bool, ExceptionCode&);
void setAllowsInlineMediaPlaybackWithPlaysInlineAttribute(bool, ExceptionCode&);
void setAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute(bool, ExceptionCode&);
void setIndexedDBWorkersEnabled(bool, ExceptionCode&);
Modified: trunk/Source/WebCore/testing/InternalSettings.idl (203751 => 203752)
--- trunk/Source/WebCore/testing/InternalSettings.idl 2016-07-26 23:33:58 UTC (rev 203751)
+++ trunk/Source/WebCore/testing/InternalSettings.idl 2016-07-26 23:36:52 UTC (rev 203752)
@@ -77,6 +77,7 @@
[RaisesException] void setMinimumTimerInterval(unrestricted double intervalInSeconds);
[RaisesException] void setAllowsInlineMediaPlayback(boolean allows);
[RaisesException] void setAllowsInlineMediaPlaybackAfterFullscreen(boolean allows);
+ [RaisesException] void setInlineMediaPlaybackRequiresPlaysInlineAttribute(boolean requires);
[RaisesException] void setAllowsInlineMediaPlaybackWithPlaysInlineAttribute(boolean requires);
[RaisesException] void setAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute(boolean requires);
Modified: trunk/Source/WebKit/mac/ChangeLog (203751 => 203752)
--- trunk/Source/WebKit/mac/ChangeLog 2016-07-26 23:33:58 UTC (rev 203751)
+++ trunk/Source/WebKit/mac/ChangeLog 2016-07-26 23:36:52 UTC (rev 203752)
@@ -1,3 +1,20 @@
+2016-07-26 Myles C. Maxfield <mmaxfi...@apple.com>
+
+ [iPhone] Playing a video on tudou.com plays only sound, no video
+ https://bugs.webkit.org/show_bug.cgi?id=160178
+ <rdar://problem/27535468>
+
+ Reviewed by Eric Carlson and Dan Bernstein.
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+ (-[WebPreferences inlineMediaPlaybackRequiresPlaysInlineAttribute]):
+ (-[WebPreferences setInlineMediaPlaybackRequiresPlaysInlineAttribute:]):
+ * WebView/WebPreferencesPrivate.h:
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChanged:]):
+
2016-07-26 Simon Fraser <simon.fra...@apple.com>
Allow LOG macros to be used outside the namespace, and other logging cleanup
Modified: trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h (203751 => 203752)
--- trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h 2016-07-26 23:33:58 UTC (rev 203751)
+++ trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h 2016-07-26 23:36:52 UTC (rev 203752)
@@ -126,6 +126,7 @@
#define WebKitMainContentUserGestureOverrideEnabledPreferenceKey @"WebKitMainContentUserGestureOverrideEnabled"
#define WebKitAllowsInlineMediaPlaybackPreferenceKey @"WebKitMediaPlaybackAllowsInline"
#define WebKitAllowsInlineMediaPlaybackAfterFullscreenPreferenceKey @"WebKitAllowsInlineMediaPlaybackAfterFullscreen"
+#define WebKitInlineMediaPlaybackRequiresPlaysInlineAttributeKey @"InlineMediaPlaybackRequiresPlaysInlineAttribute"
#define WebKitAllowsInlineMediaPlaybackWithPlaysInlineAttributeKey @"AllowsInlineMediaPlaybackWithPlaysInlineAttribute"
#define WebKitAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttributeKey @"AllowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute"
#define WebKitInvisibleAutoplayNotPermittedKey @"InvisibleAutoplayNotPermitted"
Modified: trunk/Source/WebKit/mac/WebView/WebPreferences.mm (203751 => 203752)
--- trunk/Source/WebKit/mac/WebView/WebPreferences.mm 2016-07-26 23:33:58 UTC (rev 203751)
+++ trunk/Source/WebKit/mac/WebView/WebPreferences.mm 2016-07-26 23:36:52 UTC (rev 203752)
@@ -525,6 +525,7 @@
#if !PLATFORM(IOS)
[NSNumber numberWithBool:YES], WebKitAllowsInlineMediaPlaybackPreferenceKey,
[NSNumber numberWithBool:NO], WebKitAllowsInlineMediaPlaybackAfterFullscreenPreferenceKey,
+ [NSNumber numberWithBool:NO], WebKitInlineMediaPlaybackRequiresPlaysInlineAttributeKey,
[NSNumber numberWithBool:NO], WebKitAllowsInlineMediaPlaybackWithPlaysInlineAttributeKey,
[NSNumber numberWithBool:NO], WebKitAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttributeKey,
[NSNumber numberWithBool:YES], WebKitMediaControlsScaleWithPageZoomPreferenceKey,
@@ -539,6 +540,7 @@
#else
[NSNumber numberWithBool:allowsInlineMediaPlayback], WebKitAllowsInlineMediaPlaybackPreferenceKey,
[NSNumber numberWithBool:allowsInlineMediaPlaybackAfterFullscreen], WebKitAllowsInlineMediaPlaybackAfterFullscreenPreferenceKey,
+ [NSNumber numberWithBool:requiresPlaysInlineAttribute], WebKitInlineMediaPlaybackRequiresPlaysInlineAttributeKey,
[NSNumber numberWithBool:requiresPlaysInlineAttribute], WebKitAllowsInlineMediaPlaybackWithPlaysInlineAttributeKey,
[NSNumber numberWithBool:requiresPlaysInlineAttribute], WebKitAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttributeKey,
[NSNumber numberWithBool:NO], WebKitMediaControlsScaleWithPageZoomPreferenceKey,
@@ -2285,6 +2287,16 @@
[self _setBoolValue:flag forKey:WebKitAllowsInlineMediaPlaybackPreferenceKey];
}
+- (BOOL)inlineMediaPlaybackRequiresPlaysInlineAttribute
+{
+ return [self _boolValueForKey:WebKitInlineMediaPlaybackRequiresPlaysInlineAttributeKey];
+}
+
+- (void)setInlineMediaPlaybackRequiresPlaysInlineAttribute:(BOOL)flag
+{
+ [self _setBoolValue:flag forKey:WebKitInlineMediaPlaybackRequiresPlaysInlineAttributeKey];
+}
+
- (BOOL)allowsInlineMediaPlaybackWithPlaysInlineAttribute
{
return [self _boolValueForKey:WebKitAllowsInlineMediaPlaybackWithPlaysInlineAttributeKey];
Modified: trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h (203751 => 203752)
--- trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h 2016-07-26 23:33:58 UTC (rev 203751)
+++ trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h 2016-07-26 23:36:52 UTC (rev 203752)
@@ -262,6 +262,9 @@
- (void)setMediaPlaybackAllowsInline:(BOOL)flag;
- (BOOL)mediaPlaybackAllowsInline;
+- (void)setInlineMediaPlaybackRequiresPlaysInlineAttribute:(BOOL)flag;
+- (BOOL)inlineMediaPlaybackRequiresPlaysInlineAttribute;
+
- (void)setAllowsInlineMediaPlaybackWithPlaysInlineAttribute:(BOOL)flag;
- (BOOL)allowsInlineMediaPlaybackWithPlaysInlineAttribute;
Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (203751 => 203752)
--- trunk/Source/WebKit/mac/WebView/WebView.mm 2016-07-26 23:33:58 UTC (rev 203751)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm 2016-07-26 23:36:52 UTC (rev 203752)
@@ -2348,6 +2348,7 @@
settings.setMainContentUserGestureOverrideEnabled([preferences overrideUserGestureRequirementForMainContent]);
settings.setAllowsInlineMediaPlayback([preferences mediaPlaybackAllowsInline]);
settings.setAllowsInlineMediaPlaybackAfterFullscreen([preferences allowsInlineMediaPlaybackAfterFullscreen]);
+ settings.setInlineMediaPlaybackRequiresPlaysInlineAttribute([preferences inlineMediaPlaybackRequiresPlaysInlineAttribute]);
settings.setAllowsInlineMediaPlaybackWithPlaysInlineAttribute([preferences allowsInlineMediaPlaybackWithPlaysInlineAttribute]);
settings.setAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute([preferences allowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute]);
settings.setInvisibleAutoplayNotPermitted([preferences invisibleAutoplayNotPermitted]);
Modified: trunk/Source/WebKit2/ChangeLog (203751 => 203752)
--- trunk/Source/WebKit2/ChangeLog 2016-07-26 23:33:58 UTC (rev 203751)
+++ trunk/Source/WebKit2/ChangeLog 2016-07-26 23:36:52 UTC (rev 203752)
@@ -1,3 +1,27 @@
+2016-07-26 Myles C. Maxfield <mmaxfi...@apple.com>
+
+ [iPhone] Playing a video on tudou.com plays only sound, no video
+ https://bugs.webkit.org/show_bug.cgi?id=160178
+ <rdar://problem/27535468>
+
+ Reviewed by Eric Carlson and Dan Bernstein.
+
+ * Shared/WebPreferencesDefinitions.h:
+ * UIProcess/API/C/WKPreferences.cpp:
+ (WKPreferencesSetInlineMediaPlaybackRequiresPlaysInlineAttribute):
+ (WKPreferencesGetInlineMediaPlaybackRequiresPlaysInlineAttribute):
+ * UIProcess/API/C/WKPreferencesRefPrivate.h:
+ * UIProcess/API/Cocoa/WKWebView.mm:
+ (-[WKWebView _initializeWithConfiguration:]):
+ * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
+ (-[WKWebViewConfiguration init]):
+ (-[WKWebViewConfiguration copyWithZone:]):
+ (-[WKWebViewConfiguration _inlineMediaPlaybackRequiresPlaysInlineAttribute]):
+ (-[WKWebViewConfiguration _setInlineMediaPlaybackRequiresPlaysInlineAttribute:]):
+ * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::updatePreferences):
+
2016-07-26 Alex Christensen <achristen...@webkit.org>
Remove unused DownloadAuthenticationClient
Modified: trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h (203751 => 203752)
--- trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h 2016-07-26 23:33:58 UTC (rev 203751)
+++ trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h 2016-07-26 23:36:52 UTC (rev 203752)
@@ -156,6 +156,7 @@
macro(MainContentUserGestureOverrideEnabled, mainContentUserGestureOverrideEnabled, Bool, bool, false, "", "") \
macro(AllowsInlineMediaPlayback, allowsInlineMediaPlayback, Bool, bool, DEFAULT_ALLOWS_INLINE_MEDIA_PLAYBACK, "", "") \
macro(AllowsInlineMediaPlaybackAfterFullscreen, allowsInlineMediaPlaybackAfterFullscreen, Bool, bool, DEFAULT_ALLOWS_INLINE_MEDIA_PLAYBACK_AFTER_FULLSCREEN, "", "") \
+ macro(InlineMediaPlaybackRequiresPlaysInlineAttribute, inlineMediaPlaybackRequiresPlaysInlineAttribute, Bool, bool, DEFAULT_INLINE_MEDIA_PLAYBACK_REQUIRES_PLAYS_INLINE_ATTRIBUTE, "", "") \
macro(AllowsInlineMediaPlaybackWithPlaysInlineAttribute, allowsInlineMediaPlaybackWithPlaysInlineAttribute, Bool, bool, DEFAULT_ALLOWS_INLINE_MEDIA_PLAYBACK_WITH_PLAYS_INLINE_ATTRIBUTE, "", "") \
macro(AllowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute, allowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute, Bool, bool, DEFAULT_ALLOWS_INLINE_MEDIA_PLAYBACK_WITH_WEBKIT_PLAYS_INLINE_ATTRIBUTE, "", "") \
macro(InvisibleAutoplayNotPermitted, invisibleAutoplayNotPermitted, Bool, bool, DEFAULT_INVISIBLE_AUTOPLAY_NOT_PERMITTED, "", "") \
Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp (203751 => 203752)
--- trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp 2016-07-26 23:33:58 UTC (rev 203751)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp 2016-07-26 23:36:52 UTC (rev 203752)
@@ -793,6 +793,16 @@
return toImpl(preferencesRef)->allowsInlineMediaPlayback();
}
+void WKPreferencesSetInlineMediaPlaybackRequiresPlaysInlineAttribute(WKPreferencesRef preferencesRef, bool flag)
+{
+ toImpl(preferencesRef)->setInlineMediaPlaybackRequiresPlaysInlineAttribute(flag);
+}
+
+bool WKPreferencesGetInlineMediaPlaybackRequiresPlaysInlineAttribute(WKPreferencesRef preferencesRef)
+{
+ return toImpl(preferencesRef)->inlineMediaPlaybackRequiresPlaysInlineAttribute();
+}
+
void WKPreferencesSetAllowsInlineMediaPlaybackWithPlaysInlineAttribute(WKPreferencesRef preferencesRef, bool flag)
{
toImpl(preferencesRef)->setAllowsInlineMediaPlaybackWithPlaysInlineAttribute(flag);
Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesRefPrivate.h (203751 => 203752)
--- trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesRefPrivate.h 2016-07-26 23:33:58 UTC (rev 203751)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesRefPrivate.h 2016-07-26 23:36:52 UTC (rev 203752)
@@ -191,6 +191,10 @@
WK_EXPORT void WKPreferencesSetMediaPlaybackAllowsInline(WKPreferencesRef preferencesRef, bool flag);
WK_EXPORT bool WKPreferencesGetMediaPlaybackAllowsInline(WKPreferencesRef preferencesRef);
+// Defaults to false.
+WK_EXPORT void WKPreferencesSetInlineMediaPlaybackRequiresPlaysInlineAttribute(WKPreferencesRef preferencesRef, bool flag);
+WK_EXPORT bool WKPreferencesGetInlineMediaPlaybackRequiresPlaysInlineAttribute(WKPreferencesRef preferencesRef);
+
// Defaults to true on iOS, false elsewhere.
WK_EXPORT void WKPreferencesSetAllowsInlineMediaPlaybackWithPlaysInlineAttribute(WKPreferencesRef preferencesRef, bool flag);
WK_EXPORT bool WKPreferencesGetAllowsInlineMediaPlaybackWithPlaysInlineAttribute(WKPreferencesRef preferencesRef);
Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm (203751 => 203752)
--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm 2016-07-26 23:33:58 UTC (rev 203751)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm 2016-07-26 23:36:52 UTC (rev 203752)
@@ -457,6 +457,7 @@
pageConfiguration->preferenceValues().set(WebKit::WebPreferencesKey::allowsInlineMediaPlaybackKey(), WebKit::WebPreferencesStore::Value(!![_configuration allowsInlineMediaPlayback]));
pageConfiguration->preferenceValues().set(WebKit::WebPreferencesKey::allowsInlineMediaPlaybackAfterFullscreenKey(), WebKit::WebPreferencesStore::Value(!![_configuration _allowsInlineMediaPlaybackAfterFullscreen]));
+ pageConfiguration->preferenceValues().set(WebKit::WebPreferencesKey::inlineMediaPlaybackRequiresPlaysInlineAttributeKey(), WebKit::WebPreferencesStore::Value(!![_configuration _inlineMediaPlaybackRequiresPlaysInlineAttribute]));
pageConfiguration->preferenceValues().set(WebKit::WebPreferencesKey::allowsInlineMediaPlaybackWithPlaysInlineAttributeKey(), WebKit::WebPreferencesStore::Value(!![_configuration _allowsInlineMediaPlaybackWithPlaysInlineAttribute]));
pageConfiguration->preferenceValues().set(WebKit::WebPreferencesKey::allowsInlineMediaPlaybackWithWebKitPlaysInlineAttributeKey(), WebKit::WebPreferencesStore::Value(!![_configuration _allowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute]));
pageConfiguration->preferenceValues().set(WebKit::WebPreferencesKey::allowsPictureInPictureMediaPlaybackKey(), WebKit::WebPreferencesStore::Value(!![_configuration allowsPictureInPictureMediaPlayback] && shouldAllowPictureInPictureMediaPlayback()));
Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm (203751 => 203752)
--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm 2016-07-26 23:33:58 UTC (rev 203751)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm 2016-07-26 23:36:52 UTC (rev 203752)
@@ -107,6 +107,7 @@
LazyInitialized<RetainPtr<WKWebViewContentProviderRegistry>> _contentProviderRegistry;
BOOL _alwaysRunsAtForegroundPriority;
BOOL _allowsInlineMediaPlayback;
+ BOOL _inlineMediaPlaybackRequiresPlaysInlineAttribute;
BOOL _allowsInlineMediaPlaybackWithPlaysInlineAttribute;
BOOL _allowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute;
BOOL _allowsInlineMediaPlaybackAfterFullscreen;
@@ -138,6 +139,7 @@
#if PLATFORM(IOS)
_allowsPictureInPictureMediaPlayback = YES;
_allowsInlineMediaPlayback = WebCore::deviceClass() == MGDeviceClassiPad;
+ _inlineMediaPlaybackRequiresPlaysInlineAttribute = !_allowsInlineMediaPlayback;
_allowsInlineMediaPlaybackWithPlaysInlineAttribute = !_allowsInlineMediaPlayback;
_allowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute = !_allowsInlineMediaPlayback;
_allowsInlineMediaPlaybackAfterFullscreen = !_allowsInlineMediaPlayback;
@@ -290,6 +292,7 @@
#if PLATFORM(IOS)
configuration->_allowsInlineMediaPlayback = self->_allowsInlineMediaPlayback;
configuration->_allowsInlineMediaPlaybackAfterFullscreen = self->_allowsInlineMediaPlaybackAfterFullscreen;
+ configuration->_inlineMediaPlaybackRequiresPlaysInlineAttribute = self->_inlineMediaPlaybackRequiresPlaysInlineAttribute;
configuration->_allowsInlineMediaPlaybackWithPlaysInlineAttribute = self->_allowsInlineMediaPlaybackWithPlaysInlineAttribute;
configuration->_allowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute = self->_allowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute;
configuration->_allowsPictureInPictureMediaPlayback = self->_allowsPictureInPictureMediaPlayback;
@@ -571,6 +574,16 @@
_alwaysRunsAtForegroundPriority = alwaysRunsAtForegroundPriority;
}
+- (BOOL)_inlineMediaPlaybackRequiresPlaysInlineAttribute
+{
+ return _inlineMediaPlaybackRequiresPlaysInlineAttribute;
+}
+
+- (void)_setInlineMediaPlaybackRequiresPlaysInlineAttribute:(BOOL)requires
+{
+ _inlineMediaPlaybackRequiresPlaysInlineAttribute = requires;
+}
+
- (BOOL)_allowsInlineMediaPlaybackWithPlaysInlineAttribute
{
return _allowsInlineMediaPlaybackWithPlaysInlineAttribute;
Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h (203751 => 203752)
--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h 2016-07-26 23:33:58 UTC (rev 203751)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h 2016-07-26 23:36:52 UTC (rev 203752)
@@ -59,6 +59,7 @@
#if TARGET_OS_IPHONE
@property (nonatomic, setter=_setAlwaysRunsAtForegroundPriority:) BOOL _alwaysRunsAtForegroundPriority WK_API_AVAILABLE(ios(9_0));
+@property (nonatomic, setter=_setInlineMediaPlaybackRequiresPlaysInlineAttribute:) BOOL _inlineMediaPlaybackRequiresPlaysInlineAttribute WK_API_AVAILABLE(ios(WK_IOS_TBA));
@property (nonatomic, setter=_setAllowsInlineMediaPlaybackWithPlaysInlineAttribute:) BOOL _allowsInlineMediaPlaybackWithPlaysInlineAttribute WK_API_AVAILABLE(ios(WK_IOS_TBA));
@property (nonatomic, setter=_setAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute:) BOOL _allowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute WK_API_AVAILABLE(ios(WK_IOS_TBA));
@property (nonatomic, setter=_setAllowsInlineMediaPlaybackAfterFullscreen:) BOOL _allowsInlineMediaPlaybackAfterFullscreen WK_API_AVAILABLE(ios(WK_IOS_TBA));
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (203751 => 203752)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2016-07-26 23:33:58 UTC (rev 203751)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2016-07-26 23:36:52 UTC (rev 203752)
@@ -2977,6 +2977,7 @@
settings.setMainContentUserGestureOverrideEnabled(store.getBoolValueForKey(WebPreferencesKey::mainContentUserGestureOverrideEnabledKey()));
settings.setAllowsInlineMediaPlayback(store.getBoolValueForKey(WebPreferencesKey::allowsInlineMediaPlaybackKey()));
settings.setAllowsInlineMediaPlaybackAfterFullscreen(store.getBoolValueForKey(WebPreferencesKey::allowsInlineMediaPlaybackAfterFullscreenKey()));
+ settings.setInlineMediaPlaybackRequiresPlaysInlineAttribute(store.getBoolValueForKey(WebPreferencesKey::inlineMediaPlaybackRequiresPlaysInlineAttributeKey()));
settings.setAllowsInlineMediaPlaybackWithPlaysInlineAttribute(store.getBoolValueForKey(WebPreferencesKey::allowsInlineMediaPlaybackWithPlaysInlineAttributeKey()));
settings.setAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute(store.getBoolValueForKey(WebPreferencesKey::allowsInlineMediaPlaybackWithWebKitPlaysInlineAttributeKey()));
settings.setInvisibleAutoplayNotPermitted(store.getBoolValueForKey(WebPreferencesKey::invisibleAutoplayNotPermittedKey()));
Modified: trunk/Tools/ChangeLog (203751 => 203752)
--- trunk/Tools/ChangeLog 2016-07-26 23:33:58 UTC (rev 203751)
+++ trunk/Tools/ChangeLog 2016-07-26 23:36:52 UTC (rev 203752)
@@ -1,3 +1,20 @@
+2016-07-26 Myles C. Maxfield <mmaxfi...@apple.com>
+
+ [iPhone] Playing a video on tudou.com plays only sound, no video
+ https://bugs.webkit.org/show_bug.cgi?id=160178
+ <rdar://problem/27535468>
+
+ Reviewed by Dan Bernstein.
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (setDefaultsToConsistentValuesForTesting):
+ * TestWebKitAPI/Tests/WebKit2Cocoa/RequiresUserActionForPlayback.mm:
+ (RequiresUserActionForPlaybackTest::SetUp):
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::resetPreferencesToConsistentValues):
+ * WebKitTestRunner/cocoa/TestControllerCocoa.mm:
+ (WTR::initializeWebViewConfiguration):
+
2016-07-26 Simon Fraser <simon.fra...@apple.com>
Allow LOG macros to be used outside the namespace, and other logging cleanup
Modified: trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm (203751 => 203752)
--- trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm 2016-07-26 23:33:58 UTC (rev 203751)
+++ trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm 2016-07-26 23:36:52 UTC (rev 203752)
@@ -1017,6 +1017,7 @@
WebKitEnableFullDocumentTeardownPreferenceKey: @YES,
WebKitFullScreenEnabledPreferenceKey: @YES,
WebKitAllowsInlineMediaPlaybackPreferenceKey: @YES,
+ WebKitInlineMediaPlaybackRequiresPlaysInlineAttributeKey: @NO,
WebKitAllowsInlineMediaPlaybackWithPlaysInlineAttributeKey: @NO,
WebKitAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttributeKey: @NO,
@"UseWebKitWebInspector": @YES,
Modified: trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/RequiresUserActionForPlayback.mm (203751 => 203752)
--- trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/RequiresUserActionForPlayback.mm 2016-07-26 23:33:58 UTC (rev 203751)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/RequiresUserActionForPlayback.mm 2016-07-26 23:36:52 UTC (rev 203752)
@@ -76,6 +76,7 @@
configuration.get()._mediaDataLoadsAutomatically = YES;
#if TARGET_OS_IPHONE
configuration.get().allowsInlineMediaPlayback = YES;
+ configuration.get()._inlineMediaPlaybackRequiresPlaysInlineAttribute = NO;
configuration.get()._allowsInlineMediaPlaybackWithPlaysInlineAttribute = NO;
configuration.get()._allowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute = NO;
#endif
Modified: trunk/Tools/WebKitTestRunner/TestController.cpp (203751 => 203752)
--- trunk/Tools/WebKitTestRunner/TestController.cpp 2016-07-26 23:33:58 UTC (rev 203751)
+++ trunk/Tools/WebKitTestRunner/TestController.cpp 2016-07-26 23:36:52 UTC (rev 203752)
@@ -684,6 +684,7 @@
WKPreferencesSetStorageBlockingPolicy(preferences, kWKAllowAllStorage);
WKPreferencesSetMediaPlaybackAllowsInline(preferences, true);
+ WKPreferencesSetInlineMediaPlaybackRequiresPlaysInlineAttribute(preferences, false);
WKPreferencesSetAllowsInlineMediaPlaybackWithPlaysInlineAttribute(preferences, false);
WKPreferencesSetAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute(preferences, false);
Modified: trunk/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm (203751 => 203752)
--- trunk/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm 2016-07-26 23:33:58 UTC (rev 203751)
+++ trunk/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm 2016-07-26 23:36:52 UTC (rev 203752)
@@ -61,6 +61,7 @@
#if TARGET_OS_IPHONE
globalWebViewConfiguration.allowsInlineMediaPlayback = YES;
+ globalWebViewConfiguration._inlineMediaPlaybackRequiresPlaysInlineAttribute = NO;
globalWebViewConfiguration._allowsInlineMediaPlaybackWithPlaysInlineAttribute = NO;
globalWebViewConfiguration._allowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute = NO;
globalWebViewConfiguration._invisibleAutoplayNotPermitted = NO;