[webkit-changes] [219136] trunk/Source/WebKit2

2017-07-05 Thread adachan
Title: [219136] trunk/Source/WebKit2








Revision 219136
Author adac...@apple.com
Date 2017-07-05 10:43:59 -0700 (Wed, 05 Jul 2017)


Log Message
Fix crash in UIKit: +[UIViewController _viewControllerForFullScreenPresentationFromView:]
https://bugs.webkit.org/show_bug.cgi?id=174143


Reviewed by Wenson Hsieh.

In -[WKActionSheet willRotate], we can't guarantee that the action sheet belongs
in a window, and passing nil to +[UIViewController _viewControllerForFullScreenPresentationFromView:]
throws an exception. To fix this, bail early if the result from -hostViewForSheet is nil.

* UIProcess/ios/WKActionSheet.mm:
(-[WKActionSheet willRotate]):

Modified Paths

trunk/Source/WebKit2/ChangeLog
trunk/Source/WebKit2/UIProcess/ios/WKActionSheet.mm




Diff

Modified: trunk/Source/WebKit2/ChangeLog (219135 => 219136)

--- trunk/Source/WebKit2/ChangeLog	2017-07-05 17:41:47 UTC (rev 219135)
+++ trunk/Source/WebKit2/ChangeLog	2017-07-05 17:43:59 UTC (rev 219136)
@@ -1,3 +1,18 @@
+2017-07-05  Ada Chan  
+
+Fix crash in UIKit: +[UIViewController _viewControllerForFullScreenPresentationFromView:]
+https://bugs.webkit.org/show_bug.cgi?id=174143
+
+
+Reviewed by Wenson Hsieh.
+
+In -[WKActionSheet willRotate], we can't guarantee that the action sheet belongs
+in a window, and passing nil to +[UIViewController _viewControllerForFullScreenPresentationFromView:]
+throws an exception. To fix this, bail early if the result from -hostViewForSheet is nil.
+
+* UIProcess/ios/WKActionSheet.mm:
+(-[WKActionSheet willRotate]):
+
 2017-07-05  Eric Carlson  
 
 [MediaStream] Protect request and web view during gUM client callback


Modified: trunk/Source/WebKit2/UIProcess/ios/WKActionSheet.mm (219135 => 219136)

--- trunk/Source/WebKit2/UIProcess/ios/WKActionSheet.mm	2017-07-05 17:41:47 UTC (rev 219135)
+++ trunk/Source/WebKit2/UIProcess/ios/WKActionSheet.mm	2017-07-05 17:43:59 UTC (rev 219136)
@@ -153,6 +153,9 @@
 //view controller, without re-presenting the alert controller.
 
 UIView *view = [_sheetDelegate hostViewForSheet];
+if (!view)
+return;
+
 UIViewController *presentingViewController = [UIViewController _viewControllerForFullScreenPresentationFromView:view];
 
 // topPresentedViewController is either self (cases (a) and (b) above) or an action's view controller






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [213913] trunk/Source/WebKit2

2017-03-14 Thread adachan
Title: [213913] trunk/Source/WebKit2








Revision 213913
Author adac...@apple.com
Date 2017-03-14 10:21:17 -0700 (Tue, 14 Mar 2017)


Log Message
[Mac] Add API to get the NSURLProtectionSpace from WKProtectionSpaceRef
https://bugs.webkit.org/show_bug.cgi?id=169494


Reviewed by Dan Bernstein.

* UIProcess/API/C/mac/WKProtectionSpaceNS.h: Added.
* UIProcess/API/C/mac/WKProtectionSpaceNS.mm: Added.
(WKProtectionSpaceCopyNSURLProtectionSpace):
* WebKit2.xcodeproj/project.pbxproj:

Modified Paths

trunk/Source/WebKit2/ChangeLog
trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj


Added Paths

trunk/Source/WebKit2/UIProcess/API/C/mac/WKProtectionSpaceNS.h
trunk/Source/WebKit2/UIProcess/API/C/mac/WKProtectionSpaceNS.mm




Diff

Modified: trunk/Source/WebKit2/ChangeLog (213912 => 213913)

--- trunk/Source/WebKit2/ChangeLog	2017-03-14 17:13:47 UTC (rev 213912)
+++ trunk/Source/WebKit2/ChangeLog	2017-03-14 17:21:17 UTC (rev 213913)
@@ -1,3 +1,16 @@
+2017-03-10  Ada Chan  
+
+[Mac] Add API to get the NSURLProtectionSpace from WKProtectionSpaceRef
+https://bugs.webkit.org/show_bug.cgi?id=169494
+
+
+Reviewed by Dan Bernstein.
+
+* UIProcess/API/C/mac/WKProtectionSpaceNS.h: Added.
+* UIProcess/API/C/mac/WKProtectionSpaceNS.mm: Added.
+(WKProtectionSpaceCopyNSURLProtectionSpace):
+* WebKit2.xcodeproj/project.pbxproj:
+
 2017-03-14  Wenson Hsieh  
 
 [WK2] Adopt updated data operation interfaces for data interaction


Added: trunk/Source/WebKit2/UIProcess/API/C/mac/WKProtectionSpaceNS.h (0 => 213913)

--- trunk/Source/WebKit2/UIProcess/API/C/mac/WKProtectionSpaceNS.h	(rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/C/mac/WKProtectionSpaceNS.h	2017-03-14 17:21:17 UTC (rev 213913)
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include 
+#include 
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+WK_EXPORT NSURLProtectionSpace *WKProtectionSpaceCopyNSURLProtectionSpace(WKProtectionSpaceRef protectionSpace) NS_RETURNS_RETAINED;
+
+#ifdef __cplusplus
+}
+#endif


Added: trunk/Source/WebKit2/UIProcess/API/C/mac/WKProtectionSpaceNS.mm (0 => 213913)

--- trunk/Source/WebKit2/UIProcess/API/C/mac/WKProtectionSpaceNS.mm	(rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/C/mac/WKProtectionSpaceNS.mm	2017-03-14 17:21:17 UTC (rev 213913)
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLI

[webkit-changes] [209473] trunk/Source/WebKit2

2016-12-07 Thread adachan
Title: [209473] trunk/Source/WebKit2








Revision 209473
Author adac...@apple.com
Date 2016-12-07 13:20:15 -0800 (Wed, 07 Dec 2016)


Log Message
Add a getter for serverTrust in _WKObservablePageState
https://bugs.webkit.org/show_bug.cgi?id=165433

Reviewed by Anders Carlsson.

* UIProcess/API/C/mac/WKPagePrivateMac.h:
* UIProcess/API/C/mac/WKPagePrivateMac.mm:
(-[WKObservablePageState serverTrust]):

Modified Paths

trunk/Source/WebKit2/ChangeLog
trunk/Source/WebKit2/UIProcess/API/C/mac/WKPagePrivateMac.h
trunk/Source/WebKit2/UIProcess/API/C/mac/WKPagePrivateMac.mm




Diff

Modified: trunk/Source/WebKit2/ChangeLog (209472 => 209473)

--- trunk/Source/WebKit2/ChangeLog	2016-12-07 21:13:13 UTC (rev 209472)
+++ trunk/Source/WebKit2/ChangeLog	2016-12-07 21:20:15 UTC (rev 209473)
@@ -1,3 +1,14 @@
+2016-12-05  Ada Chan  
+
+Add a getter for serverTrust in _WKObservablePageState
+https://bugs.webkit.org/show_bug.cgi?id=165433
+
+Reviewed by Anders Carlsson.
+
+* UIProcess/API/C/mac/WKPagePrivateMac.h:
+* UIProcess/API/C/mac/WKPagePrivateMac.mm:
+(-[WKObservablePageState serverTrust]):
+
 2016-12-07  Jer Noble  
 
 Exiting Element Fullscreen mode loses focus on WKWebView.


Modified: trunk/Source/WebKit2/UIProcess/API/C/mac/WKPagePrivateMac.h (209472 => 209473)

--- trunk/Source/WebKit2/UIProcess/API/C/mac/WKPagePrivateMac.h	2016-12-07 21:13:13 UTC (rev 209472)
+++ trunk/Source/WebKit2/UIProcess/API/C/mac/WKPagePrivateMac.h	2016-12-07 21:20:15 UTC (rev 209473)
@@ -48,6 +48,7 @@
 
 // Not KVO compliant.
 @property (nonatomic, readonly) NSURL *unreachableURL;
+@property (nonatomic, readonly) SecTrustRef serverTrust;
 
 @end
 


Modified: trunk/Source/WebKit2/UIProcess/API/C/mac/WKPagePrivateMac.mm (209472 => 209473)

--- trunk/Source/WebKit2/UIProcess/API/C/mac/WKPagePrivateMac.mm	2016-12-07 21:13:13 UTC (rev 209472)
+++ trunk/Source/WebKit2/UIProcess/API/C/mac/WKPagePrivateMac.mm	2016-12-07 21:20:15 UTC (rev 209473)
@@ -100,6 +100,19 @@
 return [NSURL _web_URLWithWTFString:_page->pageLoadState().unreachableURL()];
 }
 
+- (SecTrustRef)serverTrust
+{
+#if HAVE(SEC_TRUST_SERIALIZATION)
+auto certificateInfo = _page->pageLoadState().certificateInfo();
+if (!certificateInfo)
+return nil;
+
+return certificateInfo->certificateInfo().trust();
+#else
+return nil;
+#endif
+}
+
 @end
 
 id <_WKObservablePageState> WKPageCreateObservableState(WKPageRef pageRef)






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [206612] trunk/LayoutTests

2016-09-29 Thread adachan
Title: [206612] trunk/LayoutTests








Revision 206612
Author adac...@apple.com
Date 2016-09-29 14:04:34 -0700 (Thu, 29 Sep 2016)


Log Message
Fix flaky test media/click-placeholder-not-pausing.html
https://bugs.webkit.org/show_bug.cgi?id=162661

Reviewed by Eric Carlson.

This test became flaky after r201474 when we started to delay showing
the inline placeholder until we are sure the video layer has been moved
into the video fullscreen layer. This means we can't guarantee that the
placeholder is visible right away after the video's presentation mode
changes to "picture-in-picture".

To fix this, wait for the placeholder to become visible before clicking it.

* media/click-placeholder-not-pausing.html:
* platform/mac-wk2/TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/media/click-placeholder-not-pausing.html
trunk/LayoutTests/platform/mac-wk2/TestExpectations




Diff

Modified: trunk/LayoutTests/ChangeLog (206611 => 206612)

--- trunk/LayoutTests/ChangeLog	2016-09-29 21:02:59 UTC (rev 206611)
+++ trunk/LayoutTests/ChangeLog	2016-09-29 21:04:34 UTC (rev 206612)
@@ -1,3 +1,21 @@
+2016-09-28  Ada Chan  
+
+Fix flaky test media/click-placeholder-not-pausing.html
+https://bugs.webkit.org/show_bug.cgi?id=162661
+
+Reviewed by Eric Carlson.
+
+This test became flaky after r201474 when we started to delay showing
+the inline placeholder until we are sure the video layer has been moved
+into the video fullscreen layer. This means we can't guarantee that the
+placeholder is visible right away after the video's presentation mode
+changes to "picture-in-picture".
+
+To fix this, wait for the placeholder to become visible before clicking it.
+
+* media/click-placeholder-not-pausing.html:
+* platform/mac-wk2/TestExpectations:
+
 2016-09-29  Commit Queue  
 
 Unreviewed, rolling out r206483.


Modified: trunk/LayoutTests/media/click-placeholder-not-pausing.html (206611 => 206612)

--- trunk/LayoutTests/media/click-placeholder-not-pausing.html	2016-09-29 21:02:59 UTC (rev 206611)
+++ trunk/LayoutTests/media/click-placeholder-not-pausing.html	2016-09-29 21:04:34 UTC (rev 206612)
@@ -7,7 +7,10 @@
 

[webkit-changes] [204534] trunk

2016-08-16 Thread adachan
Title: [204534] trunk








Revision 204534
Author adac...@apple.com
Date 2016-08-16 15:48:58 -0700 (Tue, 16 Aug 2016)


Log Message
Placeholder does not show the first time going into picture-in-picture on video without controls
https://bugs.webkit.org/show_bug.cgi?id=160868

Reviewed by Eric Carlson.

Source/WebCore:

Test: media/controls/pip-placeholder-without-video-controls.html

If the media controls script is not injected by the time webkitpresentationmodechanged
event fires, the script that updates the stylesheet to show the placeholder won't execute.

To fix this, doing one of the following would work:
- Ensure the shadow dom for the video is set up when we schedule the
webkitpresentationmodechanged event.
- Make sure the styles are set up correctly to show the placeholder if needed
when the Controller object (in mediaControlsApple.js) is created.

Doing both here following what we did for the wireless playback status.

* Modules/mediacontrols/mediaControlsApple.js:
(Controller):
Call updatePictureInPicturePlaceholder() so it updates the styles to show the
placeholder if needed.
(Controller.prototype.updatePictureInPicturePlaceholder):
Extract the logic that updates the placeholder into a separate method so it can
be called when we initialize Controller.
(Controller.prototype.handlePresentationModeChange):
Call updatePictureInPicturePlaceholder().
* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS.prototype.updatePictureInPicturePlaceholder):
Renamed from handlePresentationModeChange().
(ControllerIOS.prototype.handlePresentationModeChange): Deleted.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::enterFullscreen):
Call configureMediaControls() which ensures the shadow root gets added if needed.

LayoutTests:

Test that a video without controls attribute does show after going into picture-in-picture.

* TestExpectations:
* media/controls/pip-placeholder-without-video-controls-expected.txt: Added.
* media/controls/pip-placeholder-without-video-controls.html: Added.
* platform/mac-wk2/TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/TestExpectations
trunk/LayoutTests/platform/mac-wk2/TestExpectations
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js
trunk/Source/WebCore/Modules/mediacontrols/mediaControlsiOS.js
trunk/Source/WebCore/html/HTMLMediaElement.cpp


Added Paths

trunk/LayoutTests/media/controls/pip-placeholder-without-video-controls-expected.txt
trunk/LayoutTests/media/controls/pip-placeholder-without-video-controls.html




Diff

Modified: trunk/LayoutTests/ChangeLog (204533 => 204534)

--- trunk/LayoutTests/ChangeLog	2016-08-16 22:44:21 UTC (rev 204533)
+++ trunk/LayoutTests/ChangeLog	2016-08-16 22:48:58 UTC (rev 204534)
@@ -1,3 +1,17 @@
+2016-08-15  Ada Chan  
+
+Placeholder does not show the first time going into picture-in-picture on video without controls
+https://bugs.webkit.org/show_bug.cgi?id=160868
+
+Reviewed by Eric Carlson.
+
+Test that a video without controls attribute does show after going into picture-in-picture.
+
+* TestExpectations:
+* media/controls/pip-placeholder-without-video-controls-expected.txt: Added.
+* media/controls/pip-placeholder-without-video-controls.html: Added.
+* platform/mac-wk2/TestExpectations:
+
 2016-08-16  Chris Dumez  
 
 DOM4: getElementsByClassName should include non StyledElements


Modified: trunk/LayoutTests/TestExpectations (204533 => 204534)

--- trunk/LayoutTests/TestExpectations	2016-08-16 22:44:21 UTC (rev 204533)
+++ trunk/LayoutTests/TestExpectations	2016-08-16 22:48:58 UTC (rev 204534)
@@ -1002,6 +1002,7 @@
 # PiP tests are only relevant on macOS Sierra and newer.
 media/click-placeholder-not-pausing.html [ WontFix ]
 media/controls/picture-in-picture.html [ WontFix ]
+media/controls/pip-placeholder-without-video-controls.html [ WontFix ]
 media/element-containing-pip-video-going-into-fullscreen.html [ WontFix ]
 media/fullscreen-api-enabled-media-with-presentation-mode.html [ WontFix ]
 media/fullscreen-video-going-into-pip.html [ WontFix ]


Added: trunk/LayoutTests/media/controls/pip-placeholder-without-video-controls-expected.txt (0 => 204534)

--- trunk/LayoutTests/media/controls/pip-placeholder-without-video-controls-expected.txt	(rev 0)
+++ trunk/LayoutTests/media/controls/pip-placeholder-without-video-controls-expected.txt	2016-08-16 22:48:58 UTC (rev 204534)
@@ -0,0 +1,16 @@
+This tests the picture-in-picture placeholder when the video has no controls.
+
+This test only runs in DRT!
+
+
+EVENT: canplaythrough
+
+Test the picture-in-picture button with valid video
+
+EVENT: webkitpresentationmodechanged
+PASS: Should be in pip mode
+PASS: Inline placeholder should be visible at this point
+PASS: Inline placeholder should have the 'picture-in-picture' class
+
+Testing finished.
+


Added: trunk/LayoutTests/media/controls/pip-placeholde

[webkit-changes] [204304] trunk/LayoutTests

2016-08-09 Thread adachan
Title: [204304] trunk/LayoutTests








Revision 204304
Author adac...@apple.com
Date 2016-08-09 14:54:58 -0700 (Tue, 09 Aug 2016)


Log Message
[macOS Sierra] Fix flaky test: media/controls/picture-in-picture.html
https://bugs.webkit.org/show_bug.cgi?id=160707

Reviewed by Eric Carlson.

This test became flaky after r201474 when we started to delay showing
the inline placeholder until we are sure the video layer has been moved
into the video fullscreen layer. This means we can't guarantee that the
placeholder is visible right away after the video's presentation mode
changes to "picture-in-picture".

To fix this, we'll update the test so that we'll wait until the placeholder
becomes visible before testing its visibility without the "controls" attribute.

* media/controls/picture-in-picture.html:
* platform/mac-wk2/TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/media/controls/picture-in-picture.html
trunk/LayoutTests/platform/mac-wk2/TestExpectations




Diff

Modified: trunk/LayoutTests/ChangeLog (204303 => 204304)

--- trunk/LayoutTests/ChangeLog	2016-08-09 21:50:54 UTC (rev 204303)
+++ trunk/LayoutTests/ChangeLog	2016-08-09 21:54:58 UTC (rev 204304)
@@ -1,3 +1,22 @@
+2016-08-09  Ada Chan  
+
+[macOS Sierra] Fix flaky test: media/controls/picture-in-picture.html
+https://bugs.webkit.org/show_bug.cgi?id=160707
+
+Reviewed by Eric Carlson.
+
+This test became flaky after r201474 when we started to delay showing
+the inline placeholder until we are sure the video layer has been moved
+into the video fullscreen layer. This means we can't guarantee that the
+placeholder is visible right away after the video's presentation mode
+changes to "picture-in-picture".
+
+To fix this, we'll update the test so that we'll wait until the placeholder
+becomes visible before testing its visibility without the "controls" attribute.
+
+* media/controls/picture-in-picture.html:
+* platform/mac-wk2/TestExpectations:
+
 2016-08-09  Chris Dumez  
 
 It should be possible to re-initialize a CustomEvent after it's been dispatched


Modified: trunk/LayoutTests/media/controls/picture-in-picture.html (204303 => 204304)

--- trunk/LayoutTests/media/controls/picture-in-picture.html	2016-08-09 21:50:54 UTC (rev 204303)
+++ trunk/LayoutTests/media/controls/picture-in-picture.html	2016-08-09 21:54:58 UTC (rev 204304)
@@ -4,6 +4,9 @@
 

[webkit-changes] [204088] trunk

2016-08-03 Thread adachan
Title: [204088] trunk








Revision 204088
Author adac...@apple.com
Date 2016-08-03 11:11:50 -0700 (Wed, 03 Aug 2016)


Log Message
[Mac] media/pip-video-going-into-fullscreen.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=160469

Reviewed by Eric Carlson.

Source/WebCore:

When going from picture-in-picture directly to fullscreen, fix the issue where the
presentation mode unexpectedly changes back to inline after changing to fullscreen.

On Mac, standard fullscreen is not handled by WebVideoFullscreenManager.
When going from picture-in-picture directly to fullscreen, we call
WebVideoFullscreenInterfaceMac::exitFullscreenWithoutAnimationToMode().
We should update m_mode to VideoFullscreenModeStandard there to keep it in sync
with the fullscreen mode in HTMLMediaElement. Otherwise, we'll inadvertently
update the mode to inline when we clear the VideoFullscreenModePictureInPicture mode
in -[WebVideoFullscreenInterfaceMacObjC pipDidClose:].

Since standard fullscreen on Mac doesn't make use of the video fullscreen layer,
we need to make sure we return the video layer back to inline when the presentation
mode changes to "fullscreen". We only do this on Mac because iOS does use
the video fullscreen layer for standard fullscreen.

* Modules/mediacontrols/MediaControlsHost.cpp:
(WebCore::MediaControlsHost::setPreparedToReturnVideoLayerToInline):
Renamed from MediaControlsHost::setPreparedForInline to make it clear this is about
whether the video layer should be inline.
(WebCore::MediaControlsHost::setPreparedForInline): Deleted.
* Modules/mediacontrols/MediaControlsHost.h:
* Modules/mediacontrols/MediaControlsHost.idl:

* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.shouldReturnVideoLayerToInline):
On Mac, the video layer is inline when the presentation mode is "inline" or "fullscreen".
(Controller.prototype.handlePresentationModeChange):
Call shouldReturnVideoLayerToInline() to determine whether the video layer should be inline.

* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS.prototype.shouldReturnVideoLayerToInline):
Override this method since on iOS, the video layer is only inline when the presentation
mode is "inline".

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::stopWithoutDestroyingMediaPlayer):
(WebCore::HTMLMediaElement::setPreparedToReturnVideoLayerToInline):
(WebCore::HTMLMediaElement::setPreparedForInline): Deleted.
* html/HTMLMediaElement.h:

* platform/mac/WebVideoFullscreenInterfaceMac.mm:
(WebCore::WebVideoFullscreenInterfaceMac::enterFullscreen):
Remove the assertion that the mode must be "picture-in-picture". I've run into this
assertion in layout tests. Since the EnterFullscreen message is sent in a dispatch_async
block in WebVideoFullscreenManager::didSetupFullscreen(), there's a chance that the
fullscreen mode tracked in WebVideoFullscreenInterfaceMac has already changed to
something else when WebVideoFullscreenInterfaceMac::enterFullscreen() is called.
(WebCore::WebVideoFullscreenInterfaceMac::exitFullscreenWithoutAnimationToMode):
If exiting to standard fullscreen, update m_mode to VideoFullscreenModeStandard.

LayoutTests:

Re-enable media/pip-video-going-into-fullscreen.html on Sierra.

* platform/mac-wk2/TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/mac-wk2/TestExpectations
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/Modules/mediacontrols/MediaControlsHost.cpp
trunk/Source/WebCore/Modules/mediacontrols/MediaControlsHost.h
trunk/Source/WebCore/Modules/mediacontrols/MediaControlsHost.idl
trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js
trunk/Source/WebCore/Modules/mediacontrols/mediaControlsiOS.js
trunk/Source/WebCore/html/HTMLMediaElement.cpp
trunk/Source/WebCore/html/HTMLMediaElement.h
trunk/Source/WebCore/platform/mac/WebVideoFullscreenInterfaceMac.mm




Diff

Modified: trunk/LayoutTests/ChangeLog (204087 => 204088)

--- trunk/LayoutTests/ChangeLog	2016-08-03 18:05:50 UTC (rev 204087)
+++ trunk/LayoutTests/ChangeLog	2016-08-03 18:11:50 UTC (rev 204088)
@@ -1,3 +1,14 @@
+2016-08-02  Ada Chan  
+
+[Mac] media/pip-video-going-into-fullscreen.html is a flaky failure
+https://bugs.webkit.org/show_bug.cgi?id=160469
+
+Reviewed by Eric Carlson.
+
+Re-enable media/pip-video-going-into-fullscreen.html on Sierra.
+
+* platform/mac-wk2/TestExpectations:
+
 2016-08-03  Youenn Fablet  
 
 http/tests/fetch/fetch-in-worker-crash.html is sometimes crashing


Modified: trunk/LayoutTests/platform/mac-wk2/TestExpectations (204087 => 204088)

--- trunk/LayoutTests/platform/mac-wk2/TestExpectations	2016-08-03 18:05:50 UTC (rev 204087)
+++ trunk/LayoutTests/platform/mac-wk2/TestExpectations	2016-08-03 18:11:50 UTC (rev 204088)
@@ -473,6 +473,7 @@
 [ Sierra+ ] media/fullscreen-api-enabled-media-with-presentation-mode.html [ Pass ]
 [ Sierra+ ] media/fullscreen-video-going-into-pip.html [ Pass ]
 [ Sierra+ ] media/navigate-with-p

[webkit-changes] [201963] trunk/Source

2016-06-10 Thread adachan
Title: [201963] trunk/Source








Revision 201963
Author adac...@apple.com
Date 2016-06-10 21:37:06 -0700 (Fri, 10 Jun 2016)


Log Message
Use the video element's video box when getting the inline video rect in WebVideoFullscreenManager
https://bugs.webkit.org/show_bug.cgi?id=158351


Reviewed by Darin Adler.

Source/WebCore:

* WebCore.xcodeproj/project.pbxproj:
Change the visibility of RenderVideo.h and RenderMedia.h since we'll be importing RenderVideo.h from WebKit2.
* rendering/RenderVideo.h:

Source/WebKit2:

* WebProcess/cocoa/WebVideoFullscreenManager.mm:
(WebKit::inlineVideoFrame):
(WebKit::WebVideoFullscreenManager::enterVideoFullscreenForVideoElement):
(WebKit::WebVideoFullscreenManager::exitVideoFullscreenForVideoElement):
(WebKit::WebVideoFullscreenManager::fullscreenMayReturnToInline):
(WebKit::WebVideoFullscreenManager::setVideoLayerFrameFenced):
(WebKit::clientRectForElement): Deleted.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
trunk/Source/WebCore/rendering/RenderVideo.h
trunk/Source/WebKit2/ChangeLog
trunk/Source/WebKit2/WebProcess/cocoa/WebVideoFullscreenManager.mm




Diff

Modified: trunk/Source/WebCore/ChangeLog (201962 => 201963)

--- trunk/Source/WebCore/ChangeLog	2016-06-11 04:24:27 UTC (rev 201962)
+++ trunk/Source/WebCore/ChangeLog	2016-06-11 04:37:06 UTC (rev 201963)
@@ -1,3 +1,15 @@
+2016-06-10  Ada Chan  
+
+Use the video element's video box when getting the inline video rect in WebVideoFullscreenManager
+https://bugs.webkit.org/show_bug.cgi?id=158351
+
+
+Reviewed by Darin Adler.
+
+* WebCore.xcodeproj/project.pbxproj:
+Change the visibility of RenderVideo.h and RenderMedia.h since we'll be importing RenderVideo.h from WebKit2.
+* rendering/RenderVideo.h:
+
 2016-06-10  Benjamin Poulain  
 
 Add support for passive event listeners on touch events


Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (201962 => 201963)

--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2016-06-11 04:24:27 UTC (rev 201962)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2016-06-11 04:37:06 UTC (rev 201963)
@@ -6639,7 +6639,7 @@
 		E446143B0CD689CC00FADA75 /* JSHTMLSourceElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4B423710CBFB6E000AF2ECE /* JSHTMLSourceElement.cpp */; };
 		E446143C0CD689CC00FADA75 /* JSHTMLSourceElement.h in Headers */ = {isa = PBXBuildFile; fileRef = E4B423720CBFB6E000AF2ECE /* JSHTMLSourceElement.h */; };
 		E44614510CD68A3500FADA75 /* RenderVideo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4B41E330CBFB60900AF2ECE /* RenderVideo.cpp */; };
-		E44614520CD68A3500FADA75 /* RenderVideo.h in Headers */ = {isa = PBXBuildFile; fileRef = E4B41E340CBFB60900AF2ECE /* RenderVideo.h */; };
+		E44614520CD68A3500FADA75 /* RenderVideo.h in Headers */ = {isa = PBXBuildFile; fileRef = E4B41E340CBFB60900AF2ECE /* RenderVideo.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		E44B4BB3141650D7002B1D8B /* SelectorChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E44B4BB1141650D7002B1D8B /* SelectorChecker.cpp */; };
 		E44B4BB4141650D7002B1D8B /* SelectorChecker.h in Headers */ = {isa = PBXBuildFile; fileRef = E44B4BB2141650D7002B1D8B /* SelectorChecker.h */; };
 		E44EE3A817577EBD00EEE8CF /* FontGenericFamilies.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E44EE3A617576E5500EEE8CF /* FontGenericFamilies.cpp */; };
@@ -6710,7 +6710,7 @@
 		E4C1789A0EE6903800824D69 /* CSSSelectorList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4C178950EE6903800824D69 /* CSSSelectorList.cpp */; };
 		E4C1789B0EE6903800824D69 /* CSSSelectorList.h in Headers */ = {isa = PBXBuildFile; fileRef = E4C178960EE6903800824D69 /* CSSSelectorList.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		E4C279580CF9741900E97B98 /* RenderMedia.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4C279560CF9741900E97B98 /* RenderMedia.cpp */; };
-		E4C279590CF9741900E97B98 /* RenderMedia.h in Headers */ = {isa = PBXBuildFile; fileRef = E4C279570CF9741900E97B98 /* RenderMedia.h */; };
+		E4C279590CF9741900E97B98 /* RenderMedia.h in Headers */ = {isa = PBXBuildFile; fileRef = E4C279570CF9741900E97B98 /* RenderMedia.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		E4C3B1FA0F0E4161009693F6 /* LegacyTileCache.h in Headers */ = {isa = PBXBuildFile; fileRef = E4C3B1F90F0E4161009693F6 /* LegacyTileCache.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		E4C3B1FC0F0E4170009693F6 /* LegacyTileCache.mm in Sources */ = {isa = PBXBuildFile; fileRef = E4C3B1FB0F0E4170009693F6 /* LegacyTileCache.mm */; };
 		E4C91A0E1802343100A17F6D /* TextPaintStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = E4C91A0D1802343100A17F6D /* TextPaintStyle.h */; };


Modified: trunk/Source/WebCore/rendering/RenderVideo.h (201962 => 201963)

--- trunk/Source/WebCore/rendering/RenderVideo.h	2016-06-11 04:24:27 UTC (rev 201962)
+++ trunk/Source/WebCore/rende

[webkit-changes] [201691] trunk/Source/WebCore

2016-06-04 Thread adachan
Title: [201691] trunk/Source/WebCore








Revision 201691
Author adac...@apple.com
Date 2016-06-04 17:36:55 -0700 (Sat, 04 Jun 2016)


Log Message
REGRESSION (r201474): Should set overflow: hidden on -webkit-media-controls when placeholder is showing
https://bugs.webkit.org/show_bug.cgi?id=158377

Reviewed by Darin Adler.

In r201474, we defer removing the hidden class from inlinePlaybackPlaceholder until
showInlinePlaybackPlaceholderWhenSafe(). We also need to move the code that adds the
placeholder-showing class to -webkit-media-controls to that method.

* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.showInlinePlaybackPlaceholderWhenSafe):
Add the "placeholder-showing" class to -webkit-media-controls when we show the placeholder.
(Controller.prototype.handlePresentationModeChange):
Remove the "placeholder-showing" class from -webkit-media-controls when we hide the
placeholder. Remove the old code that adds and removes that class.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js




Diff

Modified: trunk/Source/WebCore/ChangeLog (201690 => 201691)

--- trunk/Source/WebCore/ChangeLog	2016-06-04 23:02:48 UTC (rev 201690)
+++ trunk/Source/WebCore/ChangeLog	2016-06-05 00:36:55 UTC (rev 201691)
@@ -1,3 +1,21 @@
+2016-06-03  Ada Chan  
+
+REGRESSION (r201474): Should set overflow: hidden on -webkit-media-controls when placeholder is showing
+https://bugs.webkit.org/show_bug.cgi?id=158377
+
+Reviewed by Darin Adler.
+
+In r201474, we defer removing the hidden class from inlinePlaybackPlaceholder until
+showInlinePlaybackPlaceholderWhenSafe(). We also need to move the code that adds the
+placeholder-showing class to -webkit-media-controls to that method.
+
+* Modules/mediacontrols/mediaControlsApple.js:
+(Controller.prototype.showInlinePlaybackPlaceholderWhenSafe):
+Add the "placeholder-showing" class to -webkit-media-controls when we show the placeholder.
+(Controller.prototype.handlePresentationModeChange):
+Remove the "placeholder-showing" class from -webkit-media-controls when we hide the
+placeholder. Remove the old code that adds and removes that class.
+
 2016-06-04  Darin Adler  
 
 leaks seen in fast/css/variables tests


Modified: trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js (201690 => 201691)

--- trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js	2016-06-04 23:02:48 UTC (rev 201690)
+++ trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js	2016-06-05 00:36:55 UTC (rev 201691)
@@ -842,9 +842,10 @@
 if (this.presentationMode() != 'picture-in-picture')
 return;
 
-if (!this.host.isVideoLayerInline)
+if (!this.host.isVideoLayerInline) {
 this.controls.inlinePlaybackPlaceholder.classList.remove(this.ClassNames.hidden);
-else
+this.base.classList.add(this.ClassNames.placeholderShowing);
+} else
 setTimeout(this.showInlinePlaybackPlaceholderWhenSafe.bind(this), this.PlaceholderPollingDelay);
 },
 
@@ -859,6 +860,7 @@
 this.controls.inlinePlaybackPlaceholder.classList.remove(this.ClassNames.pictureInPicture);
 this.controls.inlinePlaybackPlaceholderTextTop.classList.remove(this.ClassNames.pictureInPicture);
 this.controls.inlinePlaybackPlaceholderTextBottom.classList.remove(this.ClassNames.pictureInPicture);
+this.base.classList.remove(this.ClassNames.placeholderShowing);
 
 this.controls.pictureInPictureButton.classList.remove(this.ClassNames.returnFromPictureInPicture);
 break;
@@ -884,11 +886,6 @@
 break;
 }
 
-if (this.controls.inlinePlaybackPlaceholder.classList.contains(this.ClassNames.hidden))
-this.base.classList.remove(this.ClassNames.placeholderShowing);
-else
-this.base.classList.add(this.ClassNames.placeholderShowing);
-
 this.updateControls();
 this.updateCaptionContainer();
 this.resetHideControlsTimer();






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [201661] trunk/Source/WebCore

2016-06-03 Thread adachan
Title: [201661] trunk/Source/WebCore








Revision 201661
Author adac...@apple.com
Date 2016-06-03 14:59:07 -0700 (Fri, 03 Jun 2016)


Log Message
REGRESSION(r201474): Subtitles are not resizing in other fullscreen modes
https://bugs.webkit.org/show_bug.cgi?id=158355

Reviewed by Eric Carlson.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::syncTextTrackBounds):
Set the text track representation layer's frame based on the active video layer.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm




Diff

Modified: trunk/Source/WebCore/ChangeLog (201660 => 201661)

--- trunk/Source/WebCore/ChangeLog	2016-06-03 21:42:03 UTC (rev 201660)
+++ trunk/Source/WebCore/ChangeLog	2016-06-03 21:59:07 UTC (rev 201661)
@@ -1,3 +1,14 @@
+2016-06-03  Ada Chan  
+
+REGRESSION(r201474): Subtitles are not resizing in other fullscreen modes
+https://bugs.webkit.org/show_bug.cgi?id=158355
+
+Reviewed by Eric Carlson.
+
+* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
+(WebCore::MediaPlayerPrivateAVFoundationObjC::syncTextTrackBounds):
+Set the text track representation layer's frame based on the active video layer.
+
 2016-06-03  Brady Eidson  
 
 Miscellaneous IDBBindingUtilities cleanup.


Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm (201660 => 201661)

--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm	2016-06-03 21:42:03 UTC (rev 201660)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm	2016-06-03 21:59:07 UTC (rev 201661)
@@ -2181,7 +2181,8 @@
 return;
 
 FloatRect videoFullscreenFrame = m_videoFullscreenLayerManager->videoFullscreenFrame();
-CGRect textFrame = m_videoLayer ? [m_videoLayer videoRect] : CGRectMake(0, 0, videoFullscreenFrame.width(), videoFullscreenFrame.height());
+auto activeLayer = m_secondaryVideoLayer.get() ?: m_videoLayer.get();
+CGRect textFrame = activeLayer ? [activeLayer videoRect] : CGRectMake(0, 0, videoFullscreenFrame.width(), videoFullscreenFrame.height());
 [m_textTrackRepresentationLayer setFrame:textFrame];
 #endif
 }






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [201435] trunk/Source/WebCore

2016-05-26 Thread adachan
Title: [201435] trunk/Source/WebCore








Revision 201435
Author adac...@apple.com
Date 2016-05-26 15:05:26 -0700 (Thu, 26 May 2016)


Log Message
Add WebKitAdditions extension point in HTMLMediaElement.
https://bugs.webkit.org/show_bug.cgi?id=158097

Reviewed by Eric Carlson.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::shouldOverrideBackgroundLoadingRestriction):
We need to load data in the background if playing to wireless playback target.
(WebCore::HTMLMediaElement::fullscreenModeChanged):
Moved from header file.
* html/HTMLMediaElement.h:

* platform/audio/PlatformMediaSession.cpp:
(WebCore::PlatformMediaSession::clientWillPausePlayback):
The code to start m_clientDataBufferingTimer is also in visibilityChanged().
Moved that code to PlatformMediaSession::scheduleClientDataBufferingCheck() and call
that method here.
(WebCore::PlatformMediaSession::visibilityChanged):
Call PlatformMediaSession::scheduleClientDataBufferingCheck().
(WebCore::PlatformMediaSession::scheduleClientDataBufferingCheck):
Start m_clientDataBufferingTimer if it's not already active.
(WebCore::PlatformMediaSession::shouldOverrideBackgroundLoadingRestriction):
Call the client.

* platform/audio/PlatformMediaSession.h:
(WebCore::PlatformMediaSessionClient::shouldOverrideBackgroundLoadingRestriction):

* platform/audio/PlatformMediaSessionManager.cpp:
(WebCore::PlatformMediaSessionManager::sessionCanLoadMedia):
Call the new PlatformMediaSession::shouldOverrideBackgroundLoadingRestriction().

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/html/HTMLMediaElement.cpp
trunk/Source/WebCore/html/HTMLMediaElement.h
trunk/Source/WebCore/platform/audio/PlatformMediaSession.cpp
trunk/Source/WebCore/platform/audio/PlatformMediaSession.h
trunk/Source/WebCore/platform/audio/PlatformMediaSessionManager.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (201434 => 201435)

--- trunk/Source/WebCore/ChangeLog	2016-05-26 22:03:34 UTC (rev 201434)
+++ trunk/Source/WebCore/ChangeLog	2016-05-26 22:05:26 UTC (rev 201435)
@@ -1,3 +1,36 @@
+2016-05-25  Ada Chan  
+
+Add WebKitAdditions extension point in HTMLMediaElement.
+https://bugs.webkit.org/show_bug.cgi?id=158097
+
+Reviewed by Eric Carlson.
+
+* html/HTMLMediaElement.cpp:
+(WebCore::HTMLMediaElement::shouldOverrideBackgroundLoadingRestriction):
+We need to load data in the background if playing to wireless playback target.
+(WebCore::HTMLMediaElement::fullscreenModeChanged):
+Moved from header file.
+* html/HTMLMediaElement.h:
+
+* platform/audio/PlatformMediaSession.cpp:
+(WebCore::PlatformMediaSession::clientWillPausePlayback):
+The code to start m_clientDataBufferingTimer is also in visibilityChanged().
+Moved that code to PlatformMediaSession::scheduleClientDataBufferingCheck() and call
+that method here.
+(WebCore::PlatformMediaSession::visibilityChanged):
+Call PlatformMediaSession::scheduleClientDataBufferingCheck().
+(WebCore::PlatformMediaSession::scheduleClientDataBufferingCheck):
+Start m_clientDataBufferingTimer if it's not already active.
+(WebCore::PlatformMediaSession::shouldOverrideBackgroundLoadingRestriction):
+Call the client.
+
+* platform/audio/PlatformMediaSession.h:
+(WebCore::PlatformMediaSessionClient::shouldOverrideBackgroundLoadingRestriction):
+
+* platform/audio/PlatformMediaSessionManager.cpp:
+(WebCore::PlatformMediaSessionManager::sessionCanLoadMedia):
+Call the new PlatformMediaSession::shouldOverrideBackgroundLoadingRestriction().
+
 2016-05-26  Jer Noble  
 
 Use std::atomic<> rather than OSAtomicIncrement in CARingBuffer.cpp


Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (201434 => 201435)

--- trunk/Source/WebCore/html/HTMLMediaElement.cpp	2016-05-26 22:03:34 UTC (rev 201434)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp	2016-05-26 22:05:26 UTC (rev 201435)
@@ -152,6 +152,10 @@
 #include 
 #endif
 
+#if USE(APPLE_INTERNAL_SDK)
+#include 
+#endif
+
 namespace WebCore {
 
 static const double SeekRepeatDelay = 0.1;
@@ -7024,6 +7028,23 @@
 page->chrome().client().clearPlaybackControlsManager(*this);
 }
 
+#if !USE(APPLE_INTERNAL_SDK)
+bool HTMLMediaElement::shouldOverrideBackgroundLoadingRestriction() const
+{
+#if ENABLE(WIRELESS_PLAYBACK_TARGET)
+if (isPlayingToWirelessPlaybackTarget())
+return true;
+#endif
+
+return false;
 }
 
+void HTMLMediaElement::fullscreenModeChanged(VideoFullscreenMode mode)
+{
+m_videoFullscreenMode = mode;
+}
 #endif
+
+}
+
+#endif


Modified: trunk/Source/WebCore/html/HTMLMediaElement.h (201434 => 201435)

--- trunk/Source/WebCore/html/HTMLMediaElement.h	2016-05-26 22:03:34 UTC (rev 201434)
+++ trunk/Source/WebCore/html/HTMLMediaElement.h	2016-05-26 22:05:26 UTC (rev 201435)
@@ -370,7 +370,7 @@
 
 using MediaPlayerEnums::VideoFullscreenMode;

[webkit-changes] [201355] trunk

2016-05-24 Thread adachan
Title: [201355] trunk








Revision 201355
Author adac...@apple.com
Date 2016-05-24 14:48:20 -0700 (Tue, 24 May 2016)


Log Message
Only set overflow:hidden on -webkit-media-controls when the placeholder is showing.
https://bugs.webkit.org/show_bug.cgi?id=157975

Reviewed by Eric Carlson.

Source/WebCore:

Test: media/mac/controls-panel-not-clipped-out.html

overflow:hidden was added to clip out content contained in -webkit-media-controls
that sticks out of the bounds of that container when the inlinePlaybackPlaceholder
is showing. However, that style also clips out things that we want to show when the
inlinePlaybackPlaceholder is not showing. For example, the volume slider or the
controls panel when the video element's height is too short.

To fix that, we only set overflow:hidden on -webkit-media-controls when the
inlinePlaybackPlaceholder is visible.

* Modules/mediacontrols/mediaControlsApple.css:
(::-webkit-media-controls):
(::-webkit-media-controls.placeholder-showing):
Set overflow:hidden only when the placeholder is showing.

* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.handlePresentationModeChange):
Add the placeholderShowing class to -webkit-media-controls only when the
inlinePlaybackPlaceholder is not hidden.

LayoutTests:

This is a Mac only test. The media controls panel should still be visible
even if the media element's height is very short.

* TestExpectations:
* media/mac/controls-panel-not-clipped-out-expected.html: Added.
* media/mac/controls-panel-not-clipped-out.html: Added.
* platform/mac/TestExpectations:

* platform/mac/media/media-document-audio-repaint-expected.txt:
* platform/mac/media/video-zoom-controls-expected.txt:
Rebaseline tests.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/TestExpectations
trunk/LayoutTests/platform/mac/TestExpectations
trunk/LayoutTests/platform/mac/media/media-document-audio-repaint-expected.txt
trunk/LayoutTests/platform/mac/media/video-zoom-controls-expected.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.css
trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js


Added Paths

trunk/LayoutTests/media/mac/
trunk/LayoutTests/media/mac/controls-panel-not-clipped-out-expected.html
trunk/LayoutTests/media/mac/controls-panel-not-clipped-out.html




Diff

Modified: trunk/LayoutTests/ChangeLog (201354 => 201355)

--- trunk/LayoutTests/ChangeLog	2016-05-24 21:38:50 UTC (rev 201354)
+++ trunk/LayoutTests/ChangeLog	2016-05-24 21:48:20 UTC (rev 201355)
@@ -1,3 +1,22 @@
+2016-05-24  Ada Chan  
+
+Only set overflow:hidden on -webkit-media-controls when the placeholder is showing.
+https://bugs.webkit.org/show_bug.cgi?id=157975
+
+Reviewed by Eric Carlson.
+
+This is a Mac only test. The media controls panel should still be visible
+even if the media element's height is very short.
+
+* TestExpectations:
+* media/mac/controls-panel-not-clipped-out-expected.html: Added.
+* media/mac/controls-panel-not-clipped-out.html: Added.
+* platform/mac/TestExpectations:
+
+* platform/mac/media/media-document-audio-repaint-expected.txt:
+* platform/mac/media/video-zoom-controls-expected.txt:
+Rebaseline tests.
+
 2016-05-24  Adam Bergkvist  
 
 WebRTC: RTCIceCandidate: Make attributes readonly (and update constructor arg)


Modified: trunk/LayoutTests/TestExpectations (201354 => 201355)

--- trunk/LayoutTests/TestExpectations	2016-05-24 21:38:50 UTC (rev 201354)
+++ trunk/LayoutTests/TestExpectations	2016-05-24 21:48:20 UTC (rev 201355)
@@ -21,6 +21,7 @@
 fast/events/ios [ Skip ]
 fast/events/touch/ios [ Skip ]
 fast/scrolling/ios [ Skip ]
+media/mac [ Skip ]
 
 fast/forms/attributed-strings.html [ Skip ]
 fast/scrolling/latching [ Skip ]


Added: trunk/LayoutTests/media/mac/controls-panel-not-clipped-out-expected.html (0 => 201355)

--- trunk/LayoutTests/media/mac/controls-panel-not-clipped-out-expected.html	(rev 0)
+++ trunk/LayoutTests/media/mac/controls-panel-not-clipped-out-expected.html	2016-05-24 21:48:20 UTC (rev 201355)
@@ -0,0 +1,3 @@
+
+
+


Added: trunk/LayoutTests/media/mac/controls-panel-not-clipped-out.html (0 => 201355)

--- trunk/LayoutTests/media/mac/controls-panel-not-clipped-out.html	(rev 0)
+++ trunk/LayoutTests/media/mac/controls-panel-not-clipped-out.html	2016-05-24 21:48:20 UTC (rev 201355)
@@ -0,0 +1,3 @@
+
+
+


Modified: trunk/LayoutTests/platform/mac/TestExpectations (201354 => 201355)

--- trunk/LayoutTests/platform/mac/TestExpectations	2016-05-24 21:38:50 UTC (rev 201354)
+++ trunk/LayoutTests/platform/mac/TestExpectations	2016-05-24 21:48:20 UTC (rev 201355)
@@ -10,6 +10,7 @@
 displaylists [ Pass ]
 editing/mac [ Pass ]
 fast/scrolling/latching [ Pass ]
+media/mac [ Pass ]
 
 fast/forms/search/search-padding-cancel-results-buttons.html [ Pass ]
 fast/forms/search/search-results-hidden-cr

[webkit-changes] [200965] trunk/Source/WebCore

2016-05-16 Thread adachan
Title: [200965] trunk/Source/WebCore








Revision 200965
Author adac...@apple.com
Date 2016-05-16 13:46:01 -0700 (Mon, 16 May 2016)


Log Message
Don't execute _javascript_ within HTMLMediaElement::stop()
https://bugs.webkit.org/show_bug.cgi?id=157655

Reviewed by Chris Dumez.

* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::suspendActiveDOMObjects):
Move the setting of m_activeDOMObjectsAreSuspended to true earlier so we won't execute
any JS while suspending the objects.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::updateMediaControlsAfterPresentationModeChange):
Bail early if the controls script hasn't been injected yet or the DOM object has been
stopped or suspended.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/dom/ScriptExecutionContext.cpp
trunk/Source/WebCore/html/HTMLMediaElement.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (200964 => 200965)

--- trunk/Source/WebCore/ChangeLog	2016-05-16 20:26:40 UTC (rev 200964)
+++ trunk/Source/WebCore/ChangeLog	2016-05-16 20:46:01 UTC (rev 200965)
@@ -1,3 +1,19 @@
+2016-05-12  Ada Chan  
+
+Don't execute _javascript_ within HTMLMediaElement::stop()
+https://bugs.webkit.org/show_bug.cgi?id=157655
+
+Reviewed by Chris Dumez.
+
+* dom/ScriptExecutionContext.cpp:
+(WebCore::ScriptExecutionContext::suspendActiveDOMObjects):
+Move the setting of m_activeDOMObjectsAreSuspended to true earlier so we won't execute
+any JS while suspending the objects.
+* html/HTMLMediaElement.cpp:
+(WebCore::HTMLMediaElement::updateMediaControlsAfterPresentationModeChange):
+Bail early if the controls script hasn't been injected yet or the DOM object has been
+stopped or suspended.
+
 2016-05-16  Ryosuke Niwa  
 
 Focus ordering should respect slot elements


Modified: trunk/Source/WebCore/dom/ScriptExecutionContext.cpp (200964 => 200965)

--- trunk/Source/WebCore/dom/ScriptExecutionContext.cpp	2016-05-16 20:26:40 UTC (rev 200964)
+++ trunk/Source/WebCore/dom/ScriptExecutionContext.cpp	2016-05-16 20:46:01 UTC (rev 200965)
@@ -224,6 +224,8 @@
 return;
 }
 
+m_activeDOMObjectsAreSuspended = true;
+
 m_activeDOMObjectAdditionForbidden = true;
 #if !ASSERT_DISABLED || ENABLE(SECURITY_ASSERTIONS)
 m_activeDOMObjectRemovalForbidden = true;
@@ -242,7 +244,6 @@
 m_activeDOMObjectRemovalForbidden = false;
 #endif
 
-m_activeDOMObjectsAreSuspended = true;
 m_reasonForSuspendingActiveDOMObjects = why;
 }
 


Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (200964 => 200965)

--- trunk/Source/WebCore/html/HTMLMediaElement.cpp	2016-05-16 20:26:40 UTC (rev 200964)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp	2016-05-16 20:46:01 UTC (rev 200965)
@@ -6547,6 +6547,11 @@
 
 void HTMLMediaElement::updateMediaControlsAfterPresentationModeChange()
 {
+// Don't execute script if the controls script hasn't been injected yet, or we have
+// stopped/suspended the object.
+if (!m_mediaControlsHost || document().activeDOMObjectsAreSuspended() || document().activeDOMObjectsAreStopped())
+return;
+
 DOMWrapperWorld& world = ensureIsolatedWorld();
 ScriptController& scriptController = document().frame()->script();
 JSDOMGlobalObject* globalObject = JSC::jsCast(scriptController.globalObject(world));






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [200794] trunk/Source/WebCore

2016-05-12 Thread adachan
Title: [200794] trunk/Source/WebCore








Revision 200794
Author adac...@apple.com
Date 2016-05-12 15:13:10 -0700 (Thu, 12 May 2016)


Log Message
Prevent clicks in the placeholder from playing or pausing the video in a MediaDocument.
https://bugs.webkit.org/show_bug.cgi?id=157625

Reviewed by Jer Noble.

* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.createControls):
(Controller.prototype.handlePlaceholderClick):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js




Diff

Modified: trunk/Source/WebCore/ChangeLog (200793 => 200794)

--- trunk/Source/WebCore/ChangeLog	2016-05-12 22:09:03 UTC (rev 200793)
+++ trunk/Source/WebCore/ChangeLog	2016-05-12 22:13:10 UTC (rev 200794)
@@ -1,3 +1,14 @@
+2016-05-12  Ada Chan  
+
+Prevent clicks in the placeholder from playing or pausing the video in a MediaDocument.
+https://bugs.webkit.org/show_bug.cgi?id=157625
+
+Reviewed by Jer Noble.
+
+* Modules/mediacontrols/mediaControlsApple.js:
+(Controller.prototype.createControls):
+(Controller.prototype.handlePlaceholderClick):
+
 2016-05-12  Chris Dumez  
 
 Drop toJS() overload taking a PassRefPtr<> parameter


Modified: trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js (200793 => 200794)

--- trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js	2016-05-12 22:09:03 UTC (rev 200793)
+++ trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js	2016-05-12 22:13:10 UTC (rev 200794)
@@ -493,6 +493,8 @@
 var inlinePlaybackPlaceholder = this.controls.inlinePlaybackPlaceholder = document.createElement('div');
 inlinePlaybackPlaceholder.setAttribute('pseudo', '-webkit-media-controls-wireless-playback-status');
 inlinePlaybackPlaceholder.setAttribute('aria-label', this.UIString('Video Playback Placeholder'));
+this.listenFor(inlinePlaybackPlaceholder, 'click', this.handlePlaceholderClick);
+this.listenFor(inlinePlaybackPlaceholder, 'dblclick', this.handlePlaceholderClick);
 if (!Controller.gSimulatePictureInPictureAvailable)
 inlinePlaybackPlaceholder.classList.add(this.ClassNames.hidden);
 
@@ -974,6 +976,12 @@
 event.preventDefault();
 },
 
+handlePlaceholderClick: function(event)
+{
+// Prevent clicks in the placeholder from playing or pausing the video in a MediaDocument.
+event.preventDefault();
+},
+
 handleRewindButtonClicked: function(event)
 {
 var newTime = Math.max(






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [200595] trunk/Source

2016-05-09 Thread adachan
Title: [200595] trunk/Source








Revision 200595
Author adac...@apple.com
Date 2016-05-09 15:50:34 -0700 (Mon, 09 May 2016)


Log Message
Introduce WebVideoFullscreenInterfaceMac::isPlayingVideoInEnhancedFullscreen() and use it in WebVideoFullscreenManagerProxy::isPlayingVideoInEnhancedFullscreen()
https://bugs.webkit.org/show_bug.cgi?id=157493

Reviewed by Dan Bernstein.

Source/WebCore:

* platform/mac/WebVideoFullscreenInterfaceMac.h:
* platform/mac/WebVideoFullscreenInterfaceMac.mm:
(WebCore::WebVideoFullscreenInterfaceMac::isPlayingVideoInEnhancedFullscreen):

Source/WebKit2:

* UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::isPlayingVideoInEnhancedFullscreen):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/mac/WebVideoFullscreenInterfaceMac.h
trunk/Source/WebCore/platform/mac/WebVideoFullscreenInterfaceMac.mm
trunk/Source/WebKit2/ChangeLog
trunk/Source/WebKit2/UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm




Diff

Modified: trunk/Source/WebCore/ChangeLog (200594 => 200595)

--- trunk/Source/WebCore/ChangeLog	2016-05-09 22:01:30 UTC (rev 200594)
+++ trunk/Source/WebCore/ChangeLog	2016-05-09 22:50:34 UTC (rev 200595)
@@ -1,3 +1,14 @@
+2016-05-09  Ada Chan  
+
+Introduce WebVideoFullscreenInterfaceMac::isPlayingVideoInEnhancedFullscreen() and use it in WebVideoFullscreenManagerProxy::isPlayingVideoInEnhancedFullscreen()
+https://bugs.webkit.org/show_bug.cgi?id=157493
+
+Reviewed by Dan Bernstein.
+
+* platform/mac/WebVideoFullscreenInterfaceMac.h:
+* platform/mac/WebVideoFullscreenInterfaceMac.mm:
+(WebCore::WebVideoFullscreenInterfaceMac::isPlayingVideoInEnhancedFullscreen):
+
 2016-05-09  Simon Fraser  
 
 Clean up iOS text autosizing code


Modified: trunk/Source/WebCore/platform/mac/WebVideoFullscreenInterfaceMac.h (200594 => 200595)

--- trunk/Source/WebCore/platform/mac/WebVideoFullscreenInterfaceMac.h	2016-05-09 22:01:30 UTC (rev 200594)
+++ trunk/Source/WebCore/platform/mac/WebVideoFullscreenInterfaceMac.h	2016-05-09 22:50:34 UTC (rev 200595)
@@ -93,6 +93,8 @@
 void setMode(HTMLMediaElementEnums::VideoFullscreenMode);
 void clearMode(HTMLMediaElementEnums::VideoFullscreenMode);
 
+bool isPlayingVideoInEnhancedFullscreen() const;
+
 WEBCORE_EXPORT bool mayAutomaticallyShowVideoPictureInPicture() const { return false; }
 void applicationDidBecomeActive() { }
 


Modified: trunk/Source/WebCore/platform/mac/WebVideoFullscreenInterfaceMac.mm (200594 => 200595)

--- trunk/Source/WebCore/platform/mac/WebVideoFullscreenInterfaceMac.mm	2016-05-09 22:01:30 UTC (rev 200594)
+++ trunk/Source/WebCore/platform/mac/WebVideoFullscreenInterfaceMac.mm	2016-05-09 22:50:34 UTC (rev 200595)
@@ -167,6 +167,11 @@
 {
 }
 
+bool WebVideoFullscreenInterfaceMac::isPlayingVideoInEnhancedFullscreen() const
+{
+return false;
+}
+
 bool supportsPictureInPicture()
 {
 return false;


Modified: trunk/Source/WebKit2/ChangeLog (200594 => 200595)

--- trunk/Source/WebKit2/ChangeLog	2016-05-09 22:01:30 UTC (rev 200594)
+++ trunk/Source/WebKit2/ChangeLog	2016-05-09 22:50:34 UTC (rev 200595)
@@ -1,3 +1,13 @@
+2016-05-09  Ada Chan  
+
+Introduce WebVideoFullscreenInterfaceMac::isPlayingVideoInEnhancedFullscreen() and use it in WebVideoFullscreenManagerProxy::isPlayingVideoInEnhancedFullscreen()
+https://bugs.webkit.org/show_bug.cgi?id=157493
+
+Reviewed by Dan Bernstein.
+
+* UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
+(WebKit::WebVideoFullscreenManagerProxy::isPlayingVideoInEnhancedFullscreen):
+
 2016-05-06  Ada Chan  
 
 Add WKPageRef SPI to tell whether there's a video playing in enhanced fullscreen


Modified: trunk/Source/WebKit2/UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm (200594 => 200595)

--- trunk/Source/WebKit2/UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm	2016-05-09 22:01:30 UTC (rev 200594)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm	2016-05-09 22:50:34 UTC (rev 200595)
@@ -250,11 +250,12 @@
 #if PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE)
 bool WebVideoFullscreenManagerProxy::isPlayingVideoInEnhancedFullscreen() const
 {
-#if USE(APPLE_INTERNAL_SDK)
-#import 
-#else
+for (auto& tuple : m_contextMap.values()) {
+if (std::get<1>(tuple)->isPlayingVideoInEnhancedFullscreen())
+return true;
+}
+
 return false;
-#endif
 }
 #endif
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [200592] trunk/Source/WebKit2

2016-05-09 Thread adachan
Title: [200592] trunk/Source/WebKit2








Revision 200592
Author adac...@apple.com
Date 2016-05-09 14:53:43 -0700 (Mon, 09 May 2016)


Log Message
Add WKPageRef SPI to tell whether there's a video playing in enhanced fullscreen
https://bugs.webkit.org/show_bug.cgi?id=157434

Reviewed by Darin Adler.

* UIProcess/API/C/mac/WKPagePrivateMac.h:
* UIProcess/API/C/mac/WKPagePrivateMac.mm:
(WKPageIsPlayingVideoInEnhancedFullscreen):
* UIProcess/Cocoa/WebVideoFullscreenManagerProxy.h:
* UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::isPlayingVideoInEnhancedFullscreen):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::isPlayingVideoInEnhancedFullscreen):
* UIProcess/WebPageProxy.h:

Modified Paths

trunk/Source/WebKit2/ChangeLog
trunk/Source/WebKit2/UIProcess/API/C/mac/WKPagePrivateMac.h
trunk/Source/WebKit2/UIProcess/API/C/mac/WKPagePrivateMac.mm
trunk/Source/WebKit2/UIProcess/Cocoa/WebVideoFullscreenManagerProxy.h
trunk/Source/WebKit2/UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm
trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp
trunk/Source/WebKit2/UIProcess/WebPageProxy.h




Diff

Modified: trunk/Source/WebKit2/ChangeLog (200591 => 200592)

--- trunk/Source/WebKit2/ChangeLog	2016-05-09 20:41:31 UTC (rev 200591)
+++ trunk/Source/WebKit2/ChangeLog	2016-05-09 21:53:43 UTC (rev 200592)
@@ -1,3 +1,20 @@
+2016-05-06  Ada Chan  
+
+Add WKPageRef SPI to tell whether there's a video playing in enhanced fullscreen
+https://bugs.webkit.org/show_bug.cgi?id=157434
+
+Reviewed by Darin Adler.
+
+* UIProcess/API/C/mac/WKPagePrivateMac.h:
+* UIProcess/API/C/mac/WKPagePrivateMac.mm:
+(WKPageIsPlayingVideoInEnhancedFullscreen):
+* UIProcess/Cocoa/WebVideoFullscreenManagerProxy.h:
+* UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
+(WebKit::WebVideoFullscreenManagerProxy::isPlayingVideoInEnhancedFullscreen):
+* UIProcess/WebPageProxy.cpp:
+(WebKit::WebPageProxy::isPlayingVideoInEnhancedFullscreen):
+* UIProcess/WebPageProxy.h:
+
 2016-05-09  Anders Carlsson  
 
 Add injected bundle SPI for getting favicon and touch icon URLs


Modified: trunk/Source/WebKit2/UIProcess/API/C/mac/WKPagePrivateMac.h (200591 => 200592)

--- trunk/Source/WebKit2/UIProcess/API/C/mac/WKPagePrivateMac.h	2016-05-09 20:41:31 UTC (rev 200591)
+++ trunk/Source/WebKit2/UIProcess/API/C/mac/WKPagePrivateMac.h	2016-05-09 21:53:43 UTC (rev 200592)
@@ -59,6 +59,10 @@
 WK_EXPORT pid_t WKPageGetProcessIdentifier(WKPageRef page);
 WK_EXPORT bool WKPageIsURLKnownHSTSHost(WKPageRef page, WKURLRef url);
 
+#if TARGET_OS_MAC
+WK_EXPORT bool WKPageIsPlayingVideoInEnhancedFullscreen(WKPageRef page);
+#endif
+
 #ifdef __cplusplus
 }
 #endif


Modified: trunk/Source/WebKit2/UIProcess/API/C/mac/WKPagePrivateMac.mm (200591 => 200592)

--- trunk/Source/WebKit2/UIProcess/API/C/mac/WKPagePrivateMac.mm	2016-05-09 20:41:31 UTC (rev 200591)
+++ trunk/Source/WebKit2/UIProcess/API/C/mac/WKPagePrivateMac.mm	2016-05-09 21:53:43 UTC (rev 200592)
@@ -128,3 +128,10 @@
 
 return webPageProxy->process().processPool().isURLKnownHSTSHost(toImpl(url)->string(), privateBrowsingEnabled);
 }
+
+#if PLATFORM(MAC)
+bool WKPageIsPlayingVideoInEnhancedFullscreen(WKPageRef pageRef)
+{
+return toImpl(pageRef)->isPlayingVideoInEnhancedFullscreen();
+}
+#endif


Modified: trunk/Source/WebKit2/UIProcess/Cocoa/WebVideoFullscreenManagerProxy.h (200591 => 200592)

--- trunk/Source/WebKit2/UIProcess/Cocoa/WebVideoFullscreenManagerProxy.h	2016-05-09 20:41:31 UTC (rev 200591)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/WebVideoFullscreenManagerProxy.h	2016-05-09 21:53:43 UTC (rev 200592)
@@ -106,6 +106,10 @@
 void applicationDidBecomeActive();
 bool isVisible() const;
 
+#if PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE)
+bool isPlayingVideoInEnhancedFullscreen() const;
+#endif
+
 private:
 friend class WebVideoFullscreenModelContext;
 


Modified: trunk/Source/WebKit2/UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm (200591 => 200592)

--- trunk/Source/WebKit2/UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm	2016-05-09 20:41:31 UTC (rev 200591)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm	2016-05-09 21:53:43 UTC (rev 200592)
@@ -247,6 +247,17 @@
 return false;
 }
 
+#if PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE)
+bool WebVideoFullscreenManagerProxy::isPlayingVideoInEnhancedFullscreen() const
+{
+#if USE(APPLE_INTERNAL_SDK)
+#import 
+#else
+return false;
+#endif
+}
+#endif
+
 void WebVideoFullscreenManagerProxy::applicationDidBecomeActive()
 {
 for (auto& tuple : m_contextMap.values())


Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (200591 => 200592)

--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp	2016-05-09 20:41:31 UTC (rev 200591)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp	2016-05-09 21:53:43 UTC (rev 200592)
@@ -6068,7 +6068,16 @@
 return false;

[webkit-changes] [200514] trunk/Source/WebKit2

2016-05-06 Thread adachan
Title: [200514] trunk/Source/WebKit2








Revision 200514
Author adac...@apple.com
Date 2016-05-06 11:17:24 -0700 (Fri, 06 May 2016)


Log Message
Create a fence in WebVideoFullscreenManagerProxy::setVideoLayerFrame() to pass to the web process
https://bugs.webkit.org/show_bug.cgi?id=157409

Reviewed by Tim Horton.

* UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::setVideoLayerFrame):
Create a fence by calling DrawingAreaProxy::createFence() and pass it when sending the
WebVideoFullscreenManager::SetVideoLayerFrameFenced message.

* UIProcess/DrawingAreaProxy.cpp:
(WebKit::DrawingAreaProxy::createFence):
Stub implementation. Assert not to be reached here since it's only implemented on Mac so far.
* UIProcess/DrawingAreaProxy.h:

* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
(WebKit::TiledCoreAnimationDrawingAreaProxy::createFence):
Renamed from createFenceForGeometryUpdate() since we are using it for more than just updating geometry.
(WebKit::TiledCoreAnimationDrawingAreaProxy::sendUpdateGeometry):
Update due to method rename.

Modified Paths

trunk/Source/WebKit2/ChangeLog
trunk/Source/WebKit2/UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm
trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.cpp
trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.h
trunk/Source/WebKit2/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h
trunk/Source/WebKit2/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm




Diff

Modified: trunk/Source/WebKit2/ChangeLog (200513 => 200514)

--- trunk/Source/WebKit2/ChangeLog	2016-05-06 16:57:09 UTC (rev 200513)
+++ trunk/Source/WebKit2/ChangeLog	2016-05-06 18:17:24 UTC (rev 200514)
@@ -1,3 +1,27 @@
+2016-05-05  Ada Chan  
+
+Create a fence in WebVideoFullscreenManagerProxy::setVideoLayerFrame() to pass to the web process
+https://bugs.webkit.org/show_bug.cgi?id=157409
+
+Reviewed by Tim Horton.
+
+* UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
+(WebKit::WebVideoFullscreenManagerProxy::setVideoLayerFrame):
+Create a fence by calling DrawingAreaProxy::createFence() and pass it when sending the
+WebVideoFullscreenManager::SetVideoLayerFrameFenced message.
+
+* UIProcess/DrawingAreaProxy.cpp:
+(WebKit::DrawingAreaProxy::createFence):
+Stub implementation. Assert not to be reached here since it's only implemented on Mac so far.
+* UIProcess/DrawingAreaProxy.h:
+
+* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
+* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
+(WebKit::TiledCoreAnimationDrawingAreaProxy::createFence):
+Renamed from createFenceForGeometryUpdate() since we are using it for more than just updating geometry.
+(WebKit::TiledCoreAnimationDrawingAreaProxy::sendUpdateGeometry):
+Update due to method rename.
+
 2016-05-05  Brady Eidson  
 
 Modern IDB (Workers): Get everything to the right threads.


Modified: trunk/Source/WebKit2/UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm (200513 => 200514)

--- trunk/Source/WebKit2/UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm	2016-05-06 16:57:09 UTC (rev 200513)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm	2016-05-06 18:17:24 UTC (rev 200514)
@@ -34,6 +34,7 @@
 #import "WebVideoFullscreenManagerMessages.h"
 #import "WebVideoFullscreenManagerProxyMessages.h"
 #import 
+#import 
 #import 
 #import 
 #import 
@@ -449,7 +450,10 @@
 #if PLATFORM(IOS)
 mach_port_name_t fencePort = [UIWindow _synchronizeDrawingAcrossProcesses];
 #else
-mach_port_name_t fencePort = 0;
+MachSendRight fenceSendRight;
+if (DrawingAreaProxy* drawingArea = m_page->drawingArea())
+fenceSendRight = drawingArea->createFence();
+mach_port_name_t fencePort = fenceSendRight.leakSendRight();
 #endif
 
 m_page->send(Messages::WebVideoFullscreenManager::SetVideoLayerFrameFenced(contextId, frame, IPC::Attachment(fencePort, MACH_MSG_TYPE_MOVE_SEND)), m_page->pageID());


Modified: trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.cpp (200513 => 200514)

--- trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.cpp	2016-05-06 16:57:09 UTC (rev 200513)
+++ trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.cpp	2016-05-06 18:17:24 UTC (rev 200514)
@@ -31,6 +31,10 @@
 #include "WebPageProxy.h"
 #include "WebProcessProxy.h"
 
+#if PLATFORM(COCOA)
+#include 
+#endif
+
 using namespace WebCore;
 
 namespace WebKit {
@@ -62,6 +66,14 @@
 sizeDidChange();
 }
 
+#if PLATFORM(COCOA)
+MachSendRight DrawingAreaProxy::createFence()
+{
+ASSERT_NOT_REACHED();
+return MachSendRight();
+}
+#endif
+
 #if PLATFORM(MAC)
 void DrawingAreaProxy::setViewExposedRect(Optional viewExposedRect)
 {


Modified: trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.h (200513 => 200514)

--- trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.h	2016-05-06 16:57:09 UT

[webkit-changes] [200491] trunk/Source/WebCore

2016-05-05 Thread adachan
Title: [200491] trunk/Source/WebCore








Revision 200491
Author adac...@apple.com
Date 2016-05-05 16:22:47 -0700 (Thu, 05 May 2016)


Log Message
Add WebKitAdditions extension points in media controls related code in RenderThemeMac
https://bugs.webkit.org/show_bug.cgi?id=157390

Reviewed by Anders Carlsson.

* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::mediaControlsStyleSheet):
(WebCore::RenderThemeMac::mediaControlsScript):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/rendering/RenderThemeMac.mm




Diff

Modified: trunk/Source/WebCore/ChangeLog (200490 => 200491)

--- trunk/Source/WebCore/ChangeLog	2016-05-05 23:18:20 UTC (rev 200490)
+++ trunk/Source/WebCore/ChangeLog	2016-05-05 23:22:47 UTC (rev 200491)
@@ -1,3 +1,14 @@
+2016-05-05  Ada Chan  
+
+Add WebKitAdditions extension points in media controls related code in RenderThemeMac
+https://bugs.webkit.org/show_bug.cgi?id=157390
+
+Reviewed by Anders Carlsson.
+
+* rendering/RenderThemeMac.mm:
+(WebCore::RenderThemeMac::mediaControlsStyleSheet):
+(WebCore::RenderThemeMac::mediaControlsScript):
+
 2016-05-05  Jer Noble  
 
 [WK2] Media controls don't update if controller is created after the interface is created


Modified: trunk/Source/WebCore/rendering/RenderThemeMac.mm (200490 => 200491)

--- trunk/Source/WebCore/rendering/RenderThemeMac.mm	2016-05-05 23:18:20 UTC (rev 200490)
+++ trunk/Source/WebCore/rendering/RenderThemeMac.mm	2016-05-05 23:22:47 UTC (rev 200491)
@@ -230,8 +230,16 @@
 String RenderThemeMac::mediaControlsStyleSheet()
 {
 #if ENABLE(MEDIA_CONTROLS_SCRIPT)
-if (m_mediaControlsStyleSheet.isEmpty())
-m_mediaControlsStyleSheet = [NSString stringWithContentsOfFile:[[NSBundle bundleForClass:[WebCoreRenderThemeBundle class]] pathForResource:@"mediaControlsApple" ofType:@"css"] encoding:NSUTF8StringEncoding error:nil];
+if (m_mediaControlsStyleSheet.isEmpty()) {
+StringBuilder styleSheetBuilder;
+styleSheetBuilder.append([NSString stringWithContentsOfFile:[[NSBundle bundleForClass:[WebCoreRenderThemeBundle class]] pathForResource:@"mediaControlsApple" ofType:@"css"] encoding:NSUTF8StringEncoding error:nil]);
+
+#if USE(APPLE_INTERNAL_SDK)
+#import 
+#endif
+
+m_mediaControlsStyleSheet = styleSheetBuilder.toString();
+}
 return m_mediaControlsStyleSheet;
 #else
 return emptyString();
@@ -245,6 +253,11 @@
 StringBuilder scriptBuilder;
 scriptBuilder.append([NSString stringWithContentsOfFile:[[NSBundle bundleForClass:[WebCoreRenderThemeBundle class]] pathForResource:@"mediaControlsLocalizedStrings" ofType:@"js"] encoding:NSUTF8StringEncoding error:nil]);
 scriptBuilder.append([NSString stringWithContentsOfFile:[[NSBundle bundleForClass:[WebCoreRenderThemeBundle class]] pathForResource:@"mediaControlsApple" ofType:@"js"] encoding:NSUTF8StringEncoding error:nil]);
+
+#if USE(APPLE_INTERNAL_SDK)
+#import 
+#endif
+
 m_mediaControlsScript = scriptBuilder.toString();
 }
 return m_mediaControlsScript;






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [200462] trunk/Source/WebCore

2016-05-05 Thread adachan
Title: [200462] trunk/Source/WebCore








Revision 200462
Author adac...@apple.com
Date 2016-05-05 11:14:48 -0700 (Thu, 05 May 2016)


Log Message
When exiting fullscreen, call a JS method immediately to implement the style changes for the presentation mode change right away
https://bugs.webkit.org/show_bug.cgi?id=157359

Reviewed by Eric Carlson.

No new tests as this is done to just mitigate a visual glitch.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::exitFullscreen):
(WebCore::HTMLMediaElement::updateMediaControlsAfterPresentationModeChange):
* html/HTMLMediaElement.h:

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/html/HTMLMediaElement.cpp
trunk/Source/WebCore/html/HTMLMediaElement.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (200461 => 200462)

--- trunk/Source/WebCore/ChangeLog	2016-05-05 17:43:04 UTC (rev 200461)
+++ trunk/Source/WebCore/ChangeLog	2016-05-05 18:14:48 UTC (rev 200462)
@@ -1,3 +1,17 @@
+2016-05-04  Ada Chan  
+
+When exiting fullscreen, call a JS method immediately to implement the style changes for the presentation mode change right away
+https://bugs.webkit.org/show_bug.cgi?id=157359
+
+Reviewed by Eric Carlson.
+
+No new tests as this is done to just mitigate a visual glitch.
+
+* html/HTMLMediaElement.cpp:
+(WebCore::HTMLMediaElement::exitFullscreen):
+(WebCore::HTMLMediaElement::updateMediaControlsAfterPresentationModeChange):
+* html/HTMLMediaElement.h:
+
 2016-05-04  Alex Christensen  
 
 Blocked redirected main resource requests need descriptive errors


Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (200461 => 200462)

--- trunk/Source/WebCore/html/HTMLMediaElement.cpp	2016-05-05 17:43:04 UTC (rev 200461)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp	2016-05-05 18:14:48 UTC (rev 200462)
@@ -5395,6 +5395,9 @@
 ASSERT(m_videoFullscreenMode != VideoFullscreenModeNone);
 VideoFullscreenMode oldVideoFullscreenMode = m_videoFullscreenMode;
 fullscreenModeChanged(VideoFullscreenModeNone);
+#if ENABLE(MEDIA_CONTROLS_SCRIPT)
+updateMediaControlsAfterPresentationModeChange();
+#endif
 if (hasMediaControls())
 mediaControls()->exitedFullscreen();
 if (document().page() && is(*this)) {
@@ -6540,6 +6543,35 @@
 document().unregisterForPageScaleFactorChangedCallbacks(this);
 }
 
+void HTMLMediaElement::updateMediaControlsAfterPresentationModeChange()
+{
+DOMWrapperWorld& world = ensureIsolatedWorld();
+ScriptController& scriptController = document().frame()->script();
+JSDOMGlobalObject* globalObject = JSC::jsCast(scriptController.globalObject(world));
+JSC::ExecState* exec = globalObject->globalExec();
+JSC::JSLockHolder lock(exec);
+
+JSC::JSValue controllerValue = controllerJSValue(*exec, *globalObject, *this);
+JSC::JSObject* controllerObject = controllerValue.toObject(exec);
+
+if (exec->hadException())
+return;
+
+JSC::JSValue functionValue = controllerObject->get(exec, JSC::Identifier::fromString(exec, "handlePresentationModeChange"));
+if (exec->hadException() || functionValue.isUndefinedOrNull())
+return;
+
+JSC::JSObject* function = functionValue.toObject(exec);
+ASSERT(!exec->hadException());
+JSC::CallData callData;
+JSC::CallType callType = function->methodTable()->getCallData(function, callData);
+if (callType == JSC::CallType::None)
+return;
+
+JSC::MarkedArgumentBuffer argList;
+JSC::call(exec, function, callType, callData, controllerObject, argList);
+}
+
 void HTMLMediaElement::pageScaleFactorChanged()
 {
 Page* page = document().page();


Modified: trunk/Source/WebCore/html/HTMLMediaElement.h (200461 => 200462)

--- trunk/Source/WebCore/html/HTMLMediaElement.h	2016-05-05 17:43:04 UTC (rev 200461)
+++ trunk/Source/WebCore/html/HTMLMediaElement.h	2016-05-05 18:14:48 UTC (rev 200462)
@@ -483,6 +483,7 @@
 #if ENABLE(MEDIA_CONTROLS_SCRIPT)
 bool mediaControlsDependOnPageScaleFactor() const { return m_mediaControlsDependOnPageScaleFactor; }
 void setMediaControlsDependOnPageScaleFactor(bool);
+void updateMediaControlsAfterPresentationModeChange();
 #endif
 
 void scheduleEvent(const AtomicString& eventName);






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [200251] trunk/Source/WebKit2

2016-04-29 Thread adachan
Title: [200251] trunk/Source/WebKit2








Revision 200251
Author adac...@apple.com
Date 2016-04-29 10:29:23 -0700 (Fri, 29 Apr 2016)


Log Message
Indicate we are processing user gesture when handling messages from WebPlaybackSessionManagerProxy to WebPlaybackSessionManager
https://bugs.webkit.org/show_bug.cgi?id=157151

Reviewed by Jer Noble.

Messages from WebPlaybackSessionManagerProxy to WebPlaybackSessionManager are triggered by
user actions, so add a UserGestureIndicator in the methods that handle those messages.

* WebProcess/cocoa/WebPlaybackSessionManager.mm:
(WebKit::WebPlaybackSessionManager::play):
(WebKit::WebPlaybackSessionManager::pause):
(WebKit::WebPlaybackSessionManager::togglePlayState):
(WebKit::WebPlaybackSessionManager::beginScrubbing):
(WebKit::WebPlaybackSessionManager::endScrubbing):
(WebKit::WebPlaybackSessionManager::seekToTime):
(WebKit::WebPlaybackSessionManager::fastSeek):
(WebKit::WebPlaybackSessionManager::beginScanningForward):
(WebKit::WebPlaybackSessionManager::beginScanningBackward):
(WebKit::WebPlaybackSessionManager::endScanning):
(WebKit::WebPlaybackSessionManager::selectAudioMediaOption):
(WebKit::WebPlaybackSessionManager::selectLegibleMediaOption):

Modified Paths

trunk/Source/WebKit2/ChangeLog
trunk/Source/WebKit2/WebProcess/cocoa/WebPlaybackSessionManager.mm




Diff

Modified: trunk/Source/WebKit2/ChangeLog (200250 => 200251)

--- trunk/Source/WebKit2/ChangeLog	2016-04-29 17:20:08 UTC (rev 200250)
+++ trunk/Source/WebKit2/ChangeLog	2016-04-29 17:29:23 UTC (rev 200251)
@@ -1,3 +1,27 @@
+2016-04-28  Ada Chan  
+
+Indicate we are processing user gesture when handling messages from WebPlaybackSessionManagerProxy to WebPlaybackSessionManager
+https://bugs.webkit.org/show_bug.cgi?id=157151
+
+Reviewed by Jer Noble.
+
+Messages from WebPlaybackSessionManagerProxy to WebPlaybackSessionManager are triggered by
+user actions, so add a UserGestureIndicator in the methods that handle those messages.
+
+* WebProcess/cocoa/WebPlaybackSessionManager.mm:
+(WebKit::WebPlaybackSessionManager::play):
+(WebKit::WebPlaybackSessionManager::pause):
+(WebKit::WebPlaybackSessionManager::togglePlayState):
+(WebKit::WebPlaybackSessionManager::beginScrubbing):
+(WebKit::WebPlaybackSessionManager::endScrubbing):
+(WebKit::WebPlaybackSessionManager::seekToTime):
+(WebKit::WebPlaybackSessionManager::fastSeek):
+(WebKit::WebPlaybackSessionManager::beginScanningForward):
+(WebKit::WebPlaybackSessionManager::beginScanningBackward):
+(WebKit::WebPlaybackSessionManager::endScanning):
+(WebKit::WebPlaybackSessionManager::selectAudioMediaOption):
+(WebKit::WebPlaybackSessionManager::selectLegibleMediaOption):
+
 2016-04-29  Brady Eidson  
 
 Add a default ".isolatedCopy()" specialization to CrossThreadCopier, and other small cleanup.


Modified: trunk/Source/WebKit2/WebProcess/cocoa/WebPlaybackSessionManager.mm (200250 => 200251)

--- trunk/Source/WebKit2/WebProcess/cocoa/WebPlaybackSessionManager.mm	2016-04-29 17:20:08 UTC (rev 200250)
+++ trunk/Source/WebKit2/WebProcess/cocoa/WebPlaybackSessionManager.mm	2016-04-29 17:29:23 UTC (rev 200251)
@@ -41,6 +41,7 @@
 #import 
 #import 
 #import 
+#import 
 #import 
 
 using namespace WebCore;
@@ -348,61 +349,73 @@
 
 void WebPlaybackSessionManager::play(uint64_t contextId)
 {
+UserGestureIndicator indicator(DefinitelyProcessingUserGesture);
 ensureModel(contextId).play();
 }
 
 void WebPlaybackSessionManager::pause(uint64_t contextId)
 {
+UserGestureIndicator indicator(DefinitelyProcessingUserGesture);
 ensureModel(contextId).pause();
 }
 
 void WebPlaybackSessionManager::togglePlayState(uint64_t contextId)
 {
+UserGestureIndicator indicator(DefinitelyProcessingUserGesture);
 ensureModel(contextId).togglePlayState();
 }
 
 void WebPlaybackSessionManager::beginScrubbing(uint64_t contextId)
 {
+UserGestureIndicator indicator(DefinitelyProcessingUserGesture);
 ensureModel(contextId).beginScrubbing();
 }
 
 void WebPlaybackSessionManager::endScrubbing(uint64_t contextId)
 {
+UserGestureIndicator indicator(DefinitelyProcessingUserGesture);
 ensureModel(contextId).endScrubbing();
 }
 
 void WebPlaybackSessionManager::seekToTime(uint64_t contextId, double time)
 {
+UserGestureIndicator indicator(DefinitelyProcessingUserGesture);
 ensureModel(contextId).seekToTime(time);
 }
 
 void WebPlaybackSessionManager::fastSeek(uint64_t contextId, double time)
 {
+UserGestureIndicator indicator(DefinitelyProcessingUserGesture);
 ensureModel(contextId).fastSeek(time);
 }
 
 void WebPlaybackSessionManager::beginScanningForward(uint64_t contextId)
 {
+UserGestureIndicator indicator(DefinitelyProcessingUserGesture);
 ensureModel(contextId).beginScanningForward();
 }
 
 void WebPlaybackSessionManager::beginScanningBackward(uint64_t contextId)
 {
+UserGestureI

[webkit-changes] [200196] trunk

2016-04-28 Thread adachan
Title: [200196] trunk








Revision 200196
Author adac...@apple.com
Date 2016-04-28 10:34:24 -0700 (Thu, 28 Apr 2016)


Log Message
Set overflow: hidden on ::-webkit-media-controls in mediaControlsApple.css
https://bugs.webkit.org/show_bug.cgi?id=157110

Reviewed by Eric Carlson.

Source/WebCore:

Test: fast/regions/inline-block-inside-anonymous-overflow-with-covered-controls.html

This matches what we do in mediaControlsiOS.css.

* Modules/mediacontrols/mediaControlsApple.css:
(::-webkit-media-controls):

LayoutTests:

The style change caused an image only failure for fast/regions/inline-block-inside-anonymous-overflow.html.
Mark that test as image-failure-only and add a new test that's basically a copy of inline-block-inside-anonymous-overflow.html
with the default controls covered so we can still catch layout regressions related to flowing content from region to region.

* fast/regions/inline-block-inside-anonymous-overflow-with-covered-controls-expected.html: Added.
* fast/regions/inline-block-inside-anonymous-overflow-with-covered-controls.html: Added.
* platform/ios-simulator/TestExpectations:
fast/regions/inline-block-inside-anonymous-overflow.html is already marked as image-failure-only
so this new test needs to be marked too.
* platform/mac/TestExpectations:
* platform/mac/media/media-document-audio-repaint-expected.txt:
* platform/mac/media/video-zoom-controls-expected.txt:
Rebaseline test due to style change in mediaControlsApple.css.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/ios-simulator/TestExpectations
trunk/LayoutTests/platform/mac/TestExpectations
trunk/LayoutTests/platform/mac/media/media-document-audio-repaint-expected.txt
trunk/LayoutTests/platform/mac/media/video-zoom-controls-expected.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.css


Added Paths

trunk/LayoutTests/fast/regions/inline-block-inside-anonymous-overflow-with-covered-controls-expected.html
trunk/LayoutTests/fast/regions/inline-block-inside-anonymous-overflow-with-covered-controls.html




Diff

Modified: trunk/LayoutTests/ChangeLog (200195 => 200196)

--- trunk/LayoutTests/ChangeLog	2016-04-28 17:12:42 UTC (rev 200195)
+++ trunk/LayoutTests/ChangeLog	2016-04-28 17:34:24 UTC (rev 200196)
@@ -1,3 +1,24 @@
+2016-04-27  Ada Chan  
+
+Set overflow: hidden on ::-webkit-media-controls in mediaControlsApple.css
+https://bugs.webkit.org/show_bug.cgi?id=157110
+
+Reviewed by Eric Carlson.
+
+The style change caused an image only failure for fast/regions/inline-block-inside-anonymous-overflow.html.
+Mark that test as image-failure-only and add a new test that's basically a copy of inline-block-inside-anonymous-overflow.html
+with the default controls covered so we can still catch layout regressions related to flowing content from region to region.
+
+* fast/regions/inline-block-inside-anonymous-overflow-with-covered-controls-expected.html: Added.
+* fast/regions/inline-block-inside-anonymous-overflow-with-covered-controls.html: Added.
+* platform/ios-simulator/TestExpectations:
+fast/regions/inline-block-inside-anonymous-overflow.html is already marked as image-failure-only
+so this new test needs to be marked too.
+* platform/mac/TestExpectations:
+* platform/mac/media/media-document-audio-repaint-expected.txt:
+* platform/mac/media/video-zoom-controls-expected.txt:
+Rebaseline test due to style change in mediaControlsApple.css.
+
 2016-04-28  Youenn Fablet  
 
 [Fetch API] Import remaining fetch tests


Added: trunk/LayoutTests/fast/regions/inline-block-inside-anonymous-overflow-with-covered-controls-expected.html (0 => 200196)

--- trunk/LayoutTests/fast/regions/inline-block-inside-anonymous-overflow-with-covered-controls-expected.html	(rev 0)
+++ trunk/LayoutTests/fast/regions/inline-block-inside-anonymous-overflow-with-covered-controls-expected.html	2016-04-28 17:34:24 UTC (rev 200196)
@@ -0,0 +1,59 @@
+
+
+
+
+.region {
+border: 3px solid blue;
+float: left;
+}
+#region1 {
+height: 250px;
+}
+#region2 {
+width: 300px;
+height: 200px;
+margin-left: 50px;
+}
+.article {
+background-color: #00;
+}
+#article1 {
+height: 230px;
+}
+#video {
+width: 320px;
+height: 300px;
+background-color: salmon;
+border: 3px solid black;
+}
+#controlsBlocker {
+position: absolute;
+display: block;
+width: 350px;
+height: 40px;
+top: 350px;
+left: 5px;
+   

[webkit-changes] [200157] trunk/Source

2016-04-27 Thread adachan
Title: [200157] trunk/Source








Revision 200157
Author adac...@apple.com
Date 2016-04-27 16:24:36 -0700 (Wed, 27 Apr 2016)


Log Message
Set WebVideoFullscreenInterfaceMac up as a client of WebPlaybackSessionInterfaceMac to listen for playback state changes
https://bugs.webkit.org/show_bug.cgi?id=157008

Reviewed by Jer Noble.

Source/WebCore:

For WebVideoFullscreenInterfaceMac to be notified when the playback rate changes in
WebPlaybackSessionInterfaceMac, add a new WebPlaybackSessionInterfaceMacClient base
class that WebVideoFullscreenInterfaceMac implements, similar to the WebPlaybackSessionInterfaceAVKitClient
on iOS. WebVideoFullscreenInterfaceMac sets itself as a client of WebPlaybackSessionInterfaceMac
so WebPlaybackSessionInterfaceMac can notify WebVideoFullscreenInterfaceMac whenever the
playback rate changes.

* platform/cocoa/WebVideoFullscreenModelVideoElement.mm:
(WebVideoFullscreenModelVideoElement::setWebVideoFullscreenInterface):
We should not change the WebPlaybackSessionModelMediaElement's interface here since WebPlaybackSessionManager
has already set that up when creating the context for this media element.
(WebVideoFullscreenModelVideoElement::setVideoElement):
We should not change the WebPlaybackSessionModelMediaElement's media element here because
this will be called with NULL when the fullscreen context is cleaned up, but the
WebPlaybackSessionModelMediaElement might still need to stay around. We'll make sure the
WebPlaybackSessionModelMediaElement's media element is set when setting up the fullscreen
context in WebVideoFullscreenManager::enterVideoFullscreenForVideoElement().

* platform/mac/WebPlaybackSessionInterfaceMac.h:
(WebCore::WebPlaybackSessionInterfaceMacClient::~WebPlaybackSessionInterfaceMacClient):

* platform/mac/WebPlaybackSessionInterfaceMac.mm:
(WebCore::WebPlaybackSessionInterfaceMac::setClient):
Set the client. Notify the client about the current playback state.
(WebCore::WebPlaybackSessionInterfaceMac::setRate):
If a client is set, let that client know about the change in playback rate.

* platform/mac/WebVideoFullscreenInterfaceMac.h:
* platform/mac/WebVideoFullscreenInterfaceMac.mm:
(WebCore::WebVideoFullscreenInterfaceMac::WebVideoFullscreenInterfaceMac):
Set itself as a client of WebPlaybackSessionInterfaceMac.
(WebCore::WebVideoFullscreenInterfaceMac::~WebVideoFullscreenInterfaceMac):
Make sure WebPlaybackSessionInterfaceMac won't hold onto a stale pointer to itself.
(WebCore::WebVideoFullscreenInterfaceMac::setRate):
We don't have to update the WebVideoFullscreenInterfaceMac's rate here anymore. The change
in playback rate in WebPlaybackSessionInterfaceMac should trigger
WebVideoFullscreenInterfaceMac::rateChanged() to be called.
(WebCore::WebVideoFullscreenInterfaceMac::rateChanged):
Pass in both the isPlaying state and the playback rate to WebVideoFullscreenInterfaceMacObjC.

Source/WebKit2:

Since WebVideoFullscreenInterfaceMac holds onto WebPlaybackSessionInterfaceMac, we can't let
WebPlaybackSessionManagerProxy unregister the context for that media element while
WebVideoFullscreenInterfaceMac is still using it. WebVideoFullscreenInterfaceMac should add
to the client count for that WebPlaybackSession context.

* UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::createModelAndInterface):
When the context for the media element is created with the WebVideoFullscreenManagerProxy, it should
add one to the client count for the media element context in WebPlaybackSessionManagerProxy.
(WebKit::WebVideoFullscreenManagerProxy::removeClientForContext):
When WebVideoFullscreenManagerProxy unregisters the context for this media element, it should
subtract one from the client count for the media element context in WebPlaybackSessionManagerProxy.

* WebProcess/cocoa/WebPlaybackSessionManager.mm:
(WebKit::WebPlaybackSessionManager::clearPlaybackControlsManager):
Bail early if m_controlsManagerContextId is zero. Otherwise, we'd end up sending a
ClearPlaybackControlsManager message to the UI process inadvertently.
(WebKit::WebPlaybackSessionManager::contextIdForMediaElement):
Make sure the model element for the context ID is set to the media element.

* WebProcess/cocoa/WebVideoFullscreenManager.mm:
(WebKit::WebVideoFullscreenManager::createModelAndInterface):
When the context for the media element is created with the WebVideoFullscreenManager, it should
add one to the client count for the media element context in WebPlaybackSessionManager.
(WebKit::WebVideoFullscreenManager::removeContext):
When WebVideoFullscreenManager unregisters the context for this media element, it should
subtract one from the client count for the media element context in WebPlaybackSessionManager.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/cocoa/WebVideoFullscreenModelVideoElement.mm
trunk/Source/WebCore/platform/mac/WebPlaybackSessionInterfaceMac.h
trunk/Source/WebCore/platform/mac/WebPlaybackSessionInterfaceMac.m

[webkit-changes] [199733] trunk/Source/WebCore

2016-04-19 Thread adachan
Title: [199733] trunk/Source/WebCore








Revision 199733
Author adac...@apple.com
Date 2016-04-19 10:58:57 -0700 (Tue, 19 Apr 2016)


Log Message
Context menu items related to fullscreen should be specific to standard fullscreen
https://bugs.webkit.org/show_bug.cgi?id=156723


Reviewed by Darin Adler.

Introduce HTMLMediaElement::isStandardFullscreen() that the HitTestResult code can use
when handling the validation and selection of fullscreen-related context menu items.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::isStandardFullscreen):
(WebCore::HTMLMediaElement::toggleStandardFullscreenState):
Renamed to make it clear that it's for toggling standard fullscreen. Call the new
HTMLMediaElement::isStandardFullscreen().
* html/HTMLMediaElement.h:
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::mediaIsInFullscreen):
Use HTMLMediaElement::isStandardFullscreen().
(WebCore::HitTestResult::toggleMediaFullscreenState):
Call the renamed HTMLMediaElement::toggleStandardFullscreenState().

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/html/HTMLMediaElement.cpp
trunk/Source/WebCore/html/HTMLMediaElement.h
trunk/Source/WebCore/rendering/HitTestResult.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (199732 => 199733)

--- trunk/Source/WebCore/ChangeLog	2016-04-19 17:46:48 UTC (rev 199732)
+++ trunk/Source/WebCore/ChangeLog	2016-04-19 17:58:57 UTC (rev 199733)
@@ -1,3 +1,26 @@
+2016-04-18  Ada Chan  
+
+Context menu items related to fullscreen should be specific to standard fullscreen
+https://bugs.webkit.org/show_bug.cgi?id=156723
+
+
+Reviewed by Darin Adler.
+
+Introduce HTMLMediaElement::isStandardFullscreen() that the HitTestResult code can use
+when handling the validation and selection of fullscreen-related context menu items.
+
+* html/HTMLMediaElement.cpp:
+(WebCore::HTMLMediaElement::isStandardFullscreen):
+(WebCore::HTMLMediaElement::toggleStandardFullscreenState):
+Renamed to make it clear that it's for toggling standard fullscreen. Call the new
+HTMLMediaElement::isStandardFullscreen().
+* html/HTMLMediaElement.h:
+* rendering/HitTestResult.cpp:
+(WebCore::HitTestResult::mediaIsInFullscreen):
+Use HTMLMediaElement::isStandardFullscreen().
+(WebCore::HitTestResult::toggleMediaFullscreenState):
+Call the renamed HTMLMediaElement::toggleStandardFullscreenState().
+
 2016-04-19  Brady Eidson  
 
 Modern IDB: ObjectStore Blob Support.


Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (199732 => 199733)

--- trunk/Source/WebCore/html/HTMLMediaElement.cpp	2016-04-19 17:46:48 UTC (rev 199732)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp	2016-04-19 17:58:57 UTC (rev 199733)
@@ -5312,11 +5312,21 @@
 return false;
 }
 
-void HTMLMediaElement::toggleFullscreenState()
+bool HTMLMediaElement::isStandardFullscreen() const
 {
-LOG(Media, "HTMLMediaElement::toggleFullscreenState(%p) - isFullscreen() is %s", this, boolString(isFullscreen()));
+#if ENABLE(FULLSCREEN_API)
+if (document().webkitIsFullScreen() && document().webkitCurrentFullScreenElement() == this)
+return true;
+#endif
+
+return m_videoFullscreenMode == VideoFullscreenModeStandard;
+}
+
+void HTMLMediaElement::toggleStandardFullscreenState()
+{
+LOG(Media, "HTMLMediaElement::toggleStandardFullscreenState(%p) - isStandardFullscreen() is %s", this, boolString(isStandardFullscreen()));
 
-if (isFullscreen())
+if (isStandardFullscreen())
 exitFullscreen();
 else
 enterFullscreen();


Modified: trunk/Source/WebCore/html/HTMLMediaElement.h (199732 => 199733)

--- trunk/Source/WebCore/html/HTMLMediaElement.h	2016-04-19 17:46:48 UTC (rev 199732)
+++ trunk/Source/WebCore/html/HTMLMediaElement.h	2016-04-19 17:58:57 UTC (rev 199733)
@@ -358,7 +358,8 @@
 bool hasSingleSecurityOrigin() const { return !m_player || m_player->hasSingleSecurityOrigin(); }
 
 WEBCORE_EXPORT bool isFullscreen() const override;
-void toggleFullscreenState();
+bool isStandardFullscreen() const;
+void toggleStandardFullscreenState();
 
 using MediaPlayerEnums::VideoFullscreenMode;
 VideoFullscreenMode fullscreenMode() const { return m_videoFullscreenMode; }


Modified: trunk/Source/WebCore/rendering/HitTestResult.cpp (199732 => 199733)

--- trunk/Source/WebCore/rendering/HitTestResult.cpp	2016-04-19 17:46:48 UTC (rev 199732)
+++ trunk/Source/WebCore/rendering/HitTestResult.cpp	2016-04-19 17:58:57 UTC (rev 199733)
@@ -447,7 +447,7 @@
 {
 #if ENABLE(VIDEO)
 if (HTMLMediaElement* mediaElement = this->mediaElement())
-return mediaElement->isVideo() && mediaElement->isFullscreen();
+return mediaElement->isVideo() && mediaElement->isStandardFullscreen();
 #endif
 return false;
 }
@@ -458,7 +458,7 @@
 if (HTMLMediaElement* mediaElement = this->mediaElement()) {
 if (mediaE

[webkit-changes] [199206] trunk

2016-04-07 Thread adachan
Title: [199206] trunk








Revision 199206
Author adac...@apple.com
Date 2016-04-07 18:22:11 -0700 (Thu, 07 Apr 2016)


Log Message
Roll out the css change in mediaControlsApple.css that has been causing assertions in layout for multiple tests
https://bugs.webkit.org/show_bug.cgi?id=156381

Rubber-stamped by Alexey Proskuryakov.

Source/WebCore:

* Modules/mediacontrols/mediaControlsApple.css:
(::-webkit-media-controls):
Remove overflow: hidden.

LayoutTests:

* platform/mac/TestExpectations:
* platform/mac/media/media-document-audio-repaint-expected.txt:
* platform/mac/media/video-zoom-controls-expected.txt:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/mac/TestExpectations
trunk/LayoutTests/platform/mac/media/media-document-audio-repaint-expected.txt
trunk/LayoutTests/platform/mac/media/video-zoom-controls-expected.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.css




Diff

Modified: trunk/LayoutTests/ChangeLog (199205 => 199206)

--- trunk/LayoutTests/ChangeLog	2016-04-08 00:40:21 UTC (rev 199205)
+++ trunk/LayoutTests/ChangeLog	2016-04-08 01:22:11 UTC (rev 199206)
@@ -1,3 +1,14 @@
+2016-04-07  Ada Chan  
+
+Roll out the css change in mediaControlsApple.css that has been causing assertions in layout for multiple tests
+https://bugs.webkit.org/show_bug.cgi?id=156381
+
+Rubber-stamped by Alexey Proskuryakov.
+
+* platform/mac/TestExpectations:
+* platform/mac/media/media-document-audio-repaint-expected.txt:
+* platform/mac/media/video-zoom-controls-expected.txt:
+
 2016-04-07  Jiewen Tan  
 
 Unreviewed, rolling out r199199.


Modified: trunk/LayoutTests/platform/mac/TestExpectations (199205 => 199206)

--- trunk/LayoutTests/platform/mac/TestExpectations	2016-04-08 00:40:21 UTC (rev 199205)
+++ trunk/LayoutTests/platform/mac/TestExpectations	2016-04-08 01:22:11 UTC (rev 199206)
@@ -1322,15 +1322,3 @@
 webkit.org/b/156112 [ ElCapitan ] media/controls-without-preload.html [ Pass Failure ]
 
 webkit.org/b/156351 storage/indexeddb/modern/autoincrement-abort-private.html [ Pass Timeout ]
-
-webkit.org/b/156320 fast/regions/inline-block-inside-anonymous-overflow.html [ ImageOnlyFailure ]
-
-# Assertions in FrameView::scheduleRelayoutOfSubtree()
-webkit.org/b/156349 [ Debug ] http/tests/appcache/video.html [ Skip ]
-webkit.org/b/156349 [ Debug ] media/track/track-active-cues.html [ Skip ]
-webkit.org/b/156349 [ Debug ] media/track/track-in-band.html [ Skip ]
-webkit.org/b/156349 [ Debug ] media/track/video-track-alternate-groups.html [ Skip ]
-webkit.org/b/156349 [ Debug ] media/track/video-track.html [ Skip ]
-webkit.org/b/156349 [ Debug ] media/video-src-empty.html [ Skip ]
-webkit.org/b/156349 [ Debug ] media/media-controls-invalid-url.html [ Skip ]
-webkit.org/b/156349 [ Debug ] plugins/quicktime-plugin-replacement.html [ Skip ]


Modified: trunk/LayoutTests/platform/mac/media/media-document-audio-repaint-expected.txt (199205 => 199206)

--- trunk/LayoutTests/platform/mac/media/media-document-audio-repaint-expected.txt	2016-04-08 00:40:21 UTC (rev 199205)
+++ trunk/LayoutTests/platform/mac/media/media-document-audio-repaint-expected.txt	2016-04-08 01:22:11 UTC (rev 199206)
@@ -21,13 +21,38 @@
   RenderVideo {VIDEO} at (40,164) size 300x2
 layer at (40,165) size 300x1
   RenderFlexibleBox {DIV} at (0,0) size 300x1
-layer at (40,121) size 300x45 backgroundClip at (40,165) size 300x1 clip at (40,165) size 300x1
+layer at (40,121) size 300x45
   RenderFlexibleBox {DIV} at (0,-44) size 300x45
-layer at (40,121) size 300x45 backgroundClip at (40,165) size 300x1 clip at (40,165) size 300x1 isolatesBlending
+layer at (40,121) size 300x45 isolatesBlending
   RenderBlock (positioned) {DIV} at (0,0) size 300x45
-layer at (40,121) size 300x45 backgroundClip at (40,165) size 300x1 clip at (40,165) size 300x1
+layer at (40,121) size 300x45
   RenderBlock (positioned) {DIV} at (0,0) size 300x45 [bgcolor=#1E1E1E73]
-layer at (40,121) size 300x45 backgroundClip at (40,165) size 300x1 clip at (40,165) size 300x1 blendMode: lighten
+layer at (40,121) size 300x45 blendMode: lighten
   RenderBlock (positioned) {DIV} at (0,0) size 300x45 [bgcolor=#292929]
-layer at (318,141) size 14x25 backgroundClip at (40,165) size 300x1 clip at (40,165) size 300x1
+layer at (48,146) size 12x15 blendMode: plus-lighter
+  RenderButton {BUTTON} at (8,25) size 12x15 [color=#FF]
+layer at (76,145) size 16x15 blendMode: plus-lighter
+  RenderButton {BUTTON} at (36,24) size 16x16 [color=#FF]
+layer at (100,145) size 210x17
+  RenderFlexibleBox {DIV} at (60,24) size 210x17
+layer at (108,146) size 32x13 blendMode: plus-lighter
+  RenderFlexibleBox {DIV} at (8,2) size 32x13 [color=#FF]
+RenderBlock (anonymous) at (2,0) size 30x13
+  RenderText {#text} at (0,0) size 30x13
+text run at (

[webkit-changes] [199198] trunk/LayoutTests

2016-04-07 Thread adachan
Title: [199198] trunk/LayoutTests








Revision 199198
Author adac...@apple.com
Date 2016-04-07 15:35:30 -0700 (Thu, 07 Apr 2016)


Log Message
Skip a couple more tests that are asserting in FrameView::scheduleRelayoutOfSubtree().

Unreviewed test gardening.

* platform/mac/TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/mac/TestExpectations




Diff

Modified: trunk/LayoutTests/ChangeLog (199197 => 199198)

--- trunk/LayoutTests/ChangeLog	2016-04-07 22:34:58 UTC (rev 199197)
+++ trunk/LayoutTests/ChangeLog	2016-04-07 22:35:30 UTC (rev 199198)
@@ -1,3 +1,11 @@
+2016-04-07  Ada Chan  
+
+Skip a couple more tests that are asserting in FrameView::scheduleRelayoutOfSubtree().
+
+Unreviewed test gardening.
+
+* platform/mac/TestExpectations:
+
 2016-04-07  Jiewen Tan  
 
 Mark http/tests/cache/disk-cache/disk-cache-validation-back-navigation-policy.html as timeout in ios-simulator-wk2


Modified: trunk/LayoutTests/platform/mac/TestExpectations (199197 => 199198)

--- trunk/LayoutTests/platform/mac/TestExpectations	2016-04-07 22:34:58 UTC (rev 199197)
+++ trunk/LayoutTests/platform/mac/TestExpectations	2016-04-07 22:35:30 UTC (rev 199198)
@@ -1332,3 +1332,5 @@
 webkit.org/b/156349 [ Debug ] media/track/video-track-alternate-groups.html [ Skip ]
 webkit.org/b/156349 [ Debug ] media/track/video-track.html [ Skip ]
 webkit.org/b/156349 [ Debug ] media/video-src-empty.html [ Skip ]
+webkit.org/b/156349 [ Debug ] media/media-controls-invalid-url.html [ Skip ]
+webkit.org/b/156349 [ Debug ] plugins/quicktime-plugin-replacement.html [ Skip ]






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [199186] trunk/Source/WebCore

2016-04-07 Thread adachan
Title: [199186] trunk/Source/WebCore








Revision 199186
Author adac...@apple.com
Date 2016-04-07 14:51:45 -0700 (Thu, 07 Apr 2016)


Log Message
Add WebKitAdditions extension point in HTMLVideoElement::supportsFullscreen()
https://bugs.webkit.org/show_bug.cgi?id=156366

Reviewed by Alex Christensen.

* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::supportsFullscreen):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/html/HTMLVideoElement.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (199185 => 199186)

--- trunk/Source/WebCore/ChangeLog	2016-04-07 21:39:57 UTC (rev 199185)
+++ trunk/Source/WebCore/ChangeLog	2016-04-07 21:51:45 UTC (rev 199186)
@@ -1,3 +1,13 @@
+2016-04-07  Ada Chan  
+
+Add WebKitAdditions extension point in HTMLVideoElement::supportsFullscreen()
+https://bugs.webkit.org/show_bug.cgi?id=156366
+
+Reviewed by Alex Christensen.
+
+* html/HTMLVideoElement.cpp:
+(WebCore::HTMLVideoElement::supportsFullscreen):
+
 2016-04-07  Jon Davis  
 
 Add WOFF2 to the Feature Status page


Modified: trunk/Source/WebCore/html/HTMLVideoElement.cpp (199185 => 199186)

--- trunk/Source/WebCore/html/HTMLVideoElement.cpp	2016-04-07 21:39:57 UTC (rev 199185)
+++ trunk/Source/WebCore/html/HTMLVideoElement.cpp	2016-04-07 21:51:45 UTC (rev 199186)
@@ -146,6 +146,10 @@
 
 bool HTMLVideoElement::supportsFullscreen(HTMLMediaElementEnums::VideoFullscreenMode videoFullscreenMode) const
 {
+#if USE(APPLE_INTERNAL_SDK)
+#include 
+#endif
+
 Page* page = document().page();
 if (!page) 
 return false;






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [199175] trunk/Source/WebKit2

2016-04-07 Thread adachan
Title: [199175] trunk/Source/WebKit2








Revision 199175
Author adac...@apple.com
Date 2016-04-07 13:21:39 -0700 (Thu, 07 Apr 2016)


Log Message
Add WebKitAdditions extension points around preferences
https://bugs.webkit.org/show_bug.cgi?id=156303

Reviewed by Beth Dakin.

* Shared/WebPreferencesStore.cpp:
(WebKit::defaults):
* UIProcess/API/C/WKPreferences.cpp:

Modified Paths

trunk/Source/WebKit2/ChangeLog
trunk/Source/WebKit2/Shared/WebPreferencesStore.cpp
trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp




Diff

Modified: trunk/Source/WebKit2/ChangeLog (199174 => 199175)

--- trunk/Source/WebKit2/ChangeLog	2016-04-07 20:04:16 UTC (rev 199174)
+++ trunk/Source/WebKit2/ChangeLog	2016-04-07 20:21:39 UTC (rev 199175)
@@ -1,3 +1,14 @@
+2016-04-06  Ada Chan  
+
+Add WebKitAdditions extension points around preferences
+https://bugs.webkit.org/show_bug.cgi?id=156303
+
+Reviewed by Beth Dakin.
+
+* Shared/WebPreferencesStore.cpp:
+(WebKit::defaults):
+* UIProcess/API/C/WKPreferences.cpp:
+
 2016-04-07  Brian Burg  
 
 CookieJar should support adding synthetic cookies for developer tools


Modified: trunk/Source/WebKit2/Shared/WebPreferencesStore.cpp (199174 => 199175)

--- trunk/Source/WebKit2/Shared/WebPreferencesStore.cpp	2016-04-07 20:04:16 UTC (rev 199174)
+++ trunk/Source/WebKit2/Shared/WebPreferencesStore.cpp	2016-04-07 20:21:39 UTC (rev 199175)
@@ -164,6 +164,9 @@
 FOR_EACH_WEBKIT_PREFERENCE(DEFINE_DEFAULTS)
 FOR_EACH_WEBKIT_DEBUG_PREFERENCE(DEFINE_DEFAULTS)
 #undef DEFINE_DEFAULTS
+#if USE(APPLE_INTERNAL_SDK)
+#include 
+#endif
 }
 
 return defaults;


Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp (199174 => 199175)

--- trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp	2016-04-07 20:04:16 UTC (rev 199174)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp	2016-04-07 20:21:39 UTC (rev 199175)
@@ -35,6 +35,10 @@
 
 using namespace WebKit;
 
+#if USE(APPLE_INTERNAL_SDK)
+#include 
+#endif
+
 WKTypeID WKPreferencesGetTypeID()
 {
 return toAPI(WebPreferences::APIType);






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [199174] trunk

2016-04-07 Thread adachan
Title: [199174] trunk








Revision 199174
Author adac...@apple.com
Date 2016-04-07 13:04:16 -0700 (Thu, 07 Apr 2016)


Log Message
Rename TextTrackRepresentationiOS to TextTrackRepresentationCocoa and enable on Mac
https://bugs.webkit.org/show_bug.cgi?id=156245

Reviewed by Eric Carlson.

Source/WebCore:

* Modules/mediacontrols/mediaControlsApple.css:
(::-webkit-media-controls):
Match iOS and specify overflow: hidden on the -webkit-media-controls container.
(video::-webkit-media-text-track-container):
Match iOS and specify z-index: 0 on the text track container.

* WebCore.xcodeproj/project.pbxproj:
TextTrackRepresentationiOS.h/mm have been renamed to TextTrackRepresentationCocoa.h/mm.

* platform/graphics/TextTrackRepresentation.cpp:
* platform/graphics/cocoa/TextTrackRepresentationCocoa.h: Renamed from Source/WebCore/platform/graphics/ios/TextTrackRepresentationIOS.h.
* platform/graphics/cocoa/TextTrackRepresentationCocoa.mm: Renamed from Source/WebCore/platform/graphics/ios/TextTrackRepresentationIOS.mm.
(-[WebCoreTextTrackRepresentationCocoaHelper initWithParent:]):
(-[WebCoreTextTrackRepresentationCocoaHelper dealloc]):
(-[WebCoreTextTrackRepresentationCocoaHelper setParent:]):
(-[WebCoreTextTrackRepresentationCocoaHelper parent]):
(-[WebCoreTextTrackRepresentationCocoaHelper observeValueForKeyPath:ofObject:change:context:]):
(-[WebCoreTextTrackRepresentationCocoaHelper actionForLayer:forKey:]):
(TextTrackRepresentation::create):
(TextTrackRepresentationCocoa::TextTrackRepresentationCocoa):
(TextTrackRepresentationCocoa::~TextTrackRepresentationCocoa):
(TextTrackRepresentationCocoa::update):
(TextTrackRepresentationCocoa::setContentScale):
(TextTrackRepresentationCocoa::bounds):

LayoutTests:

* platform/mac/TestExpectations:
Skip some tests with assertions after changes in MediaControlsApple.css.

* platform/mac/media/media-document-audio-repaint-expected.txt:
* platform/mac/media/video-zoom-controls-expected.txt:
Rebaseline some tests after changes in MediaControlsApple.css.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/mac/TestExpectations
trunk/LayoutTests/platform/mac/media/media-document-audio-repaint-expected.txt
trunk/LayoutTests/platform/mac/media/video-zoom-controls-expected.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.css
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
trunk/Source/WebCore/platform/graphics/TextTrackRepresentation.cpp


Added Paths

trunk/Source/WebCore/platform/graphics/cocoa/TextTrackRepresentationCocoa.h
trunk/Source/WebCore/platform/graphics/cocoa/TextTrackRepresentationCocoa.mm


Removed Paths

trunk/Source/WebCore/platform/graphics/ios/TextTrackRepresentationIOS.h
trunk/Source/WebCore/platform/graphics/ios/TextTrackRepresentationIOS.mm




Diff

Modified: trunk/LayoutTests/ChangeLog (199173 => 199174)

--- trunk/LayoutTests/ChangeLog	2016-04-07 19:57:07 UTC (rev 199173)
+++ trunk/LayoutTests/ChangeLog	2016-04-07 20:04:16 UTC (rev 199174)
@@ -1,3 +1,17 @@
+2016-04-06  Ada Chan  
+
+Rename TextTrackRepresentationiOS to TextTrackRepresentationCocoa and enable on Mac
+https://bugs.webkit.org/show_bug.cgi?id=156245
+
+Reviewed by Eric Carlson.
+
+* platform/mac/TestExpectations:
+Skip some tests with assertions after changes in MediaControlsApple.css.
+
+* platform/mac/media/media-document-audio-repaint-expected.txt:
+* platform/mac/media/video-zoom-controls-expected.txt:
+Rebaseline some tests after changes in MediaControlsApple.css.
+
 2016-04-07  Daniel Bates  
 
 CSP: Remove tests for unimplemented directive referrer


Modified: trunk/LayoutTests/platform/mac/TestExpectations (199173 => 199174)

--- trunk/LayoutTests/platform/mac/TestExpectations	2016-04-07 19:57:07 UTC (rev 199173)
+++ trunk/LayoutTests/platform/mac/TestExpectations	2016-04-07 20:04:16 UTC (rev 199174)
@@ -1326,3 +1326,13 @@
 webkit.org/b/156112 [ ElCapitan ] media/controls-without-preload.html [ Pass Failure ]
 
 webkit.org/b/156351 storage/indexeddb/modern/autoincrement-abort-private.html [ Pass Timeout ]
+
+webkit.org/b/156320 fast/regions/inline-block-inside-anonymous-overflow.html [ ImageOnlyFailure ]
+
+# Assertions in FrameView::scheduleRelayoutOfSubtree()
+webkit.org/b/156349 [ Debug ] http/tests/appcache/video.html [ Skip ]
+webkit.org/b/156349 [ Debug ] media/track/track-active-cues.html [ Skip ]
+webkit.org/b/156349 [ Debug ] media/track/track-in-band.html [ Skip ]
+webkit.org/b/156349 [ Debug ] media/track/video-track-alternate-groups.html [ Skip ]
+webkit.org/b/156349 [ Debug ] media/track/video-track.html [ Skip ]
+webkit.org/b/156349 [ Debug ] media/video-src-empty.html [ Skip ]


Modified: trunk/LayoutTests/platform/mac/media/media-document-audio-repaint-expected.txt (199173 => 199174)

--- trunk/LayoutTests/platform/mac/media/media-document-audio-repaint-expected.txt	2016-04-07 19:57:07 UTC (rev 199173)
+++ trunk/LayoutTests/

[webkit-changes] [198949] trunk/LayoutTests

2016-04-01 Thread adachan
Title: [198949] trunk/LayoutTests








Revision 198949
Author adac...@apple.com
Date 2016-04-01 11:15:04 -0700 (Fri, 01 Apr 2016)


Log Message
Add a way to reset the eventTrigger in ControlsTest in LayoutTests/media/controls/controls-test-helpers.js
https://bugs.webkit.org/show_bug.cgi?id=154616

Reviewed by Dean Jackson.

* media/controls/controls-test-helpers.js:
(ControlsTest.prototype.resetEventTrigger):

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/media/controls/controls-test-helpers.js




Diff

Modified: trunk/LayoutTests/ChangeLog (198948 => 198949)

--- trunk/LayoutTests/ChangeLog	2016-04-01 17:55:25 UTC (rev 198948)
+++ trunk/LayoutTests/ChangeLog	2016-04-01 18:15:04 UTC (rev 198949)
@@ -1,3 +1,13 @@
+2016-04-01  Ada Chan  
+
+Add a way to reset the eventTrigger in ControlsTest in LayoutTests/media/controls/controls-test-helpers.js
+https://bugs.webkit.org/show_bug.cgi?id=154616
+
+Reviewed by Dean Jackson.
+
+* media/controls/controls-test-helpers.js:
+(ControlsTest.prototype.resetEventTrigger):
+
 2016-04-01  Ryan Haddad  
 
 Marking three media controls tests as flaky on El Capitan


Modified: trunk/LayoutTests/media/controls/controls-test-helpers.js (198948 => 198949)

--- trunk/LayoutTests/media/controls/controls-test-helpers.js	2016-04-01 17:55:25 UTC (rev 198948)
+++ trunk/LayoutTests/media/controls/controls-test-helpers.js	2016-04-01 18:15:04 UTC (rev 198949)
@@ -21,6 +21,19 @@
 return this;
 }
 
+resetEventTrigger(eventTrigger)
+{
+if (this.eventTrigger && this.media)
+this.media.removeEventListener(this.eventTrigger, this, false);
+
+this.eventTrigger = eventTrigger;
+if (!this.media)
+return null;
+
+this.media.addEventListener(this.eventTrigger, this, false);
+return this;
+}
+
 get currentState()
 {
 if (!this.media)






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [198900] trunk/Source

2016-03-31 Thread adachan
Title: [198900] trunk/Source








Revision 198900
Author adac...@apple.com
Date 2016-03-31 11:23:29 -0700 (Thu, 31 Mar 2016)


Log Message
Add the new "toggle enhanced fullscreen" context menu item to the video context menu on supporting platforms.
https://bugs.webkit.org/show_bug.cgi?id=156031

Reviewed by Eric Carlson.

Source/WebCore:

* page/ContextMenuController.cpp:
(WebCore::ContextMenuController::contextMenuItemSelected):
Handle the selection of the context menu item.
(WebCore::ContextMenuController::populate):
Add this menu item on Mac.
(WebCore::ContextMenuController::checkOrEnableIfNeeded):
Set the menu item's title depending on the current enhanced fullscreen state
and enable this menu item if supported.

* platform/ContextMenuItem.h:
Define the new tag for this menu item.

* platform/LocalizedStrings.cpp:
(WebCore::contextMenuItemTagEnterVideoEnhancedFullscreen):
(WebCore::contextMenuItemTagExitVideoEnhancedFullscreen):
* platform/LocalizedStrings.h:

* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::mediaSupportsEnhancedFullscreen):
(WebCore::HitTestResult::mediaIsInEnhancedFullscreen):
(WebCore::HitTestResult::toggleEnhancedFullscreenForVideo):
* rendering/HitTestResult.h:

Source/WebKit/mac:

* WebView/WebHTMLView.mm:
(toAction):
(toTag):
* WebView/WebUIDelegatePrivate.h:

Source/WebKit2:

* Shared/API/c/WKContextMenuItemTypes.h:
* Shared/API/c/WKSharedAPICast.h:
(WebKit::toAPI):
(WebKit::toImpl):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/page/ContextMenuController.cpp
trunk/Source/WebCore/platform/ContextMenuItem.h
trunk/Source/WebCore/platform/LocalizedStrings.cpp
trunk/Source/WebCore/platform/LocalizedStrings.h
trunk/Source/WebCore/rendering/HitTestResult.cpp
trunk/Source/WebCore/rendering/HitTestResult.h
trunk/Source/WebKit/mac/ChangeLog
trunk/Source/WebKit/mac/WebView/WebHTMLView.mm
trunk/Source/WebKit/mac/WebView/WebUIDelegatePrivate.h
trunk/Source/WebKit2/ChangeLog
trunk/Source/WebKit2/Shared/API/c/WKContextMenuItemTypes.h
trunk/Source/WebKit2/Shared/API/c/WKSharedAPICast.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (198899 => 198900)

--- trunk/Source/WebCore/ChangeLog	2016-03-31 18:16:37 UTC (rev 198899)
+++ trunk/Source/WebCore/ChangeLog	2016-03-31 18:23:29 UTC (rev 198900)
@@ -1,3 +1,33 @@
+2016-03-30  Ada Chan  
+
+Add the new "toggle enhanced fullscreen" context menu item to the video context menu on supporting platforms.
+https://bugs.webkit.org/show_bug.cgi?id=156031
+
+Reviewed by Eric Carlson.
+
+* page/ContextMenuController.cpp:
+(WebCore::ContextMenuController::contextMenuItemSelected):
+Handle the selection of the context menu item.
+(WebCore::ContextMenuController::populate):
+Add this menu item on Mac.
+(WebCore::ContextMenuController::checkOrEnableIfNeeded):
+Set the menu item's title depending on the current enhanced fullscreen state
+and enable this menu item if supported.
+
+* platform/ContextMenuItem.h:
+Define the new tag for this menu item.
+
+* platform/LocalizedStrings.cpp:
+(WebCore::contextMenuItemTagEnterVideoEnhancedFullscreen):
+(WebCore::contextMenuItemTagExitVideoEnhancedFullscreen):
+* platform/LocalizedStrings.h:
+
+* rendering/HitTestResult.cpp:
+(WebCore::HitTestResult::mediaSupportsEnhancedFullscreen):
+(WebCore::HitTestResult::mediaIsInEnhancedFullscreen):
+(WebCore::HitTestResult::toggleEnhancedFullscreenForVideo):
+* rendering/HitTestResult.h:
+
 2016-03-31  Nan Wang  
 
 AX: aria-hidden=false causes video fallback content to be exposed to AX API


Modified: trunk/Source/WebCore/page/ContextMenuController.cpp (198899 => 198900)

--- trunk/Source/WebCore/page/ContextMenuController.cpp	2016-03-31 18:16:37 UTC (rev 198899)
+++ trunk/Source/WebCore/page/ContextMenuController.cpp	2016-03-31 18:23:29 UTC (rev 198900)
@@ -279,6 +279,9 @@
 case ContextMenuItemTagMediaMute:
 m_context.hitTestResult().toggleMediaMuteState();
 break;
+case ContextMenuItemTagToggleVideoEnhancedFullscreen:
+m_context.hitTestResult().toggleEnhancedFullscreenForVideo();
+break;
 case ContextMenuItemTagOpenFrameInNewWindow: {
 DocumentLoader* loader = frame->loader().documentLoader();
 if (!loader->unreachableURL().isEmpty())
@@ -766,6 +769,9 @@
 contextMenuItemTagEnterVideoFullscreen());
 ContextMenuItem ToggleVideoFullscreen(ActionType, ContextMenuItemTagToggleVideoFullscreen,
 contextMenuItemTagEnterVideoFullscreen());
+#if PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE)
+ContextMenuItem ToggleVideoEnhancedFullscreen(ActionType, ContextMenuItemTagToggleVideoEnhancedFullscreen, contextMenuItemTagEnterVideoEnhancedFullscreen());
+#endif
 #if PLATFORM(COCOA)
 ContextMenuItem SearchSpotlightItem(ActionType, ContextMenuItemTagSearchInSpotlight, 
 contextMenuIte

[webkit-changes] [197893] trunk/Source/WebCore

2016-03-09 Thread adachan
Title: [197893] trunk/Source/WebCore








Revision 197893
Author adac...@apple.com
Date 2016-03-09 15:36:22 -0800 (Wed, 09 Mar 2016)


Log Message
Add a getter for WebVideoFullscreenInterfaceObjC and update its rate property
https://bugs.webkit.org/show_bug.cgi?id=155239

Reviewed by Eric Carlson.

* platform/mac/WebVideoFullscreenInterfaceMac.h:
Move the stub implementation of setVideoDimensions() to the mm file.
Declare a getter to WebVideoFullscreenInterfaceMacObjC.
* platform/mac/WebVideoFullscreenInterfaceMac.mm:
(WebCore::WebVideoFullscreenInterfaceMac::setRate):
Also update the rate property of WebVideoFullscreenInterfaceMacObjC.
(WebCore::WebVideoFullscreenInterfaceMac::setVideoDimensions):
Stub implementation of setVideoDimensions() has been moved to here.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/mac/WebVideoFullscreenInterfaceMac.h
trunk/Source/WebCore/platform/mac/WebVideoFullscreenInterfaceMac.mm




Diff

Modified: trunk/Source/WebCore/ChangeLog (197892 => 197893)

--- trunk/Source/WebCore/ChangeLog	2016-03-09 23:33:55 UTC (rev 197892)
+++ trunk/Source/WebCore/ChangeLog	2016-03-09 23:36:22 UTC (rev 197893)
@@ -1,3 +1,19 @@
+2016-03-09  Ada Chan  
+
+Add a getter for WebVideoFullscreenInterfaceObjC and update its rate property
+https://bugs.webkit.org/show_bug.cgi?id=155239
+
+Reviewed by Eric Carlson.
+
+* platform/mac/WebVideoFullscreenInterfaceMac.h:
+Move the stub implementation of setVideoDimensions() to the mm file.
+Declare a getter to WebVideoFullscreenInterfaceMacObjC.
+* platform/mac/WebVideoFullscreenInterfaceMac.mm:
+(WebCore::WebVideoFullscreenInterfaceMac::setRate):
+Also update the rate property of WebVideoFullscreenInterfaceMacObjC.
+(WebCore::WebVideoFullscreenInterfaceMac::setVideoDimensions):
+Stub implementation of setVideoDimensions() has been moved to here.
+
 2016-03-09  Alex Christensen  
 
 Fix Mac build without video enabled after r197633.


Modified: trunk/Source/WebCore/platform/mac/WebVideoFullscreenInterfaceMac.h (197892 => 197893)

--- trunk/Source/WebCore/platform/mac/WebVideoFullscreenInterfaceMac.h	2016-03-09 23:33:55 UTC (rev 197892)
+++ trunk/Source/WebCore/platform/mac/WebVideoFullscreenInterfaceMac.h	2016-03-09 23:36:22 UTC (rev 197893)
@@ -66,7 +66,7 @@
 WEBCORE_EXPORT void setCurrentTime(double /*currentTime*/, double /*anchorTime*/) override;
 WEBCORE_EXPORT void setBufferedTime(double) override { }
 WEBCORE_EXPORT void setRate(bool /*isPlaying*/, float /*playbackRate*/) override;
-WEBCORE_EXPORT void setVideoDimensions(bool /*hasVideo*/, float /*width*/, float /*height*/) override { }
+WEBCORE_EXPORT void setVideoDimensions(bool hasVideo, float width, float height) final;
 WEBCORE_EXPORT void setSeekableRanges(const TimeRanges&) override;
 WEBCORE_EXPORT void setCanPlayFastReverse(bool) override { }
 WEBCORE_EXPORT void setAudioMediaSelectionOptions(const Vector& /*options*/, uint64_t /*selectedIndex*/) override { }
@@ -94,6 +94,9 @@
 void applicationDidBecomeActive() { }
 
 WEBCORE_EXPORT WebPlaybackControlsManager *playBackControlsManager();
+#if USE(APPLE_INTERNAL_SDK)
+WEBCORE_EXPORT WebVideoFullscreenInterfaceMacObjC *videoFullscreenInterfaceObjC();
+#endif
 
 private:
 WebVideoFullscreenModel* m_videoFullscreenModel { nullptr };


Modified: trunk/Source/WebCore/platform/mac/WebVideoFullscreenInterfaceMac.mm (197892 => 197893)

--- trunk/Source/WebCore/platform/mac/WebVideoFullscreenInterfaceMac.mm	2016-03-09 23:33:55 UTC (rev 197892)
+++ trunk/Source/WebCore/platform/mac/WebVideoFullscreenInterfaceMac.mm	2016-03-09 23:36:22 UTC (rev 197893)
@@ -215,6 +215,10 @@
 WebPlaybackControlsManager* controlsManager = playBackControlsManager();
 
 [controlsManager setRate:isPlaying ? playbackRate : 0.];
+
+#if USE(APPLE_INTERNAL_SDK)
+[videoFullscreenInterfaceObjC() setRate:isPlaying ? playbackRate : 0.];
+#endif
 }
 
 void WebVideoFullscreenInterfaceMac::setSeekableRanges(const TimeRanges& timeRanges)
@@ -281,6 +285,10 @@
 {
 }
 
+void WebVideoFullscreenInterfaceMac::setVideoDimensions(bool, float, float)
+{
+}
+
 bool supportsPictureInPicture()
 {
 return false;






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [197807] trunk/Source/WebCore

2016-03-08 Thread adachan
Title: [197807] trunk/Source/WebCore








Revision 197807
Author adac...@apple.com
Date 2016-03-08 15:16:29 -0800 (Tue, 08 Mar 2016)


Log Message
Enable API related to the video fullscreen layer in MediaPlayerPrivateMediaStreamAVFObjC for Mac.
https://bugs.webkit.org/show_bug.cgi?id=153239

Reviewed by Eric Carlson.

Reuse VideoFullscreenLayerManager to manage moving the video layer between the fullscreen
layer and the inline layer depending on the current presentation mode.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::MediaPlayerPrivateMediaStreamAVFObjC):
Create m_videoFullscreenLayerManager.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::platformLayer):
Return the video inline layer from the VideoFullscreenLayerManager.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::createPreviewLayers):
Call VideoFullscreenLayerManager::setVideoLayer() with the m_videoBackgroundLayer. To make sure
the preview layer (a sublayer of m_videoBackgroundLayer) resize according to aspect ratio, set
its contents gravity to kCAGravityResizeAspect. Also, set its autoresizing mask so it'll resize
with its superlayer.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setVideoFullscreenLayer):
Call VideoFullscreenLayerManager::setVideoFullscreenLayer().
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setVideoFullscreenFrame):
Call VideoFullscreenLayerManager::setVideoFullscreenFrame().

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h
trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm




Diff

Modified: trunk/Source/WebCore/ChangeLog (197806 => 197807)

--- trunk/Source/WebCore/ChangeLog	2016-03-08 23:02:55 UTC (rev 197806)
+++ trunk/Source/WebCore/ChangeLog	2016-03-08 23:16:29 UTC (rev 197807)
@@ -1,3 +1,29 @@
+2016-03-08  Ada Chan  
+
+Enable API related to the video fullscreen layer in MediaPlayerPrivateMediaStreamAVFObjC for Mac.
+https://bugs.webkit.org/show_bug.cgi?id=153239
+
+Reviewed by Eric Carlson.
+
+Reuse VideoFullscreenLayerManager to manage moving the video layer between the fullscreen
+layer and the inline layer depending on the current presentation mode.
+
+* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
+* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
+(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::MediaPlayerPrivateMediaStreamAVFObjC):
+Create m_videoFullscreenLayerManager.
+(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::platformLayer):
+Return the video inline layer from the VideoFullscreenLayerManager.
+(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::createPreviewLayers):
+Call VideoFullscreenLayerManager::setVideoLayer() with the m_videoBackgroundLayer. To make sure
+the preview layer (a sublayer of m_videoBackgroundLayer) resize according to aspect ratio, set
+its contents gravity to kCAGravityResizeAspect. Also, set its autoresizing mask so it'll resize
+with its superlayer.
+(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setVideoFullscreenLayer):
+Call VideoFullscreenLayerManager::setVideoFullscreenLayer().
+(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setVideoFullscreenFrame):
+Call VideoFullscreenLayerManager::setVideoFullscreenFrame().
+
 2016-03-08  Myles C. Maxfield  
 
 [Font Loading] Crash when a single load request causes multiple fonts to fail loading


Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h (197806 => 197807)

--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h	2016-03-08 23:02:55 UTC (rev 197806)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h	2016-03-08 23:16:29 UTC (rev 197807)
@@ -46,6 +46,10 @@
 class MediaSourcePrivateClient;
 class VideoTrackPrivateMediaStream;
 
+#if PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE)
+class VideoFullscreenLayerManager;
+#endif
+
 class MediaPlayerPrivateMediaStreamAVFObjC : public MediaPlayerPrivateInterface, public MediaStreamPrivate::Observer {
 public:
 explicit MediaPlayerPrivateMediaStreamAVFObjC(MediaPlayer*);
@@ -155,6 +159,11 @@
 void didAddTrack(MediaStreamTrackPrivate&) override;
 void didRemoveTrack(MediaStreamTrackPrivate&) override;
 
+#if PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE)
+void setVideoFullscreenLayer(PlatformLayer*) override;
+void setVideoFullscreenFrame(FloatRect) override;
+#endif
+
 MediaPlayer* m_player { nullptr };
 WeakPtrFactory m_weakPtrFactory;
 RefPtr m_mediaStreamPrivate;
@@ -175,6 +184,10 @@

[webkit-changes] [197787] trunk/Source/WebKit2

2016-03-08 Thread adachan
Title: [197787] trunk/Source/WebKit2








Revision 197787
Author adac...@apple.com
Date 2016-03-08 11:32:58 -0800 (Tue, 08 Mar 2016)


Log Message
Fix lifetime issues regarding WebVideoFullscreenInterfaceMac
https://bugs.webkit.org/show_bug.cgi?id=155130

Reviewed by Beth Dakin.

Now that both fullscreen and video controls manager rely on WebVideoFullscreenInterface,
we now keep track of a "client count" for each context ID so we'll only remove it
from the context map after all the "clients" are done with it.

Before this change, every time WebVideoFullscreenManager::setUpVideoControlsManager()
is called, the existing interface is cleared and a new one is created even when there's
an existing interface for that. With this change, we reuse the existing interface for
the video element.

* UIProcess/Cocoa/WebVideoFullscreenManagerProxy.h:
* UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::invalidate):
Also clear out m_clientCounts.
(WebKit::WebVideoFullscreenManagerProxy::addClientForContext):
If the context ID is not in m_clientCounts yet, add the count of 1 to
that table for that ID. Otherwise, increment the count by 1.
(WebKit::WebVideoFullscreenManagerProxy::removeClientForContext):
Assert that we have added this context id to m_clientCounts before.
Decrement the count. If it reaches 0, remove this context ID from both
m_clientCounts and m_contextMap.
(WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID):
We have started a new fullscreen session using this interface. Call
addClientForContext() to update the client count.
(WebKit::WebVideoFullscreenManagerProxy::setUpVideoControlsManagerWithID):
If the current controls manager set up has the same context ID as the one
passed in, we don't have to do anything. Otherwise, if we have set up
the video controls manager with a different ID before, call removeClientForContext()
on the old ID to decrement its client count. Set m_controlsManagerContextId
to the new value and call addClientForContext() with it.
(WebKit::WebVideoFullscreenManagerProxy::didCleanupFullscreen):
Instead of removing the mapping from m_contextMap directly, reset the fullscreen
mode on the interface and call removeClientForContext(), which removes the mapping
only if there's no more client using the interface.
* WebProcess/cocoa/WebVideoFullscreenManager.h:
* WebProcess/cocoa/WebVideoFullscreenManager.mm:
(WebKit::WebVideoFullscreenManager::~WebVideoFullscreenManager):
Clear m_clientCounts.
(WebKit::WebVideoFullscreenManager::removeContext):
Add a helper method for removing the context.
(WebKit::WebVideoFullscreenManager::addClientForContext):
If the context ID is not in m_clientCounts yet, add the count of 1 to
that table for that ID. Otherwise, increment the count by 1.
(WebKit::WebVideoFullscreenManager::removeClientForContext):
Assert that we have added this context id to m_clientCounts before.
Decrement the count. If it reaches 0, remove this context ID from
m_clientCounts and call removeContext() to clean up this context.
(WebKit::WebVideoFullscreenManager::enterVideoFullscreenForVideoElement):
We have started a new fullscreen session using this interface. Call
addClientForContext() to update the client count. Create a layer hosting
context if it's not there.
(WebKit::WebVideoFullscreenManager::setUpVideoControlsManager):
If we have set up a context for this video element before, see if it's
the one we are currently managing video controls for. If it is, return early.
Otherwise, call removeClientForContext() on the previous m_controlsManagerContextId
and update m_controlsManagerContextId to the context ID of this video element.
If there's no context created for this video element yet, set one up.
Send a SetUpVideoControlsManagerWithID message to the proxy object in the UI process
so it'll update its controls manager context ID. Also, conditionalize all of this
under PLATFORM(MAC) to be consistent with WebVideoFullscreenManagerProxy.
(WebKit::WebVideoFullscreenManager::didCleanupFullscreen):
Just reset the fullscreen mode on the interface and call removeClientForContext() which
only cleans up the context if there's no more client using it.

Modified Paths

trunk/Source/WebKit2/ChangeLog
trunk/Source/WebKit2/UIProcess/Cocoa/WebVideoFullscreenManagerProxy.h
trunk/Source/WebKit2/UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm
trunk/Source/WebKit2/WebProcess/cocoa/WebVideoFullscreenManager.h
trunk/Source/WebKit2/WebProcess/cocoa/WebVideoFullscreenManager.mm




Diff

Modified: trunk/Source/WebKit2/ChangeLog (197786 => 197787)

--- trunk/Source/WebKit2/ChangeLog	2016-03-08 19:02:31 UTC (rev 197786)
+++ trunk/Source/WebKit2/ChangeLog	2016-03-08 19:32:58 UTC (rev 197787)
@@ -1,3 +1,73 @@
+2016-03-04  Ada Chan  
+
+Fix lifetime issues regarding WebVideoFullscreenInterfaceMac
+https://bugs.webkit.org/show_bug.cgi?id=155130
+
+Reviewed by Beth Dakin.
+
+Now that both fullscreen and video controls manager rel

[webkit-changes] [197569] trunk/Source/WebCore

2016-03-04 Thread adachan
Title: [197569] trunk/Source/WebCore








Revision 197569
Author adac...@apple.com
Date 2016-03-04 10:27:04 -0800 (Fri, 04 Mar 2016)


Log Message
The visibility of the airplay menu also depends on whether there's a custom menu item.
https://bugs.webkit.org/show_bug.cgi?id=154987

Reviewed by Darin Adler.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::enqueuePlaybackTargetAvailabilityChangedEvent):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/html/HTMLMediaElement.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (197568 => 197569)

--- trunk/Source/WebCore/ChangeLog	2016-03-04 18:01:37 UTC (rev 197568)
+++ trunk/Source/WebCore/ChangeLog	2016-03-04 18:27:04 UTC (rev 197569)
@@ -1,3 +1,13 @@
+2016-03-03  Ada Chan  
+
+The visibility of the airplay menu also depends on whether there's a custom menu item.
+https://bugs.webkit.org/show_bug.cgi?id=154987
+
+Reviewed by Darin Adler.
+
+* html/HTMLMediaElement.cpp:
+(WebCore::HTMLMediaElement::enqueuePlaybackTargetAvailabilityChangedEvent):
+
 2016-03-04  Timothy Hatcher  
 
 Inform WebKit and WebCore if a page is controlled by automation.


Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (197568 => 197569)

--- trunk/Source/WebCore/html/HTMLMediaElement.cpp	2016-03-04 18:01:37 UTC (rev 197568)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp	2016-03-04 18:27:04 UTC (rev 197569)
@@ -5173,7 +5173,7 @@
 
 void HTMLMediaElement::enqueuePlaybackTargetAvailabilityChangedEvent()
 {
-bool hasTargets = m_mediaSession->hasWirelessPlaybackTargets(*this);
+bool hasTargets = m_mediaSession->hasWirelessPlaybackTargets(*this) || !playbackTargetPickerCustomActionName().isEmpty();
 LOG(Media, "HTMLMediaElement::enqueuePlaybackTargetAvailabilityChangedEvent(%p) - hasTargets = %s", this, boolString(hasTargets));
 RefPtr event = WebKitPlaybackTargetAvailabilityEvent::create(eventNames().webkitplaybacktargetavailabilitychangedEvent, hasTargets);
 event->setTarget(this);






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [197478] trunk/Source

2016-03-02 Thread adachan
Title: [197478] trunk/Source








Revision 197478
Author adac...@apple.com
Date 2016-03-02 16:34:19 -0800 (Wed, 02 Mar 2016)


Log Message
Update the media element's presentation mode properly after going in and out of full screen via the Full Screen API
https://bugs.webkit.org/show_bug.cgi?id=154834

Reviewed by Simon Fraser.

Source/WebCore:

* dom/Document.cpp:
(WebCore::Document::webkitWillEnterFullScreenForElement):
* dom/Element.cpp:
(WebCore::Element::willBecomeFullscreenElement):
* dom/Element.h:
(WebCore::Element::ancestorWillEnterFullscreen):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::enterFullscreen):
If the Full Screen API is enabled and this media element is entering a mode other than standard
full screen, see if it's currently contained in a full screen element. If so, exit full screen.
(WebCore::HTMLMediaElement::willBecomeFullscreenElement):
If this media element is going to standard full screen, update its presentation mode. If
this media element also supports presentation mode and it currently has a presentation mode
that's not standard full screen, exit that presentation mode directly without animation.
(WebCore::HTMLMediaElement::willStopBeingFullscreenElement):
Set the presentation mode back to inline unless it's already changed to a different
presentation mode.
* html/HTMLMediaElement.h:
* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::ancestorWillEnterFullscreen):
Reset this video element's presentation state to inline if its ancestor is going to full screen.
(WebCore::HTMLVideoElement::exitToFullscreenModeWithoutAnimationIfPossible):
If the fullscreen mode the video element is exiting from is supported, exit that mode to the new mode.
* html/HTMLVideoElement.h:
* page/ChromeClient.h:
* platform/mac/WebVideoFullscreenInterfaceMac.h:
* platform/mac/WebVideoFullscreenInterfaceMac.mm:
(WebCore::WebVideoFullscreenInterfaceMac::exitFullscreenWithoutAnimationToMode):

Source/WebKit2:

* UIProcess/Cocoa/WebVideoFullscreenManagerProxy.h:
* UIProcess/Cocoa/WebVideoFullscreenManagerProxy.messages.in:
* UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::exitFullscreenWithoutAnimationToMode):
Call the new exitFullscreenWithoutAnimationToMode() method on WebVideoFullscreenInterfaceMac.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::exitVideoFullscreenToModeWithoutAnimation):
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/cocoa/WebVideoFullscreenManager.h:
* WebProcess/cocoa/WebVideoFullscreenManager.mm:
(WebKit::WebVideoFullscreenManager::exitVideoFullscreenToModeWithoutAnimation):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/dom/Document.cpp
trunk/Source/WebCore/dom/Element.cpp
trunk/Source/WebCore/dom/Element.h
trunk/Source/WebCore/html/HTMLMediaElement.cpp
trunk/Source/WebCore/html/HTMLMediaElement.h
trunk/Source/WebCore/html/HTMLVideoElement.cpp
trunk/Source/WebCore/html/HTMLVideoElement.h
trunk/Source/WebCore/page/ChromeClient.h
trunk/Source/WebCore/platform/mac/WebVideoFullscreenInterfaceMac.h
trunk/Source/WebCore/platform/mac/WebVideoFullscreenInterfaceMac.mm
trunk/Source/WebKit2/ChangeLog
trunk/Source/WebKit2/UIProcess/Cocoa/WebVideoFullscreenManagerProxy.h
trunk/Source/WebKit2/UIProcess/Cocoa/WebVideoFullscreenManagerProxy.messages.in
trunk/Source/WebKit2/UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h
trunk/Source/WebKit2/WebProcess/cocoa/WebVideoFullscreenManager.h
trunk/Source/WebKit2/WebProcess/cocoa/WebVideoFullscreenManager.mm




Diff

Modified: trunk/Source/WebCore/ChangeLog (197477 => 197478)

--- trunk/Source/WebCore/ChangeLog	2016-03-03 00:29:01 UTC (rev 197477)
+++ trunk/Source/WebCore/ChangeLog	2016-03-03 00:34:19 UTC (rev 197478)
@@ -1,3 +1,39 @@
+2016-03-01  Ada Chan  
+
+Update the media element's presentation mode properly after going in and out of full screen via the Full Screen API
+https://bugs.webkit.org/show_bug.cgi?id=154834
+
+Reviewed by Simon Fraser.
+
+* dom/Document.cpp:
+(WebCore::Document::webkitWillEnterFullScreenForElement):
+* dom/Element.cpp:
+(WebCore::Element::willBecomeFullscreenElement):
+* dom/Element.h:
+(WebCore::Element::ancestorWillEnterFullscreen):
+* html/HTMLMediaElement.cpp:
+(WebCore::HTMLMediaElement::enterFullscreen):
+If the Full Screen API is enabled and this media element is entering a mode other than standard
+full screen, see if it's currently contained in a full screen element. If so, exit full screen.
+(WebCore::HTMLMediaElement::willBecomeFullscreenElement):
+If this media element is going to standard full screen, update its presentation mode. If
+this media element also supports presentation mode and it currently has a presentation mode
+  

[webkit-changes] [197432] trunk/Source/WebCore

2016-03-01 Thread adachan
Title: [197432] trunk/Source/WebCore








Revision 197432
Author adac...@apple.com
Date 2016-03-01 18:16:12 -0800 (Tue, 01 Mar 2016)


Log Message
One more attempt to fix the build.

* platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
(WebCore::MediaPlaybackTargetPickerMac::showPlaybackTargetPicker):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm




Diff

Modified: trunk/Source/WebCore/ChangeLog (197431 => 197432)

--- trunk/Source/WebCore/ChangeLog	2016-03-02 02:07:20 UTC (rev 197431)
+++ trunk/Source/WebCore/ChangeLog	2016-03-02 02:16:12 UTC (rev 197432)
@@ -1,5 +1,12 @@
 2016-03-01  Ada Chan  
 
+One more attempt to fix the build.
+
+* platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
+(WebCore::MediaPlaybackTargetPickerMac::showPlaybackTargetPicker):
+
+2016-03-01  Ada Chan  
+
 Attempt to fix the internal build.
 
 * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:


Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm (197431 => 197432)

--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm	2016-03-02 02:07:20 UTC (rev 197431)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm	2016-03-02 02:16:12 UTC (rev 197432)
@@ -111,6 +111,10 @@
 
 void MediaPlaybackTargetPickerMac::showPlaybackTargetPicker(const FloatRect& location, bool checkActiveRoute, const String& customMenuItemTitle)
 {
+#if !PLATFORM(MAC) || __MAC_OS_X_VERSION_MIN_REQUIRED < 101200
+UNUSED_PARAM(customMenuItemTitle);
+#endif
+
 if (!client() || m_showingMenu)
 return;
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [197431] trunk/Source/WebCore

2016-03-01 Thread adachan
Title: [197431] trunk/Source/WebCore








Revision 197431
Author adac...@apple.com
Date 2016-03-01 18:07:20 -0800 (Tue, 01 Mar 2016)


Log Message
Attempt to fix the internal build.

* platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
(WebCore::MediaPlaybackTargetPickerMac::showPlaybackTargetPicker):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm




Diff

Modified: trunk/Source/WebCore/ChangeLog (197430 => 197431)

--- trunk/Source/WebCore/ChangeLog	2016-03-02 01:43:03 UTC (rev 197430)
+++ trunk/Source/WebCore/ChangeLog	2016-03-02 02:07:20 UTC (rev 197431)
@@ -1,3 +1,10 @@
+2016-03-01  Ada Chan  
+
+Attempt to fix the internal build.
+
+* platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
+(WebCore::MediaPlaybackTargetPickerMac::showPlaybackTargetPicker):
+
 2016-02-29  Ada Chan  
 
 Adopt the new version of AVOutputDeviceMenuController's showMenuForRect method.


Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm (197430 => 197431)

--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm	2016-03-02 01:43:03 UTC (rev 197430)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm	2016-03-02 02:07:20 UTC (rev 197431)
@@ -117,11 +117,16 @@
 LOG(Media, "MediaPlaybackTargetPickerMac::showPlaybackTargetPicker - checkActiveRoute = %i", (int)checkActiveRoute);
 
 AVOutputDeviceMenuControllerType *picker = devicePicker();
-if (![picker respondsToSelector:@selector(showMenuForRect:appearanceName:allowReselectionOfSelectedOutputDevice:customMenuItemTitle:customMenuItemEnabled:)] && ![picker respondsToSelector:@selector(showMenuForRect:appearanceName:allowReselectionOfSelectedOutputDevice:)])
+if (![picker respondsToSelector:@selector(showMenuForRect:appearanceName:allowReselectionOfSelectedOutputDevice:)]
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
+&& ![picker respondsToSelector:@selector(showMenuForRect:appearanceName:allowReselectionOfSelectedOutputDevice:customMenuItemTitle:customMenuItemEnabled:)]
+#endif
+)
 return;
 
 m_showingMenu = true;
 
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
 if ([picker respondsToSelector:@selector(showMenuForRect:appearanceName:allowReselectionOfSelectedOutputDevice:customMenuItemTitle:customMenuItemEnabled:)]) {
 NSString *customMenuItemTitleNSString = customMenuItemTitle.isEmpty() ? nil : (NSString *)customMenuItemTitle;
 switch ([picker showMenuForRect:location appearanceName:NSAppearanceNameVibrantLight allowReselectionOfSelectedOutputDevice:!checkActiveRoute customMenuItemTitle:customMenuItemTitleNSString customMenuItemEnabled:YES]) {
@@ -135,7 +140,9 @@
 case AVOutputDeviceMenuControllerSelectionNone:
 break;
 }
-} else if ([picker showMenuForRect:location appearanceName:NSAppearanceNameVibrantLight allowReselectionOfSelectedOutputDevice:!checkActiveRoute]) {
+} else
+#endif
+if ([picker showMenuForRect:location appearanceName:NSAppearanceNameVibrantLight allowReselectionOfSelectedOutputDevice:!checkActiveRoute]) {
 if (!checkActiveRoute)
 currentDeviceDidChange();
 }






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [197429] trunk/Source

2016-03-01 Thread adachan
Title: [197429] trunk/Source








Revision 197429
Author adac...@apple.com
Date 2016-03-01 17:15:09 -0800 (Tue, 01 Mar 2016)


Log Message
Adopt the new version of AVOutputDeviceMenuController's showMenuForRect method.
https://bugs.webkit.org/show_bug.cgi?id=154823

Reviewed by Tim Horton.

Source/WebCore:

* Modules/mediasession/WebMediaSessionManager.cpp:
(WebCore::WebMediaSessionManager::showPlaybackTargetPicker):
(WebCore::WebMediaSessionManager::customPlaybackActionSelected):
Call customPlaybackActionSelected() on the client that requested the picker.
* Modules/mediasession/WebMediaSessionManager.h:
* Modules/mediasession/WebMediaSessionManagerClient.h:
* dom/Document.cpp:
(WebCore::Document::showPlaybackTargetPicker):
(WebCore::Document::customPlaybackActionSelected):
* dom/Document.h:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::customPlaybackActionSelected):
(WebCore::HTMLMediaElement::playbackTargetPickerCustomActionName):
* html/HTMLMediaElement.h:
* html/MediaElementSession.cpp:
(WebCore::MediaElementSession::showPlaybackTargetPicker):
(WebCore::MediaElementSession::customPlaybackActionSelected):
* html/MediaElementSession.h:
* page/ChromeClient.h:
* page/Page.cpp:
(WebCore::Page::showPlaybackTargetPicker):
(WebCore::Page::customPlaybackActionSelected):
* page/Page.h:
* platform/audio/PlatformMediaSession.h:
(WebCore::PlatformMediaSessionClient::customPlaybackActionSelected):
* platform/graphics/MediaPlaybackTargetClient.h:
* platform/graphics/MediaPlaybackTargetPicker.cpp:
(WebCore::MediaPlaybackTargetPicker::pendingActionTimerFired):
(WebCore::MediaPlaybackTargetPicker::showPlaybackTargetPicker):
* platform/graphics/MediaPlaybackTargetPicker.h:
(WebCore::MediaPlaybackTargetPicker::Client::customPlaybackActionSelected):
(WebCore::MediaPlaybackTargetPicker::customPlaybackActionSelected):
* platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.h:
* platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
Update the forward declaration of AVOutputDeviceMenuController's showMenuForRect method.
(WebCore::MediaPlaybackTargetPickerMac::showPlaybackTargetPicker):
Call the new version of showMenuForRect if available.
* platform/mac/WebVideoFullscreenInterfaceMac.h:
* platform/mac/WebVideoFullscreenInterfaceMac.mm:
(WebCore::WebVideoFullscreenInterfaceMac::setExternalPlayback):
* platform/mock/MediaPlaybackTargetPickerMock.cpp:
(WebCore::MediaPlaybackTargetPickerMock::showPlaybackTargetPicker):
* platform/mock/MediaPlaybackTargetPickerMock.h:
* platform/spi/cocoa/AVKitSPI.h:
Updated with the new version of showMenuForRect.

Source/WebKit/mac:

* WebCoreSupport/WebChromeClient.h:
* WebCoreSupport/WebChromeClient.mm:
(WebChromeClient::showPlaybackTargetPicker):
* WebView/WebMediaPlaybackTargetPicker.h:
* WebView/WebMediaPlaybackTargetPicker.mm:
(WebMediaPlaybackTargetPicker::showPlaybackTargetPicker):
(WebMediaPlaybackTargetPicker::customPlaybackActionSelected):
* WebView/WebView.mm:
(-[WebView _showPlaybackTargetPicker:location:hasVideo:]):

Source/WebKit2:

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::showPlaybackTargetPicker):
(WebKit::WebPageProxy::customPlaybackActionSelected):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::showPlaybackTargetPicker):
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::customPlaybackActionSelected):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/Modules/mediasession/WebMediaSessionManager.cpp
trunk/Source/WebCore/Modules/mediasession/WebMediaSessionManager.h
trunk/Source/WebCore/Modules/mediasession/WebMediaSessionManagerClient.h
trunk/Source/WebCore/dom/Document.cpp
trunk/Source/WebCore/dom/Document.h
trunk/Source/WebCore/html/HTMLMediaElement.cpp
trunk/Source/WebCore/html/HTMLMediaElement.h
trunk/Source/WebCore/html/MediaElementSession.cpp
trunk/Source/WebCore/html/MediaElementSession.h
trunk/Source/WebCore/page/ChromeClient.h
trunk/Source/WebCore/page/Page.cpp
trunk/Source/WebCore/page/Page.h
trunk/Source/WebCore/platform/audio/PlatformMediaSession.h
trunk/Source/WebCore/platform/graphics/MediaPlaybackTargetClient.h
trunk/Source/WebCore/platform/graphics/MediaPlaybackTargetPicker.cpp
trunk/Source/WebCore/platform/graphics/MediaPlaybackTargetPicker.h
trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.h
trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm
trunk/Source/WebCore/platform/mac/WebVideoFullscreenInterfaceMac.h
trunk/Source/WebCore/platform/mac/WebVideoFullscreenInterfaceMac.mm
trunk/Source/WebCore/platform/mock/MediaPlaybackTargetPickerMock.cpp
trunk/Source/WebCore/platform/mock/MediaPlaybackTargetPickerMock.h
trunk/Source/WebCore/platform/spi/cocoa/AVKitSPI.h
trunk/Source/WebKit/mac/ChangeLog
trunk/Sour

[webkit-changes] [197153] trunk/Source

2016-02-25 Thread adachan
Title: [197153] trunk/Source








Revision 197153
Author adac...@apple.com
Date 2016-02-25 18:03:22 -0800 (Thu, 25 Feb 2016)


Log Message
Update the definition of ENABLE_VIDEO_PRESENTATION_MODE for Mac platform
https://bugs.webkit.org/show_bug.cgi?id=154702

Reviewed by Dan Bernstein.

* Configurations/FeatureDefines.xcconfig:# Please enter the commit message for your changes. Lines starting

Modified Paths

trunk/Source/_javascript_Core/ChangeLog
trunk/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/Configurations/FeatureDefines.xcconfig
trunk/Source/WebKit/mac/ChangeLog
trunk/Source/WebKit/mac/Configurations/FeatureDefines.xcconfig
trunk/Source/WebKit2/ChangeLog
trunk/Source/WebKit2/Configurations/FeatureDefines.xcconfig




Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (197152 => 197153)

--- trunk/Source/_javascript_Core/ChangeLog	2016-02-26 01:56:25 UTC (rev 197152)
+++ trunk/Source/_javascript_Core/ChangeLog	2016-02-26 02:03:22 UTC (rev 197153)
@@ -1,3 +1,12 @@
+2016-02-25  Ada Chan  
+
+Update the definition of ENABLE_VIDEO_PRESENTATION_MODE for Mac platform
+https://bugs.webkit.org/show_bug.cgi?id=154702
+
+Reviewed by Dan Bernstein.
+
+* Configurations/FeatureDefines.xcconfig:
+
 2016-02-25  Saam barati  
 
 [ES6] for...in iteration doesn't comply with the specification


Modified: trunk/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig (197152 => 197153)

--- trunk/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig	2016-02-26 01:56:25 UTC (rev 197152)
+++ trunk/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig	2016-02-26 02:03:22 UTC (rev 197153)
@@ -169,9 +169,8 @@
 ENABLE_USERSELECT_ALL = ENABLE_USERSELECT_ALL;
 ENABLE_VIDEO = ENABLE_VIDEO;
 ENABLE_VIDEO_PRESENTATION_MODE[sdk=iphone*] = ENABLE_VIDEO_PRESENTATION_MODE;
-ENABLE_VIDEO_PRESENTATION_MODE[sdk=macosx*] = $(ENABLE_VIDEO_PRESENTATION_MODE_macosx_$(TARGET_MAC_OS_X_VERSION_MAJOR)_$(CONFIGURATION))
-ENABLE_VIDEO_PRESENTATION_MODE_macosx_101200_Debug = ENABLE_VIDEO_PRESENTATION_MODE;
-ENABLE_VIDEO_PRESENTATION_MODE_macosx_101200_Release = $(ENABLE_VIDEO_PRESENTATION_MODE_macosx_101200_Debug);
+ENABLE_VIDEO_PRESENTATION_MODE[sdk=macosx*] = $(ENABLE_VIDEO_PRESENTATION_MODE_macosx_$(TARGET_MAC_OS_X_VERSION_MAJOR))
+ENABLE_VIDEO_PRESENTATION_MODE_macosx_101200 = ENABLE_VIDEO_PRESENTATION_MODE;
 ENABLE_VIDEO_TRACK = ENABLE_VIDEO_TRACK;
 ENABLE_DATACUE_VALUE = ENABLE_DATACUE_VALUE;
 ENABLE_VIEW_MODE_CSS_MEDIA = ;


Modified: trunk/Source/WebCore/ChangeLog (197152 => 197153)

--- trunk/Source/WebCore/ChangeLog	2016-02-26 01:56:25 UTC (rev 197152)
+++ trunk/Source/WebCore/ChangeLog	2016-02-26 02:03:22 UTC (rev 197153)
@@ -1,3 +1,12 @@
+2016-02-25  Ada Chan  
+
+Update the definition of ENABLE_VIDEO_PRESENTATION_MODE for Mac platform
+https://bugs.webkit.org/show_bug.cgi?id=154702
+
+Reviewed by Dan Bernstein.
+
+* Configurations/FeatureDefines.xcconfig:
+
 2016-02-25  David Kilzer  
 
 Change ASSERT to RELEASE_ASSERT in SOFT_LINK_CLASS() macro


Modified: trunk/Source/WebCore/Configurations/FeatureDefines.xcconfig (197152 => 197153)

--- trunk/Source/WebCore/Configurations/FeatureDefines.xcconfig	2016-02-26 01:56:25 UTC (rev 197152)
+++ trunk/Source/WebCore/Configurations/FeatureDefines.xcconfig	2016-02-26 02:03:22 UTC (rev 197153)
@@ -169,9 +169,8 @@
 ENABLE_USERSELECT_ALL = ENABLE_USERSELECT_ALL;
 ENABLE_VIDEO = ENABLE_VIDEO;
 ENABLE_VIDEO_PRESENTATION_MODE[sdk=iphone*] = ENABLE_VIDEO_PRESENTATION_MODE;
-ENABLE_VIDEO_PRESENTATION_MODE[sdk=macosx*] = $(ENABLE_VIDEO_PRESENTATION_MODE_macosx_$(TARGET_MAC_OS_X_VERSION_MAJOR)_$(CONFIGURATION))
-ENABLE_VIDEO_PRESENTATION_MODE_macosx_101200_Debug = ENABLE_VIDEO_PRESENTATION_MODE;
-ENABLE_VIDEO_PRESENTATION_MODE_macosx_101200_Release = $(ENABLE_VIDEO_PRESENTATION_MODE_macosx_101200_Debug);
+ENABLE_VIDEO_PRESENTATION_MODE[sdk=macosx*] = $(ENABLE_VIDEO_PRESENTATION_MODE_macosx_$(TARGET_MAC_OS_X_VERSION_MAJOR))
+ENABLE_VIDEO_PRESENTATION_MODE_macosx_101200 = ENABLE_VIDEO_PRESENTATION_MODE;
 ENABLE_VIDEO_TRACK = ENABLE_VIDEO_TRACK;
 ENABLE_DATACUE_VALUE = ENABLE_DATACUE_VALUE;
 ENABLE_VIEW_MODE_CSS_MEDIA = ;


Modified: trunk/Source/WebKit/mac/ChangeLog (197152 => 197153)

--- trunk/Source/WebKit/mac/ChangeLog	2016-02-26 01:56:25 UTC (rev 197152)
+++ trunk/Source/WebKit/mac/ChangeLog	2016-02-26 02:03:22 UTC (rev 197153)
@@ -1,3 +1,12 @@
+2016-02-25  Ada Chan  
+
+Update the definition of ENABLE_VIDEO_PRESENTATION_MODE for Mac platform
+https://bugs.webkit.org/show_bug.cgi?id=154702
+
+Reviewed by Dan Bernstein.
+
+* Configurations/FeatureDefines.xcconfig:
+
 2016-02-25  Jiewen Tan  
 
 Restrict information passed with navigation action which is triggered by untrusted event


Modified: trunk/Source/WebKit/mac/Configurations/FeatureDefines.xcconfig (197152 => 197153)

--- tru

[webkit-changes] [197133] trunk/Source/WebKit2

2016-02-25 Thread adachan
Title: [197133] trunk/Source/WebKit2








Revision 197133
Author adac...@apple.com
Date 2016-02-25 14:37:15 -0800 (Thu, 25 Feb 2016)


Log Message
Hook up fullscreenMayReturnToInline() in WKPageUIClient
https://bugs.webkit.org/show_bug.cgi?id=154661

Reviewed by Tim Horton.

* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageUIClient):
* UIProcess/API/C/WKPageUIClient.h:

Modified Paths

trunk/Source/WebKit2/ChangeLog
trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp
trunk/Source/WebKit2/UIProcess/API/C/WKPageUIClient.h




Diff

Modified: trunk/Source/WebKit2/ChangeLog (197132 => 197133)

--- trunk/Source/WebKit2/ChangeLog	2016-02-25 22:24:32 UTC (rev 197132)
+++ trunk/Source/WebKit2/ChangeLog	2016-02-25 22:37:15 UTC (rev 197133)
@@ -1,3 +1,14 @@
+2016-02-25  Ada Chan  
+
+Hook up fullscreenMayReturnToInline() in WKPageUIClient
+https://bugs.webkit.org/show_bug.cgi?id=154661
+
+Reviewed by Tim Horton.
+
+* UIProcess/API/C/WKPage.cpp:
+(WKPageSetPageUIClient):
+* UIProcess/API/C/WKPageUIClient.h:
+
 2016-02-25  Gavin Barraclough  
 
 Should template RefCounter instead of RefCounter::Token


Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp (197132 => 197133)

--- trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp	2016-02-25 22:24:32 UTC (rev 197132)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp	2016-02-25 22:37:15 UTC (rev 197133)
@@ -1735,6 +1735,14 @@
 m_client.showPage(toAPI(page), m_client.base.clientInfo);
 }
 
+virtual void fullscreenMayReturnToInline(WebPageProxy* page) override
+{
+if (!m_client.fullscreenMayReturnToInline)
+return;
+
+m_client.fullscreenMayReturnToInline(toAPI(page), m_client.base.clientInfo);
+}
+
 virtual void close(WebPageProxy* page) override
 {
 if (!m_client.close)


Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPageUIClient.h (197132 => 197133)

--- trunk/Source/WebKit2/UIProcess/API/C/WKPageUIClient.h	2016-02-25 22:24:32 UTC (rev 197132)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPageUIClient.h	2016-02-25 22:37:15 UTC (rev 197133)
@@ -102,6 +102,7 @@
 typedef void (*WKCheckUserMediaPermissionCallback)(WKPageRef page, WKFrameRef frame, WKSecurityOriginRef userMediaDocumentOrigin, WKSecurityOriginRef topLevelDocumentOrigin, WKUserMediaPermissionCheckRef devicesRequest, const void *clientInfo);
 typedef void (*WKPageDidClickAutoFillButtonCallback)(WKPageRef page, WKTypeRef userData, const void *clientInfo);
 typedef void (*WKPageMediaSessionMetadataDidChangeCallback)(WKPageRef page, WKMediaSessionMetadataRef metadata, const void* clientInfo);
+typedef void (*WKFullscreenMayReturnToInlineCallback)(WKPageRef page, const void* clientInfo);
 
 // Deprecated
 typedef WKPageRef (*WKPageCreateNewPageCallback_deprecatedForUseWithV0)(WKPageRef page, WKDictionaryRef features, WKEventModifiers modifiers, WKEventMouseButton mouseButton, const void *clientInfo);
@@ -632,6 +633,7 @@
 
 // Version 7.
 WKPageRunBeforeUnloadConfirmPanelCallback   runBeforeUnloadConfirmPanel;
+WKFullscreenMayReturnToInlineCallback   fullscreenMayReturnToInline;
 } WKPageUIClientV7;
 
 #ifdef __cplusplus






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [197005] trunk/Source/WebCore

2016-02-23 Thread adachan
Title: [197005] trunk/Source/WebCore








Revision 197005
Author adac...@apple.com
Date 2016-02-23 16:30:48 -0800 (Tue, 23 Feb 2016)


Log Message
Refactor script that updates fullscreen buttons.
https://bugs.webkit.org/show_bug.cgi?id=154562

Reviewed by Dean Jackson.

Also expose extra property and element in getCurrentControlsStatus() for future testing.

* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.updatePictureInPictureButton):
(Controller.prototype.updateFullscreenButtons):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js




Diff

Modified: trunk/Source/WebCore/ChangeLog (197004 => 197005)

--- trunk/Source/WebCore/ChangeLog	2016-02-24 00:20:01 UTC (rev 197004)
+++ trunk/Source/WebCore/ChangeLog	2016-02-24 00:30:48 UTC (rev 197005)
@@ -1,3 +1,16 @@
+2016-02-22  Ada Chan  
+
+Refactor script that updates fullscreen buttons.
+https://bugs.webkit.org/show_bug.cgi?id=154562
+
+Reviewed by Dean Jackson.
+
+Also expose extra property and element in getCurrentControlsStatus() for future testing.
+
+* Modules/mediacontrols/mediaControlsApple.js:
+(Controller.prototype.updatePictureInPictureButton):
+(Controller.prototype.updateFullscreenButtons):
+
 2016-02-22  Ryosuke Niwa  
 
 Calling importNode on shadow root causes a crash


Modified: trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js (197004 => 197005)

--- trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js	2016-02-24 00:20:01 UTC (rev 197004)
+++ trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js	2016-02-24 00:30:48 UTC (rev 197005)
@@ -818,9 +818,14 @@
 
 updatePictureInPictureButton: function()
 {
-var shouldShowPictureInPictureButton = Controller.gSimulatePictureInPictureAvailable || ('webkitSupportsPresentationMode' in this.video && this.video.webkitSupportsPresentationMode('picture-in-picture'));
+var shouldShowPictureInPictureButton = (Controller.gSimulatePictureInPictureAvailable || ('webkitSupportsPresentationMode' in this.video && this.video.webkitSupportsPresentationMode('picture-in-picture'))) && this.hasVideo();
 if (shouldShowPictureInPictureButton) {
-this.controls.panel.appendChild(this.controls.pictureInPictureButton);
+if (!this.controls.pictureInPictureButton.parentElement) {
+if (this.controls.fullscreenButton.parentElement == this.controls.panel)
+this.controls.panel.insertBefore(this.controls.pictureInPictureButton, this.controls.fullscreenButton);
+else
+this.controls.panel.appendChild(this.controls.pictureInPictureButton);
+}
 this.controls.pictureInPictureButton.classList.remove(this.ClassNames.hidden);
 } else
 this.controls.pictureInPictureButton.classList.add(this.ClassNames.hidden);
@@ -1138,7 +1143,7 @@
 {
 var shouldBeHidden = !this.video.webkitSupportsFullscreen || !this.hasVideo();
 this.controls.fullscreenButton.classList.toggle(this.ClassNames.hidden, shouldBeHidden && !this.isFullScreen());
-this.controls.pictureInPictureButton.classList.toggle(this.ClassNames.hidden, shouldBeHidden);
+this.updatePictureInPictureButton();
 this.setNeedsUpdateForDisplayedWidth();
 this.updateLayoutForDisplayedWidth();
 },
@@ -2248,12 +2253,17 @@
 },
 {
 name: "Picture-in-picture Button",
-object: this.controls.pictureInPictureButton
+object: this.controls.pictureInPictureButton,
+extraProperties: ["parentElement"],
 },
 {
 name: "Track Menu",
 object: this.captionMenu
 },
+{
+name: "Inline playback placeholder",
+object: this.controls.inlinePlaybackPlaceholder,
+},
 ];
 
 elements.forEach(function (element) {






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [196964] trunk/Source

2016-02-22 Thread adachan
Title: [196964] trunk/Source








Revision 196964
Author adac...@apple.com
Date 2016-02-22 16:40:16 -0800 (Mon, 22 Feb 2016)


Log Message
Implement basic functionality in WebVideoFullscreenInterfaceMac.
https://bugs.webkit.org/show_bug.cgi?id=153241

Reviewed by Beth Dakin.

Source/WebCore:

* platform/cocoa/WebVideoFullscreenInterface.h:
* platform/mac/WebVideoFullscreenInterfaceMac.h:
* platform/mac/WebVideoFullscreenInterfaceMac.mm:
(WebCore::WebVideoFullscreenInterfaceMac::setupFullscreen):
(WebCore::WebVideoFullscreenInterfaceMac::enterFullscreen):
(WebCore::WebVideoFullscreenInterfaceMac::exitFullscreen):
(WebCore::WebVideoFullscreenInterfaceMac::cleanupFullscreen):
(WebCore::WebVideoFullscreenInterfaceMac::invalidate):
(WebCore::WebVideoFullscreenInterfaceMac::preparedToReturnToInline):

Source/WebKit2:

* UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID):
(WebKit::WebVideoFullscreenManagerProxy::exitFullscreen):
(WebKit::WebVideoFullscreenManagerProxy::preparedToReturnToInline):
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.h:
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::rootViewToWindow):
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::rootViewToWindow):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::supportsVideoFullscreen):
* WebProcess/cocoa/WebVideoFullscreenManager.h:
* WebProcess/cocoa/WebVideoFullscreenManager.mm:
(WebKit::WebVideoFullscreenManager::supportsVideoFullscreen):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/cocoa/WebVideoFullscreenInterface.h
trunk/Source/WebCore/platform/mac/WebVideoFullscreenInterfaceMac.h
trunk/Source/WebCore/platform/mac/WebVideoFullscreenInterfaceMac.mm
trunk/Source/WebKit2/ChangeLog
trunk/Source/WebKit2/UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm
trunk/Source/WebKit2/UIProcess/PageClient.h
trunk/Source/WebKit2/UIProcess/WebPageProxy.h
trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.h
trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm
trunk/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
trunk/Source/WebKit2/WebProcess/cocoa/WebVideoFullscreenManager.h
trunk/Source/WebKit2/WebProcess/cocoa/WebVideoFullscreenManager.mm




Diff

Modified: trunk/Source/WebCore/ChangeLog (196963 => 196964)

--- trunk/Source/WebCore/ChangeLog	2016-02-23 00:03:54 UTC (rev 196963)
+++ trunk/Source/WebCore/ChangeLog	2016-02-23 00:40:16 UTC (rev 196964)
@@ -1,3 +1,20 @@
+2016-02-16  Ada Chan  
+
+Implement basic functionality in WebVideoFullscreenInterfaceMac.
+https://bugs.webkit.org/show_bug.cgi?id=153241
+
+Reviewed by Beth Dakin.
+
+* platform/cocoa/WebVideoFullscreenInterface.h:
+* platform/mac/WebVideoFullscreenInterfaceMac.h:
+* platform/mac/WebVideoFullscreenInterfaceMac.mm:
+(WebCore::WebVideoFullscreenInterfaceMac::setupFullscreen):
+(WebCore::WebVideoFullscreenInterfaceMac::enterFullscreen):
+(WebCore::WebVideoFullscreenInterfaceMac::exitFullscreen):
+(WebCore::WebVideoFullscreenInterfaceMac::cleanupFullscreen):
+(WebCore::WebVideoFullscreenInterfaceMac::invalidate):
+(WebCore::WebVideoFullscreenInterfaceMac::preparedToReturnToInline):
+
 2016-02-22  Chris Dumez  
 
 REGRESSION (r196563): Images not loading on https://klim.co.nz/blog/paypal-sans-design-information/


Modified: trunk/Source/WebCore/platform/cocoa/WebVideoFullscreenInterface.h (196963 => 196964)

--- trunk/Source/WebCore/platform/cocoa/WebVideoFullscreenInterface.h	2016-02-23 00:03:54 UTC (rev 196963)
+++ trunk/Source/WebCore/platform/cocoa/WebVideoFullscreenInterface.h	2016-02-23 00:40:16 UTC (rev 196964)
@@ -36,7 +36,7 @@
 
 namespace WebCore {
 
-bool supportsPictureInPicture();
+WEBCORE_EXPORT bool supportsPictureInPicture();
 
 class TimeRanges;
 


Modified: trunk/Source/WebCore/platform/mac/WebVideoFullscreenInterfaceMac.h (196963 => 196964)

--- trunk/Source/WebCore/platform/mac/WebVideoFullscreenInterfaceMac.h	2016-02-23 00:03:54 UTC (rev 196963)
+++ trunk/Source/WebCore/platform/mac/WebVideoFullscreenInterfaceMac.h	2016-02-23 00:40:16 UTC (rev 196964)
@@ -34,6 +34,12 @@
 #include 
 #include 
 
+OBJC_CLASS NSWindow;
+
+#if USE(APPLE_INTERNAL_SDK)
+OBJC_CLASS WebVideoFullscreenInterfaceMacObjC;
+#endif
+
 namespace WebCore {
 class IntRect;
 class WebVideoFullscreenChangeObserver;
@@ -49,7 +55,9 @@
 return adoptRef(*new WebVideoFullscreenInterfaceMac());
 }
 virtual ~WebVideoFullscreenInterfaceMac();
+WebVideoFullscreenModel* webVideoFullscreenModel() const { return m_videoFullscreenModel; }
 WEBCORE_EXPORT void setWebVideoFullscreenModel(WebVideoFullscreenModel*);
+WebVideoFullscreenChangeObserver* webVideoFullscreenChangeObserver() const { return m_fullscreenChangeObserver; }
 WEBCORE_EXPORT void

[webkit-changes] [195901] trunk/Source

2016-01-30 Thread adachan
Title: [195901] trunk/Source








Revision 195901
Author adac...@apple.com
Date 2016-01-30 11:30:49 -0800 (Sat, 30 Jan 2016)


Log Message
Enable VIDEO_PRESENTATION_MODE only in Debug and Release builds on Mac
https://bugs.webkit.org/show_bug.cgi?id=153665

Reviewed by Dan Bernstein.

Source/_javascript_Core:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig:

Source/WTF:

* wtf/Platform.h:
Remove this as the flag is already defined in FeatureDefines.xcconfig files.

Modified Paths

trunk/Source/_javascript_Core/ChangeLog
trunk/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig
trunk/Source/WTF/ChangeLog
trunk/Source/WTF/wtf/Platform.h
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/Configurations/FeatureDefines.xcconfig
trunk/Source/WebKit/mac/ChangeLog
trunk/Source/WebKit/mac/Configurations/FeatureDefines.xcconfig
trunk/Source/WebKit2/ChangeLog
trunk/Source/WebKit2/Configurations/FeatureDefines.xcconfig




Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (195900 => 195901)

--- trunk/Source/_javascript_Core/ChangeLog	2016-01-30 19:22:58 UTC (rev 195900)
+++ trunk/Source/_javascript_Core/ChangeLog	2016-01-30 19:30:49 UTC (rev 195901)
@@ -1,3 +1,12 @@
+2016-01-29  Ada Chan  
+
+Enable VIDEO_PRESENTATION_MODE only in Debug and Release builds on Mac
+https://bugs.webkit.org/show_bug.cgi?id=153665
+
+Reviewed by Dan Bernstein.
+
+* Configurations/FeatureDefines.xcconfig:
+
 2016-01-30  Yusuke Suzuki  
 
 [B3] REGRESSION(r195882): Should break early after modConstant replaceWithNewValue succeeds


Modified: trunk/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig (195900 => 195901)

--- trunk/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig	2016-01-30 19:22:58 UTC (rev 195900)
+++ trunk/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig	2016-01-30 19:30:49 UTC (rev 195901)
@@ -169,10 +169,9 @@
 ENABLE_USERSELECT_ALL = ENABLE_USERSELECT_ALL;
 ENABLE_VIDEO = ENABLE_VIDEO;
 ENABLE_VIDEO_PRESENTATION_MODE[sdk=iphone*] = ENABLE_VIDEO_PRESENTATION_MODE;
-ENABLE_VIDEO_PRESENTATION_MODE[sdk=macosx*] = $(ENABLE_VIDEO_PRESENTATION_MODE_macosx_$(TARGET_MAC_OS_X_VERSION_MAJOR))
-ENABLE_VIDEO_PRESENTATION_MODE_macosx_101000 = ;
-ENABLE_VIDEO_PRESENTATION_MODE_macosx_101100 = ;
-ENABLE_VIDEO_PRESENTATION_MODE_macosx_101200 = ENABLE_VIDEO_PRESENTATION_MODE;
+ENABLE_VIDEO_PRESENTATION_MODE[sdk=macosx*] = $(ENABLE_VIDEO_PRESENTATION_MODE_macosx_$(TARGET_MAC_OS_X_VERSION_MAJOR)_$(CONFIGURATION))
+ENABLE_VIDEO_PRESENTATION_MODE_macosx_101200_Debug = ENABLE_VIDEO_PRESENTATION_MODE;
+ENABLE_VIDEO_PRESENTATION_MODE_macosx_101200_Release = $(ENABLE_VIDEO_PRESENTATION_MODE_macosx_101200_Debug);
 ENABLE_VIDEO_TRACK = ENABLE_VIDEO_TRACK;
 ENABLE_DATACUE_VALUE = ENABLE_DATACUE_VALUE;
 ENABLE_VIEW_MODE_CSS_MEDIA = ;


Modified: trunk/Source/WTF/ChangeLog (195900 => 195901)

--- trunk/Source/WTF/ChangeLog	2016-01-30 19:22:58 UTC (rev 195900)
+++ trunk/Source/WTF/ChangeLog	2016-01-30 19:30:49 UTC (rev 195901)
@@ -1,3 +1,13 @@
+2016-01-29  Ada Chan  
+
+Enable VIDEO_PRESENTATION_MODE only in Debug and Release builds on Mac
+https://bugs.webkit.org/show_bug.cgi?id=153665
+
+Reviewed by Dan Bernstein.
+
+* wtf/Platform.h:
+Remove this as the flag is already defined in FeatureDefines.xcconfig files.
+
 2016-01-30  Yusuke Suzuki  
 
 Enable SamplingProfiler on POSIX environment


Modified: trunk/Source/WTF/wtf/Platform.h (195900 => 195901)

--- trunk/Source/WTF/wtf/Platform.h	2016-01-30 19:22:58 UTC (rev 195900)
+++ trunk/Source/WTF/wtf/Platform.h	2016-01-30 19:30:49 UTC (rev 195901)
@@ -1144,10 +1144,6 @@
 #define USE_MEDIATOOLBOX 1
 #endif
 
-#if PLATFORM(IOS) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200)
-#define ENABLE_VIDEO_PRESENTATION_MODE 1
-#endif
-
 /* While 10.10 has support for fences, it is missing some API important for our integration of them. */
 #if PLATFORM(IOS) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101100)
 #define HAVE_COREANIMATION_FENCES 1


Modified: trunk/Source/WebCore/ChangeLog (195900 => 195901)

--- trunk/Source/WebCore/ChangeLog	2016-01-30 19:22:58 UTC (rev 195900)
+++ trunk/Source/WebCore/ChangeLog	2016-01-30 19:30:49 UTC (rev 195901)
@@ -1,3 +1,12 @@
+2016-01-29  Ada Chan  
+
+Enable VIDEO_PRESENTATION_MODE only in Debug and Release builds on Mac
+https://bugs.webkit.org/show_bug.cgi?id=153665
+
+Reviewed by Dan Bernstein.
+
+* Configurations/FeatureDefines.xcconfig:
+
 2016-01-30  David Kilzer  
 
 [iOS] WebKit1 apps crash in ___ZN7WebCore16DiskCacheMonitorC2ERKNS_15ResourceRequestENS_9SessionIDEPK20_CFCachedURLResponse_block_invoke1


Modified: trunk/Source/WebCore/Configurations/FeatureDefines.xcconfig (195900 => 1

[webkit-changes] [195755] trunk/Source

2016-01-28 Thread adachan
Title: [195755] trunk/Source








Revision 195755
Author adac...@apple.com
Date 2016-01-28 10:28:16 -0800 (Thu, 28 Jan 2016)


Log Message
Get WebVideoFullscreenManager and related classes to also compile for Mac platform
with video presentation mode support.
https://bugs.webkit.org/show_bug.cgi?id=153221

Reviewed by Eric Carlson.

Source/WebCore:

No new tests, no actual behavior change with a stub implementation of WebVideoFullscreenInterfaceMac.

* WebCore.xcodeproj/project.pbxproj:
Add PlatformView.h, WebVideoFullscreenChangeObserver.h, and WebVideoFullscreenInterfaceMac.h.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement):
(WebCore::HTMLMediaElement::mediaPlayerEngineUpdated):
(WebCore::HTMLMediaElement::shouldOverrideBackgroundPlaybackRestriction):
* html/HTMLMediaElement.h:
Enable the code that deals with the video fullscreen layer also for Mac platform with
video presentation mode support.

* platform/cocoa/PlatformView.h:
Header file for declaring the view types for each Cocoa platform.

* platform/cocoa/WebVideoFullscreenChangeObserver.h:
(WebCore::WebVideoFullscreenChangeObserver::~WebVideoFullscreenChangeObserver):
Interface declaration moved from WebVideoFullscreenInterfaceAVKit.h.

* platform/cocoa/WebVideoFullscreenInterface.h:
Stop guarding the declaration of WebVideoFullscreenInterface to be iOS specific. It is now
enabled for iOS and Mac platform with video presentation mode support.

* platform/cocoa/WebVideoFullscreenModel.h:
* platform/cocoa/WebVideoFullscreenModelVideoElement.h:
* platform/cocoa/WebVideoFullscreenModelVideoElement.mm:
Enable also for Mac platform with video presentation mode support.
(WebVideoFullscreenModelVideoElement::setVideoFullscreenLayer):
Set the video fullscreen layer's anchor point to (0, 0) since we are not changing the position of
the video layer on Mac.

* platform/ios/WebVideoFullscreenControllerAVKit.mm:
Import WebVideoFullscreenChangeObserver.h now that the interface declaration has been moved to that file.
* platform/ios/WebVideoFullscreenInterfaceAVKit.h:
Move the declaration of WebVideoFullscreenChangeObserver to a separate header.
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
Import WebVideoFullscreenChangeObserver.h now that the interface declaration has been moved to that file.

* platform/mac/WebVideoFullscreenInterfaceMac.h: Added.
* platform/mac/WebVideoFullscreenInterfaceMac.mm:
(WebCore::WebVideoFullscreenInterfaceMac::~WebVideoFullscreenInterfaceMac):
(WebCore::WebVideoFullscreenInterfaceMac::setWebVideoFullscreenModel):
(WebCore::WebVideoFullscreenInterfaceMac::setWebVideoFullscreenChangeObserver):
(WebCore::WebVideoFullscreenInterfaceMac::resetMediaState):
(WebCore::WebVideoFullscreenInterfaceMac::setDuration):
(WebCore::WebVideoFullscreenInterfaceMac::setCurrentTime):
(WebCore::WebVideoFullscreenInterfaceMac::setBufferedTime):
(WebCore::WebVideoFullscreenInterfaceMac::setRate):
(WebCore::WebVideoFullscreenInterfaceMac::setVideoDimensions):
(WebCore::WebVideoFullscreenInterfaceMac::setSeekableRanges):
(WebCore::WebVideoFullscreenInterfaceMac::setCanPlayFastReverse):
(WebCore::WebVideoFullscreenInterfaceMac::setAudioMediaSelectionOptions):
(WebCore::WebVideoFullscreenInterfaceMac::setLegibleMediaSelectionOptions):
(WebCore::WebVideoFullscreenInterfaceMac::setExternalPlayback):
(WebCore::WebVideoFullscreenInterfaceMac::setWirelessVideoPlaybackDisabled):
(WebCore::WebVideoFullscreenInterfaceMac::setupFullscreen):
(WebCore::WebVideoFullscreenInterfaceMac::enterFullscreen):
(WebCore::WebVideoFullscreenInterfaceMac::exitFullscreen):
(WebCore::WebVideoFullscreenInterfaceMac::cleanupFullscreen):
(WebCore::WebVideoFullscreenInterfaceMac::invalidate):
(WebCore::WebVideoFullscreenInterfaceMac::requestHideAndExitFullscreen):
(WebCore::WebVideoFullscreenInterfaceMac::preparedToReturnToInline):
(WebCore::WebVideoFullscreenInterfaceMac::setMode):
(WebCore::WebVideoFullscreenInterfaceMac::clearMode):
(WebCore::WebVideoFullscreenInterfaceMac::mayAutomaticallyShowVideoPictureInPicture):
(WebCore::WebVideoFullscreenInterfaceMac::applicationDidBecomeActive):
(WebCore::supportsPictureInPicture):
Add a stub implementation of WebVideoFullscreenInterfaceMac.

Source/WebKit2:

* UIProcess/Cocoa/WebVideoFullscreenManagerProxy.h:
* UIProcess/Cocoa/WebVideoFullscreenManagerProxy.messages.in:
* UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
Enabled also for Mac with video presentation mode support.
(-[WKLayerHostView makeBackingLayer]):
Make sure this view uses CALayerHost for its layer.
(WebKit::WebVideoFullscreenManagerProxy::invalidate):
(WebKit::WebVideoFullscreenManagerProxy::createModelAndInterface):
(WebKit::WebVideoFullscreenManagerProxy::ensureInterface):
(WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID):
Replace WebCore::WebVideoFullscreenInterfaceAVKit with PlatformWebVideoFullscreenInterface.
(WebKit::WebVideoFullscreenManagerProxy::setVideoLayerFrame):
+[UIWindow _synchronizeDrawingAcrossProcesses] is

[webkit-changes] [195693] trunk/Source/WebCore

2016-01-27 Thread adachan
Title: [195693] trunk/Source/WebCore








Revision 195693
Author adac...@apple.com
Date 2016-01-27 14:31:17 -0800 (Wed, 27 Jan 2016)


Log Message
Move some logic related to the presentation mode button from mediaControlsiOS.js to mediaControlsApple.js
https://bugs.webkit.org/show_bug.cgi?id=153476

Reviewed by Eric Carlson.

Also, add the necessary styles to support that control in mediaControlsApple.css.

* Modules/mediacontrols/mediaControlsApple.css:
(video::-webkit-media-controls-panel.picture-in-picture):
(audio::-webkit-media-controls-wireless-playback-status.picture-in-picture):
(audio::-webkit-media-controls-wireless-playback-text-top.picture-in-picture):
(audio::-webkit-media-controls-wireless-playback-text-bottom.picture-in-picture):
(video::-webkit-media-controls-panel .picture-in-picture-button):
Use the same mask image as iOS, but with a different size and a background color specified
(since there's another rule that makes buttons within the panel have a transparent
background color).
(video::-webkit-media-controls-panel .picture-in-picture-button.return-from-picture-in-picture):

* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.addVideoListeners):
(Controller.prototype.removeVideoListeners):
Listen for (and stop listening for) the webkitpresentationmodechanged event if presentation
mode is supported for this video element.
(Controller.prototype.createControls):
Add a class name to the pictureInPictureButton so we can query for it in the stylesheet.
(Controller.prototype.configureInlineControls):
Call updatePictureInPictureButton().
(Controller.prototype.presentationMode):
Moved from mediaControlsiOS.js.
(Controller.prototype.isFullScreen):
Ditto, with a bug fix to not call presentationMode(), since that method calls isFullScreen(),
resulting in infinite recursion.
(Controller.prototype.updatePictureInPictureButton):
Ditto.
(Controller.prototype.handlePresentationModeChange):
Ditto.
(Controller.prototype.handleFullscreenChange):
Call handlePresentationModeChanged() if presentation mode is supported for this video element.
(Controller.prototype.controlsAlwaysVisible):
Ditto.
(Controller.prototype.handlePictureInPictureButtonClicked):
Ditto.
* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS.prototype.handlePresentationModeChange):
Most logic has been moved to the same method in mediaControlsApple.js, except
updating the style of the panelContainer, which doesn't exist in the Mac controls.
(ControllerIOS.prototype.addVideoListeners): Deleted.
(ControllerIOS.prototype.removeVideoListeners): Deleted.
(ControllerIOS.prototype.presentationMode): Deleted.
(ControllerIOS.prototype.isFullScreen): Deleted.
(ControllerIOS.prototype.handlePictureInPictureButtonClicked): Deleted.
(ControllerIOS.prototype.updatePictureInPictureButton): Deleted.
(ControllerIOS.prototype.handleFullscreenChange): Deleted.
(ControllerIOS.prototype.controlsAlwaysVisible): Deleted.
Delete all code that's already handled in the Controller.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.css
trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js
trunk/Source/WebCore/Modules/mediacontrols/mediaControlsiOS.js




Diff

Modified: trunk/Source/WebCore/ChangeLog (195692 => 195693)

--- trunk/Source/WebCore/ChangeLog	2016-01-27 22:23:36 UTC (rev 195692)
+++ trunk/Source/WebCore/ChangeLog	2016-01-27 22:31:17 UTC (rev 195693)
@@ -1,3 +1,61 @@
+2016-01-27  Ada Chan  
+
+Move some logic related to the presentation mode button from mediaControlsiOS.js to mediaControlsApple.js
+https://bugs.webkit.org/show_bug.cgi?id=153476
+
+Reviewed by Eric Carlson.
+
+Also, add the necessary styles to support that control in mediaControlsApple.css.
+
+* Modules/mediacontrols/mediaControlsApple.css:
+(video::-webkit-media-controls-panel.picture-in-picture):
+(audio::-webkit-media-controls-wireless-playback-status.picture-in-picture):
+(audio::-webkit-media-controls-wireless-playback-text-top.picture-in-picture):
+(audio::-webkit-media-controls-wireless-playback-text-bottom.picture-in-picture):
+(video::-webkit-media-controls-panel .picture-in-picture-button):
+Use the same mask image as iOS, but with a different size and a background color specified
+(since there's another rule that makes buttons within the panel have a transparent
+background color).
+(video::-webkit-media-controls-panel .picture-in-picture-button.return-from-picture-in-picture):
+
+* Modules/mediacontrols/mediaControlsApple.js:
+(Controller.prototype.addVideoListeners):
+(Controller.prototype.removeVideoListeners):
+Listen for (and stop listening for) the webkitpresentationmodechanged event if presentation
+mode is supported for this video element.
+(Controller.prototype.createControls):
+Add a class name to the pictureI

[webkit-changes] [195692] trunk/Source/WebCore

2016-01-27 Thread adachan
Title: [195692] trunk/Source/WebCore








Revision 195692
Author adac...@apple.com
Date 2016-01-27 14:23:36 -0800 (Wed, 27 Jan 2016)


Log Message
Enable API related to the video fullscreen layer in MediaPlayerPrivateMediaSourceAVFObjC
also on Mac platform with video presentation mode support.
https://bugs.webkit.org/show_bug.cgi?id=153223

Reviewed by Jer Noble.

Reuse VideoFullscreenLayerManager to manage moving the video layer between the fullscreen
layer and the inline layer depending on the current presentation mode.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
Create m_videoFullscreenLayerManager.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::platformLayer):
Return the video inline layer from the VideoFullscreenLayerManager.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addDisplayLayer):
Call VideoFullscreenLayerManager::setVideoLayer() with the m_sampleBufferDisplayLayer.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::removeDisplayLayer):
Call VideoFullscreenLayerManager::didDestroyVideoLayer().
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setVideoFullscreenLayer):
Call VideoFullscreenLayerManager::setVideoFullscreenLayer().
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setVideoFullscreenFrame):
Call VideoFullscreenLayerManager::setVideoFullscreenFrame().

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h
trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm




Diff

Modified: trunk/Source/WebCore/ChangeLog (195691 => 195692)

--- trunk/Source/WebCore/ChangeLog	2016-01-27 22:08:20 UTC (rev 195691)
+++ trunk/Source/WebCore/ChangeLog	2016-01-27 22:23:36 UTC (rev 195692)
@@ -1,3 +1,29 @@
+2016-01-26  Ada Chan  
+
+Enable API related to the video fullscreen layer in MediaPlayerPrivateMediaSourceAVFObjC
+also on Mac platform with video presentation mode support.
+https://bugs.webkit.org/show_bug.cgi?id=153223
+
+Reviewed by Jer Noble.
+
+Reuse VideoFullscreenLayerManager to manage moving the video layer between the fullscreen
+layer and the inline layer depending on the current presentation mode.
+
+* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
+* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
+(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
+Create m_videoFullscreenLayerManager.
+(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::platformLayer):
+Return the video inline layer from the VideoFullscreenLayerManager.
+(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addDisplayLayer):
+Call VideoFullscreenLayerManager::setVideoLayer() with the m_sampleBufferDisplayLayer.
+(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::removeDisplayLayer):
+Call VideoFullscreenLayerManager::didDestroyVideoLayer().
+(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setVideoFullscreenLayer):
+Call VideoFullscreenLayerManager::setVideoFullscreenLayer().
+(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setVideoFullscreenFrame):
+Call VideoFullscreenLayerManager::setVideoFullscreenFrame().
+
 2016-01-27  Brady Eidson  
 
 Modern IDB: SQLite backend doesn't update index records as object records are added.


Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h (195691 => 195692)

--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h	2016-01-27 22:08:20 UTC (rev 195691)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h	2016-01-27 22:23:36 UTC (rev 195692)
@@ -48,6 +48,10 @@
 class PlatformClockCM;
 class MediaSourcePrivateAVFObjC;
 
+#if PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE)
+class VideoFullscreenLayerManager;
+#endif
+
 class MediaPlayerPrivateMediaSourceAVFObjC : public MediaPlayerPrivateInterface {
 public:
 explicit MediaPlayerPrivateMediaSourceAVFObjC(MediaPlayer*);
@@ -82,6 +86,11 @@
 void sizeChanged();
 void characteristicsChanged();
 
+#if PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE)
+virtual void setVideoFullscreenLayer(PlatformLayer*) override;
+virtual void setVideoFullscreenFrame(FloatRect) override;
+#endif
+
 #if ENABLE(ENCRYPTED_MEDIA_V2)
 bool hasStreamSession() { return m_streamSession; }
 AVStreamSession *streamSession();
@@ -223,6 +232,9 @@
 RefPtr m_playbackTarget;
 bool m_shouldPlayToTarget { false };
 #endif
+#if PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE)
+std::unique_ptr m_videoFullscreenLayerManager;

[webkit-changes] [195595] trunk/Source/WebCore

2016-01-26 Thread adachan
Title: [195595] trunk/Source/WebCore








Revision 195595
Author adac...@apple.com
Date 2016-01-26 10:35:36 -0800 (Tue, 26 Jan 2016)


Log Message
Enable API related to the video fullscreen layer in MediaPlayerPrivateAVFoundationObjC
also on Mac with video presentation mode support.
https://bugs.webkit.org/show_bug.cgi?id=153222

Reviewed by Eric Carlson.

No new tests. Covered by existing tests.

Introduce VideoFullscreenLayerManager to deal with the video layer when switching
between inline and fullscreen mode. We'll reuse it in other MediaPlayerPrivateInterface
implementations.

Now that MediaPlayerPrivateAVFoundationObjC's platform layer can be a WebVideoContainerLayer,
this exposes a bug in PlatformCALayerCocoa::clone() where we assumed the platform layer
is always an AVPlayerLayer if the PlatformCALayer's layer type is LayerTypeAVPlayerLayer.
Add a helper method to get an AVPlayerLayer from a PlatformCALayerCocoa (which also handles
WebVideoContainerLayer case) and use it in PlatformCALayerCocoa::clone().

* WebCore.xcodeproj/project.pbxproj:
Add VideoFullscreenLayerManager to the project.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
Create m_videoFullscreenLayerManager. The video inline layer, video fullscreen layer,
and the video fullscreen frame are now managed by that class.
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer):
Just call VideoFullscreenLayerManager::setVideoLayer() to handle adding the video
layer in either the inline or fullscreen layer.
(WebCore::MediaPlayerPrivateAVFoundationObjC::destroyVideoLayer):
Call VideoFullscreenLayerManager::didDestroyVideoLayer().
(WebCore::MediaPlayerPrivateAVFoundationObjC::platformLayer):
Get the video inline layer from VideoFullscreenLayerManager.
(WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenLayer):
Call VideoFullscreenLayerManager::setVideoFullscreenLayer().
(WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenFrame):
Call VideoFullscreenLayerManager::setVideoFullscreenFrame().
(WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenMode):
Guard the iOS specific code properly.
(WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoLayerGravity):
Get the video fullscreen layer from VideoFullscreenLayerManager.
(WebCore::MediaPlayerPrivateAVFoundationObjC::requiresTextTrackRepresentation):
Ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::syncTextTrackBounds):
Get the video fullscreen layer and video fullscreen frame from VideoFullscreenLayerManager.
(WebCore::MediaPlayerPrivateAVFoundationObjC::setTextTrackRepresentation):
Get the video fullscreen layer from VideoFullscreenLayerManager.

* platform/graphics/avfoundation/objc/VideoFullscreenLayerManager.h: Added.
(WebCore::VideoFullscreenLayerManager::videoInlineLayer):
(WebCore::VideoFullscreenLayerManager::videoFullscreenLayer):
(WebCore::VideoFullscreenLayerManager::videoFullscreenFrame):
* platform/graphics/avfoundation/objc/VideoFullscreenLayerManager.mm: Added.
(-[WebVideoContainerLayer setBounds:]):
(-[WebVideoContainerLayer setPosition:]):
WebVideoContainerLayer was moved from MediaPlayerPrivateAVFoundationObjC.mm.
(WebCore::VideoFullscreenLayerManager::create):
(WebCore::VideoFullscreenLayerManager::VideoFullscreenLayerManager):
(WebCore::VideoFullscreenLayerManager::setVideoLayer):
Code moved from MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer().
(WebCore::VideoFullscreenLayerManager::setVideoFullscreenLayer):
Code moved from MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenLayer().
(WebCore::VideoFullscreenLayerManager::setVideoFullscreenFrame):
Code moved from MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenFrame().
(WebCore::VideoFullscreenLayerManager::didDestroyVideoLayer):
Code moved from MediaPlayerPrivateAVFoundationObjC::destroyVideoLayer().

* platform/graphics/ca/cocoa/PlatformCALayerCocoa.h:
* platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
(PlatformCALayerCocoa::clone):
Use the new PlatformCALayerCocoa::avPlayerLayer() method to get the AVPlayerLayer from both the
destination and source PlatformCALayers.
(PlatformCALayerCocoa::avPlayerLayer):
Return nil if the layer type is not LayerTypeAVPlayerLayer. Otherwise, return the
platform layer if it is indeed an AVPlayerLayer. If not, it should be a WebVideoContainerLayer
and we should return its sublayer which should be an AVPlayerLayer.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h
trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm
trunk/Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.h
trunk/Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCoc

[webkit-changes] [195487] trunk/Source

2016-01-22 Thread adachan
Title: [195487] trunk/Source








Revision 195487
Author adac...@apple.com
Date 2016-01-22 15:26:42 -0800 (Fri, 22 Jan 2016)


Log Message
Add a mode parameter to MediaControllerInterface::supportsFullscreen() and ChromeClient::supportsVideoFullscreen().
https://bugs.webkit.org/show_bug.cgi?id=153220

Reviewed by Eric Carlson.

Source/WebCore:

No new tests, just code refactoring.

* Modules/mediacontrols/MediaControlsHost.cpp:
(WebCore::MediaControlsHost::supportsFullscreen):
Just pass in VideoFullscreenModeStandard as this is used for checking the standard fullscreen case.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::enterFullscreen):
Only use the FullScreen API if the mode is VideoFullscreenModeStandard. Call ChromeClient::supportsVideoFullscreen()
with the mode.
(WebCore::HTMLMediaElement::exitFullscreen):
Move the fullscreen element check up so we can use this method to exit picture-in-picture mode.
* html/HTMLMediaElement.h:

* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::supportsFullscreen):
Ditto.
(WebCore::HTMLVideoElement::webkitEnterFullscreen):
Pass in VideoFullscreenModeStandard to supportsFullscreen() as this is used for the standard fullscreen case.
(WebCore::HTMLVideoElement::webkitSupportsFullscreen):
Ditto.
(WebCore::HTMLVideoElement::webkitSupportsPresentationMode):
Pass in the correct VideoFullscreenMode to supportsFullscreen() corresponding to the mode string passed in.
(WebCore::HTMLVideoElement::setFullscreenMode):
Pass in the mode to supportsFullscreen().
* html/HTMLVideoElement.h:

* html/MediaController.h:
* html/MediaControllerInterface.h:
Make supportsFullscreen() take a VideoFullscreenMode.

* html/shadow/MediaControls.cpp:
(WebCore::MediaControls::reset):
Pass in VideoFullscreenModeStandard to supportsFullscreen() here since this is used for the standard
fullscreen button.
* html/shadow/MediaControlsApple.cpp:
(WebCore::MediaControlsApple::reset):
Ditto.

* page/ChromeClient.h:
Make supportsVideoFullscreen() take a VideoFullscreenMode.

* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::mediaSupportsFullscreen):
(WebCore::HitTestResult::toggleMediaFullscreenState):
(WebCore::HitTestResult::enterFullscreenForVideo):
Pass in VideoFullscreenModeStandard in the code relating to the standard fullscreen.

Source/WebKit/mac:

* WebCoreSupport/WebChromeClient.h:
* WebCoreSupport/WebChromeClient.mm:
(WebChromeClient::supportsVideoFullscreen):

Source/WebKit/win:

* WebCoreSupport/WebChromeClient.cpp:
(WebChromeClient::supportsVideoFullscreen):
* WebCoreSupport/WebChromeClient.h:

Source/WebKit2:

* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::supportsVideoFullscreen):
* WebProcess/WebCoreSupport/WebChromeClient.h:

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/Modules/mediacontrols/MediaControlsHost.cpp
trunk/Source/WebCore/html/HTMLMediaElement.cpp
trunk/Source/WebCore/html/HTMLMediaElement.h
trunk/Source/WebCore/html/HTMLVideoElement.cpp
trunk/Source/WebCore/html/HTMLVideoElement.h
trunk/Source/WebCore/html/MediaController.h
trunk/Source/WebCore/html/MediaControllerInterface.h
trunk/Source/WebCore/html/shadow/MediaControls.cpp
trunk/Source/WebCore/html/shadow/MediaControlsApple.cpp
trunk/Source/WebCore/page/ChromeClient.h
trunk/Source/WebCore/rendering/HitTestResult.cpp
trunk/Source/WebKit/mac/ChangeLog
trunk/Source/WebKit/mac/WebCoreSupport/WebChromeClient.h
trunk/Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm
trunk/Source/WebKit/win/ChangeLog
trunk/Source/WebKit/win/WebCoreSupport/WebChromeClient.cpp
trunk/Source/WebKit/win/WebCoreSupport/WebChromeClient.h
trunk/Source/WebKit2/ChangeLog
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (195486 => 195487)

--- trunk/Source/WebCore/ChangeLog	2016-01-22 23:25:35 UTC (rev 195486)
+++ trunk/Source/WebCore/ChangeLog	2016-01-22 23:26:42 UTC (rev 195487)
@@ -1,3 +1,58 @@
+2016-01-17  Ada Chan  
+
+Add a mode parameter to MediaControllerInterface::supportsFullscreen() and ChromeClient::supportsVideoFullscreen().
+https://bugs.webkit.org/show_bug.cgi?id=153220
+
+Reviewed by Eric Carlson.
+
+No new tests, just code refactoring.
+
+* Modules/mediacontrols/MediaControlsHost.cpp:
+(WebCore::MediaControlsHost::supportsFullscreen):
+Just pass in VideoFullscreenModeStandard as this is used for checking the standard fullscreen case.
+
+* html/HTMLMediaElement.cpp:
+(WebCore::HTMLMediaElement::enterFullscreen):
+Only use the FullScreen API if the mode is VideoFullscreenModeStandard. Call ChromeClient::supportsVideoFullscreen()
+with the mode.
+(WebCore::HTMLMediaElement::exitFullscreen):
+Move the fullscreen element check up so we can use this method to exit picture-in-picture mode.
+* html/HTMLMediaElement.h:
+
+* h

[webkit-changes] [195412] trunk/Source

2016-01-21 Thread adachan
Title: [195412] trunk/Source








Revision 195412
Author adac...@apple.com
Date 2016-01-21 10:25:02 -0800 (Thu, 21 Jan 2016)


Log Message
Make it possible to enable VIDEO_PRESENTATION_MODE on other Cocoa platforms.
https://bugs.webkit.org/show_bug.cgi?id=153218

Reviewed by Eric Carlson.

Source/_javascript_Core:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

No new tests. Code refactoring.

* Configurations/FeatureDefines.xcconfig:
* WebCore.xcodeproj/project.pbxproj:
Move WebVideoFullscreenInterface.h from ios to cocoa.
* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::webkitSupportsPresentationMode):
The declaration of supportsPictureInPicture() has been moved to WebVideoFullscreenInterface.h
so include that header instead. Guard the supportsPictureInPicture() call with PLATFORM(COCOA)
as that method is only defined in Cocoa.
* platform/cocoa/WebVideoFullscreenInterface.h: Renamed from Source/WebCore/platform/ios/WebVideoFullscreenInterface.h.
Also move the declaration of supportsPictureInPicture() here.
* platform/graphics/MediaPlayer.cpp:
* platform/graphics/MediaPlayer.h:
* platform/graphics/MediaPlayerPrivate.h:
Implementations of methods related to the video fullscreen layer are now guarded by
PLATFORM(IOS) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE)) instead.
* platform/ios/WebVideoFullscreenInterfaceAVKit.h:
Declaration of supportsPictureInPicture() has been moved to WebVideoFullscreenInterface.h
* platform/mac/WebVideoFullscreenInterfaceMac.mm: Added.
(WebCore::supportsPictureInPicture):
Return false for now.

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig:

Source/WTF:

* wtf/Platform.h:

Modified Paths

trunk/Source/_javascript_Core/ChangeLog
trunk/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig
trunk/Source/WTF/ChangeLog
trunk/Source/WTF/wtf/Platform.h
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/Configurations/FeatureDefines.xcconfig
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
trunk/Source/WebCore/html/HTMLVideoElement.cpp
trunk/Source/WebCore/platform/graphics/MediaPlayer.cpp
trunk/Source/WebCore/platform/graphics/MediaPlayer.h
trunk/Source/WebCore/platform/graphics/MediaPlayerPrivate.h
trunk/Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.h
trunk/Source/WebKit/mac/ChangeLog
trunk/Source/WebKit/mac/Configurations/FeatureDefines.xcconfig
trunk/Source/WebKit2/ChangeLog
trunk/Source/WebKit2/Configurations/FeatureDefines.xcconfig


Added Paths

trunk/Source/WebCore/platform/cocoa/WebVideoFullscreenInterface.h
trunk/Source/WebCore/platform/mac/WebVideoFullscreenInterfaceMac.mm


Removed Paths

trunk/Source/WebCore/platform/ios/WebVideoFullscreenInterface.h




Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (195411 => 195412)

--- trunk/Source/_javascript_Core/ChangeLog	2016-01-21 17:50:26 UTC (rev 195411)
+++ trunk/Source/_javascript_Core/ChangeLog	2016-01-21 18:25:02 UTC (rev 195412)
@@ -1,3 +1,12 @@
+2016-01-19  Ada Chan  
+
+Make it possible to enable VIDEO_PRESENTATION_MODE on other Cocoa platforms.
+https://bugs.webkit.org/show_bug.cgi?id=153218
+
+Reviewed by Eric Carlson.
+
+* Configurations/FeatureDefines.xcconfig:
+
 2016-01-21  Per Arne Vollan  
 
 [B3][CMake] Add missing source file.


Modified: trunk/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig (195411 => 195412)

--- trunk/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig	2016-01-21 17:50:26 UTC (rev 195411)
+++ trunk/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig	2016-01-21 18:25:02 UTC (rev 195412)
@@ -170,6 +170,10 @@
 ENABLE_USERSELECT_ALL = ENABLE_USERSELECT_ALL;
 ENABLE_VIDEO = ENABLE_VIDEO;
 ENABLE_VIDEO_PRESENTATION_MODE[sdk=iphone*] = ENABLE_VIDEO_PRESENTATION_MODE;
+ENABLE_VIDEO_PRESENTATION_MODE[sdk=macosx*] = $(ENABLE_VIDEO_PRESENTATION_MODE_macosx_$(TARGET_MAC_OS_X_VERSION_MAJOR))
+ENABLE_VIDEO_PRESENTATION_MODE_macosx_101000 = ;
+ENABLE_VIDEO_PRESENTATION_MODE_macosx_101100 = ;
+ENABLE_VIDEO_PRESENTATION_MODE_macosx_101200 = ENABLE_VIDEO_PRESENTATION_MODE;
 ENABLE_VIDEO_TRACK = ENABLE_VIDEO_TRACK;
 ENABLE_DATACUE_VALUE = ENABLE_DATACUE_VALUE;
 ENABLE_VIEW_MODE_CSS_MEDIA = ;


Modified: trunk/Source/WTF/ChangeLog (195411 => 195412)

--- trunk/Source/WTF/ChangeLog	2016-01-21 17:50:26 UTC (rev 195411)
+++ trunk/Source/WTF/ChangeLog	2016-01-21 18:25:02 UTC (rev 195412)
@@ -1,3 +1,12 @@
+2016-01-19  Ada Chan  
+
+Make it possible to enable VIDEO_PRESENTATION_MODE on other Cocoa platforms.
+https://bugs.webkit.org/show_bug.cgi?id=153218
+
+Reviewed by Eric Carlson.
+
+* wtf/Platform.h:
+
 2016-01-19  Filip Pizlo  
 
 B3 should have basic path specialization


Modified: trunk/Source/WTF/wtf/Platform.h (195411 => 195412)

--- trunk/Source/WTF/wtf/Platform.h	2016-01-21 17:50:26 UTC (rev 195411)
+++ trunk/Source/WTF/wtf/Platform.h	2016-01-21 18

[webkit-changes] [187098] trunk/Source/WebCore

2015-07-20 Thread adachan
Title: [187098] trunk/Source/WebCore








Revision 187098
Author adac...@apple.com
Date 2015-07-20 22:39:55 -0700 (Mon, 20 Jul 2015)


Log Message
Follow-up to my earlier fix for r147085
https://bugs.webkit.org/show_bug.cgi?id=147085

Reviewed by Eric Carlson.

* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::isPlayingAudioDidChange):
Null-check document() before dereferencing it in case the audio context's document is destroyed
by the time the code block is called on the main thread.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/Modules/webaudio/AudioContext.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (187097 => 187098)

--- trunk/Source/WebCore/ChangeLog	2015-07-21 05:35:37 UTC (rev 187097)
+++ trunk/Source/WebCore/ChangeLog	2015-07-21 05:39:55 UTC (rev 187098)
@@ -1,3 +1,15 @@
+2015-07-20  Ada Chan  
+
+Follow-up to my earlier fix for r147085
+https://bugs.webkit.org/show_bug.cgi?id=147085
+
+Reviewed by Eric Carlson.
+
+* Modules/webaudio/AudioContext.cpp:
+(WebCore::AudioContext::isPlayingAudioDidChange):
+Null-check document() before dereferencing it in case the audio context's document is destroyed
+by the time the code block is called on the main thread.
+
 2015-07-20  Carlos Garcia Campos  
 
 Remove RenderTheme::shouldShowPlaceholderWhenFocused()


Modified: trunk/Source/WebCore/Modules/webaudio/AudioContext.cpp (187097 => 187098)

--- trunk/Source/WebCore/Modules/webaudio/AudioContext.cpp	2015-07-21 05:35:37 UTC (rev 187097)
+++ trunk/Source/WebCore/Modules/webaudio/AudioContext.cpp	2015-07-21 05:39:55 UTC (rev 187098)
@@ -1073,7 +1073,8 @@
 // we could be on the audio I/O thread here and the call into WebCore could block.
 RefPtr strongThis(this);
 callOnMainThread([strongThis] {
-strongThis->document()->updateIsPlayingMedia();
+if (strongThis->document())
+strongThis->document()->updateIsPlayingMedia();
 });
 }
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [187025] trunk/Source/WebCore

2015-07-20 Thread adachan
Title: [187025] trunk/Source/WebCore








Revision 187025
Author adac...@apple.com
Date 2015-07-20 11:05:59 -0700 (Mon, 20 Jul 2015)


Log Message
Fix deadlock between -[AVPlayerItem currentTime] and -[AVPlayer isExternalPlaybackActive]
https://bugs.webkit.org/show_bug.cgi?id=147085


Reviewed by Jer Noble.

* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::isPlayingAudioDidChange):
Call Document::updateIsPlayingMedia() on the main thread, since we could be on the audio I/O
thread here and the Document::updateIsPlayingMedia() call could block, causing a deadlock.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/Modules/webaudio/AudioContext.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (187024 => 187025)

--- trunk/Source/WebCore/ChangeLog	2015-07-20 17:42:01 UTC (rev 187024)
+++ trunk/Source/WebCore/ChangeLog	2015-07-20 18:05:59 UTC (rev 187025)
@@ -1,3 +1,16 @@
+2015-07-18  Ada Chan  
+
+Fix deadlock between -[AVPlayerItem currentTime] and -[AVPlayer isExternalPlaybackActive]
+https://bugs.webkit.org/show_bug.cgi?id=147085
+
+
+Reviewed by Jer Noble.
+
+* Modules/webaudio/AudioContext.cpp:
+(WebCore::AudioContext::isPlayingAudioDidChange):
+Call Document::updateIsPlayingMedia() on the main thread, since we could be on the audio I/O
+thread here and the Document::updateIsPlayingMedia() call could block, causing a deadlock.
+
 2015-07-20  Alex Christensen  
 
 Resurrect CMake build on Windows.


Modified: trunk/Source/WebCore/Modules/webaudio/AudioContext.cpp (187024 => 187025)

--- trunk/Source/WebCore/Modules/webaudio/AudioContext.cpp	2015-07-20 17:42:01 UTC (rev 187024)
+++ trunk/Source/WebCore/Modules/webaudio/AudioContext.cpp	2015-07-20 18:05:59 UTC (rev 187025)
@@ -1069,7 +1069,12 @@
 
 void AudioContext::isPlayingAudioDidChange()
 {
-document()->updateIsPlayingMedia();
+// Make sure to call Document::updateIsPlayingMedia() on the main thread, since
+// we could be on the audio I/O thread here and the call into WebCore could block.
+RefPtr strongThis(this);
+callOnMainThread([strongThis] {
+strongThis->document()->updateIsPlayingMedia();
+});
 }
 
 void AudioContext::fireCompletionEvent()






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [183933] trunk

2015-05-07 Thread adachan
Title: [183933] trunk








Revision 183933
Author adac...@apple.com
Date 2015-05-07 10:45:51 -0700 (Thu, 07 May 2015)


Log Message
Source/WebKit2:
Fix a couple of cases where the backForwardListState's currentIndex is not set correctly in WebBackForwardList::backForwardListState().
https://bugs.webkit.org/show_bug.cgi?id=144666

Reviewed by Darin Adler.

* UIProcess/WebBackForwardList.cpp:
(WebKit::WebBackForwardList::backForwardListState):
If the first item is filtered out and the currentIndex is 0, don't decrement currentIndex.
If all the items are filtered out, set currentIndex to the uninitialized value.

Tools:
Add a test for WKPageCopySessionState() with filtering.
https://bugs.webkit.org/show_bug.cgi?id=144666

Reviewed by Darin Adler.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2/WKPageCopySessionStateWithFiltering.cpp: Added.
(TestWebKitAPI::didFinishLoadForFrame):
(TestWebKitAPI::setPageLoaderClient):
(TestWebKitAPI::filterFirstItemCallback):
(TestWebKitAPI::filterAllItemsCallback):
(TestWebKitAPI::createSessionStates):
(TestWebKitAPI::TEST):

Modified Paths

trunk/Source/WebKit2/ChangeLog
trunk/Source/WebKit2/UIProcess/WebBackForwardList.cpp
trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj


Added Paths

trunk/Tools/TestWebKitAPI/Tests/WebKit2/WKPageCopySessionStateWithFiltering.cpp




Diff

Modified: trunk/Source/WebKit2/ChangeLog (183932 => 183933)

--- trunk/Source/WebKit2/ChangeLog	2015-05-07 17:30:00 UTC (rev 183932)
+++ trunk/Source/WebKit2/ChangeLog	2015-05-07 17:45:51 UTC (rev 183933)
@@ -1,3 +1,15 @@
+2015-05-07  Ada Chan  
+
+Fix a couple of cases where the backForwardListState's currentIndex is not set correctly in WebBackForwardList::backForwardListState().
+https://bugs.webkit.org/show_bug.cgi?id=144666
+
+Reviewed by Darin Adler.
+
+* UIProcess/WebBackForwardList.cpp:
+(WebKit::WebBackForwardList::backForwardListState):
+If the first item is filtered out and the currentIndex is 0, don't decrement currentIndex.
+If all the items are filtered out, set currentIndex to the uninitialized value.
+
 2015-05-07  Csaba Osztrogonác  
 
 [WK2] Remove Windows cruft


Modified: trunk/Source/WebKit2/UIProcess/WebBackForwardList.cpp (183932 => 183933)

--- trunk/Source/WebKit2/UIProcess/WebBackForwardList.cpp	2015-05-07 17:30:00 UTC (rev 183932)
+++ trunk/Source/WebKit2/UIProcess/WebBackForwardList.cpp	2015-05-07 17:45:51 UTC (rev 183933)
@@ -397,8 +397,9 @@
 auto& entry = *m_entries[i];
 
 if (filter && !filter(entry)) {
-if (backForwardListState.currentIndex && i <= backForwardListState.currentIndex.value())
---backForwardListState.currentIndex.value();
+auto& currentIndex = backForwardListState.currentIndex;
+if (currentIndex && i <= currentIndex.value() && currentIndex.value())
+--currentIndex.value();
 
 continue;
 }
@@ -406,6 +407,9 @@
 backForwardListState.items.append(entry.itemState());
 }
 
+if (backForwardListState.items.isEmpty())
+backForwardListState.currentIndex = Nullopt;
+
 return backForwardListState;
 }
 


Modified: trunk/Tools/ChangeLog (183932 => 183933)

--- trunk/Tools/ChangeLog	2015-05-07 17:30:00 UTC (rev 183932)
+++ trunk/Tools/ChangeLog	2015-05-07 17:45:51 UTC (rev 183933)
@@ -1,3 +1,19 @@
+2015-05-07  Ada Chan  
+
+Add a test for WKPageCopySessionState() with filtering.
+https://bugs.webkit.org/show_bug.cgi?id=144666
+
+Reviewed by Darin Adler.
+
+* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+* TestWebKitAPI/Tests/WebKit2/WKPageCopySessionStateWithFiltering.cpp: Added.
+(TestWebKitAPI::didFinishLoadForFrame):
+(TestWebKitAPI::setPageLoaderClient):
+(TestWebKitAPI::filterFirstItemCallback):
+(TestWebKitAPI::filterAllItemsCallback):
+(TestWebKitAPI::createSessionStates):
+(TestWebKitAPI::TEST):
+
 2015-05-06  Alexey Proskuryakov  
 
 iOS build fix attempt


Modified: trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj (183932 => 183933)

--- trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj	2015-05-07 17:30:00 UTC (rev 183932)
+++ trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj	2015-05-07 17:45:51 UTC (rev 183933)
@@ -55,6 +55,7 @@
 		524BBC9E19DF72C0002F1AF1 /* file-with-video.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 524BBC9B19DF3714002F1AF1 /* file-with-video.html */; };
 		524BBCA119E30C77002F1AF1 /* test.mp4 in Copy Resources */ = {isa = PBXBuildFile; fileRef = 524BBCA019E30C63002F1AF1 /* test.mp4 */; };
 		52B8CF9815868D9100281053 /* SetDocumentURI.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 52B8CF9415868CF000281053 /* SetDocumentURI.html */; };
+		52D673EE1AFB127300FA19FE /* WKPageCopySessionStateWithF

[webkit-changes] [178655] trunk

2015-01-19 Thread adachan
Title: [178655] trunk








Revision 178655
Author adac...@apple.com
Date 2015-01-19 10:50:55 -0800 (Mon, 19 Jan 2015)


Log Message
HTMLMediaElement::isPlayingAudio() should return false if the element is explicitly muted by script.
https://bugs.webkit.org/show_bug.cgi?id=140524

Reviewed by Andreas Kling.

Source/WebCore:

Test: media/muted-video-is-playing-audio.html

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::setMuted):
Call Document::updateIsPlayingAudio() to recalculate the overall audio playing state.
(WebCore::HTMLMediaElement::isPlayingAudio):
HTMLMediaElement::isPlayingAudio() should return false if the media element is explicitly muted.

LayoutTests:

The test contains a looping video. It makes sure initially Page::isPlayingAudio() returns true.
It should return false after the video is muted, and true again after the video is unmuted.

* media/muted-video-is-playing-audio-expected.txt: Added.
* media/muted-video-is-playing-audio.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/html/HTMLMediaElement.cpp


Added Paths

trunk/LayoutTests/media/muted-video-is-playing-audio-expected.txt
trunk/LayoutTests/media/muted-video-is-playing-audio.html




Diff

Modified: trunk/LayoutTests/ChangeLog (178654 => 178655)

--- trunk/LayoutTests/ChangeLog	2015-01-19 18:40:47 UTC (rev 178654)
+++ trunk/LayoutTests/ChangeLog	2015-01-19 18:50:55 UTC (rev 178655)
@@ -1,3 +1,16 @@
+2015-01-16  Ada Chan  
+
+HTMLMediaElement::isPlayingAudio() should return false if the element is explicitly muted by script.
+https://bugs.webkit.org/show_bug.cgi?id=140524
+
+Reviewed by Andreas Kling.
+
+The test contains a looping video. It makes sure initially Page::isPlayingAudio() returns true.
+It should return false after the video is muted, and true again after the video is unmuted.
+
+* media/muted-video-is-playing-audio-expected.txt: Added.
+* media/muted-video-is-playing-audio.html: Added.
+
 2015-01-19  Myles C. Maxfield  
 
 [SVG -> OTF Converter] Flip the switch on


Added: trunk/LayoutTests/media/muted-video-is-playing-audio-expected.txt (0 => 178655)

--- trunk/LayoutTests/media/muted-video-is-playing-audio-expected.txt	(rev 0)
+++ trunk/LayoutTests/media/muted-video-is-playing-audio-expected.txt	2015-01-19 18:50:55 UTC (rev 178655)
@@ -0,0 +1,15 @@
+Testing that muting a video element should result in page's audio playing state to become false
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS window.internals.isPagePlayingAudio() became true
+PASS window.internals.isPagePlayingAudio() became false
+PASS window.internals.isPagePlayingAudio() became true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
+RUN(video.muted = true)
+RUN(video.muted = false)
+


Added: trunk/LayoutTests/media/muted-video-is-playing-audio.html (0 => 178655)

--- trunk/LayoutTests/media/muted-video-is-playing-audio.html	(rev 0)
+++ trunk/LayoutTests/media/muted-video-is-playing-audio.html	2015-01-19 18:50:55 UTC (rev 178655)
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+