[webkit-changes] [219552] trunk
Title: [219552] trunk Revision 219552 Author commit-qu...@webkit.org Date 2017-07-16 22:29:20 -0700 (Sun, 16 Jul 2017) Log Message Dismissing the captions panel using the mouse is too eager to remove the captions panel and media controls https://bugs.webkit.org/show_bug.cgi?id=174571 Patch by Antoine Quinton 2017-07-16 Reviewed by Eric Carlson. Source/WebCore: We did several things wrong when dismissing the tracks panel: - we did not check whether we were hosted in a shadow root when figuring if a click was on the tracks panel - we did not check whether we clicked over the media when dismissing the tracks panel - we did not check whether auto-hide was on before fading the media controls out when we clicked outside the media controls bounds We now correctly account for all of those cases and implement the following behavior when clickng as the tracks panel is presented: - dismiss the panel if the click is outside of the panel - dismiss the panel and the media controls if the click is outside the video and the media controls have auto-hide on (ie. media is playing) - dismiss the panel and the media controls after the track selection animation is finished if a track is selected Tests: media/modern-media-controls/tracks-panel/tracks-panel-up-click-outside-media-does-not-dimiss-media-controls-when-media-is-paused.html media/modern-media-controls/tracks-panel/tracks-panel-up-click-over-media-does-not-dimiss-media-controls-when-media-is-playing.html * Modules/modern-media-controls/controls/media-controls.js: (MediaControls.prototype.hideTracksPanel): Only hide the media controls if we clicked outside of the media controls bounds and if we have auto-hide on when idle (ie. the media is playing). (MediaControls.prototype.isPointInControls): Add an option to specify whether the container should be considered when checking if a point is contained within the media controls bounds. * Modules/modern-media-controls/controls/tracks-panel.js: (TracksPanel.prototype._handleMousedown): (TracksPanel.prototype._isPointInTracksPanel): Correctly check whether the element that we started pressing on is contained within the tracks panel, accounting for the case where we are presented within a shadow root (ie. always when runing inside a Web page). LayoutTests: Adding a method to show the tracks panel for a given shadow root and adding new tests to check the correct behavior when dismissing the tracks panel when clicking over the media element or outside the media element when it's paused. * media/modern-media-controls/resources/media-controls-utils.js: (pressOnElement): (pressAtPoint): (showTracksPanel): (finishMediaControlsTest): Deleted. * media/modern-media-controls/tracks-panel/tracks-panel-up-click-outside-media-does-not-dimiss-media-controls-when-media-is-paused-expected.txt: Added. * media/modern-media-controls/tracks-panel/tracks-panel-up-click-outside-media-does-not-dimiss-media-controls-when-media-is-paused.html: Added. * media/modern-media-controls/tracks-panel/tracks-panel-up-click-over-media-does-not-dimiss-media-controls-when-media-is-playing-expected.txt: Added. * media/modern-media-controls/tracks-panel/tracks-panel-up-click-over-media-does-not-dimiss-media-controls-when-media-is-playing.html: Added. * platform/mac/TestExpectations: Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/media/modern-media-controls/resources/media-controls-utils.js trunk/LayoutTests/platform/mac/TestExpectations trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/Modules/modern-media-controls/controls/media-controls.js trunk/Source/WebCore/Modules/modern-media-controls/controls/tracks-panel.js Added Paths trunk/LayoutTests/media/modern-media-controls/tracks-panel/tracks-panel-up-click-outside-media-does-not-dimiss-media-controls-when-media-is-paused-expected.txt trunk/LayoutTests/media/modern-media-controls/tracks-panel/tracks-panel-up-click-outside-media-does-not-dimiss-media-controls-when-media-is-paused.html trunk/LayoutTests/media/modern-media-controls/tracks-panel/tracks-panel-up-click-over-media-does-not-dimiss-media-controls-when-media-is-playing-expected.txt trunk/LayoutTests/media/modern-media-controls/tracks-panel/tracks-panel-up-click-over-media-does-not-dimiss-media-controls-when-media-is-playing.html Diff Modified: trunk/LayoutTests/ChangeLog (219551 => 219552) --- trunk/LayoutTests/ChangeLog 2017-07-17 02:10:42 UTC (rev 219551) +++ trunk/LayoutTests/ChangeLog 2017-07-17 05:29:20 UTC (rev 219552) @@ -1,3 +1,26 @@ +2017-07-16 Antoine Quint + +Dismissing the captions panel using the mouse is too eager to remove the captions panel and media controls +https://bugs.webkit.org/show_bug.cgi?id=174571 + + +Reviewed by Eric Carlson. + +Adding a method to show the tracks panel for a given shadow root and adding new tests to check the correct +behavior when
[webkit-changes] [219551] trunk
Title: [219551] trunk Revision 219551 Author commit-qu...@webkit.org Date 2017-07-16 19:10:42 -0700 (Sun, 16 Jul 2017) Log Message DisallowUserAgentShadowContent moves out of non-UA shadow roots https://bugs.webkit.org/show_bug.cgi?id=165647 Patch by Ali Jumaon 2017-07-16 Reviewed by Ryosuke Niwa. Source/WebCore: Make rect-based hit-testing include nodes in non-UA shadow trees when the HitTestRequest has type DisallowUserAgentShadowContent. Test: fast/dom/nodesFromRect/nodesFromRect-shadow.html * rendering/HitTestResult.cpp: (WebCore::HitTestResult::addNodeToRectBasedTestResult): * testing/Internals.cpp: (WebCore::Internals::nodesFromRect): * testing/Internals.h: LayoutTests: * fast/dom/nodesFromRect/nodesFromRect-shadow-expected.txt: Added. * fast/dom/nodesFromRect/nodesFromRect-shadow.html: Added. * fast/dom/nodesFromRect/resources/nodesFromRect.js: (check): (checkShadowContent): (nodesFromRectAsString): Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/fast/dom/nodesFromRect/resources/nodesFromRect.js trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/rendering/HitTestResult.cpp trunk/Source/WebCore/testing/Internals.cpp trunk/Source/WebCore/testing/Internals.h Added Paths trunk/LayoutTests/fast/dom/nodesFromRect/nodesFromRect-shadow-expected.txt trunk/LayoutTests/fast/dom/nodesFromRect/nodesFromRect-shadow.html Diff Modified: trunk/LayoutTests/ChangeLog (219550 => 219551) --- trunk/LayoutTests/ChangeLog 2017-07-17 01:43:14 UTC (rev 219550) +++ trunk/LayoutTests/ChangeLog 2017-07-17 02:10:42 UTC (rev 219551) @@ -1,3 +1,17 @@ +2017-07-16 Ali Juma + +DisallowUserAgentShadowContent moves out of non-UA shadow roots +https://bugs.webkit.org/show_bug.cgi?id=165647 + +Reviewed by Ryosuke Niwa. + +* fast/dom/nodesFromRect/nodesFromRect-shadow-expected.txt: Added. +* fast/dom/nodesFromRect/nodesFromRect-shadow.html: Added. +* fast/dom/nodesFromRect/resources/nodesFromRect.js: +(check): +(checkShadowContent): +(nodesFromRectAsString): + 2017-07-16 Antoine Quint Clicking edges of media control buttons changes visual state of button (pressed) but doesn't execute action Added: trunk/LayoutTests/fast/dom/nodesFromRect/nodesFromRect-shadow-expected.txt (0 => 219551) --- trunk/LayoutTests/fast/dom/nodesFromRect/nodesFromRect-shadow-expected.txt (rev 0) +++ trunk/LayoutTests/fast/dom/nodesFromRect/nodesFromRect-shadow-expected.txt 2017-07-17 02:10:42 UTC (rev 219551) @@ -0,0 +1,7 @@ +PASS All correct nodes found for rect +PASS All correct nodes found for rect +PASS All correct nodes found for rect +PASS successfullyParsed is true + +TEST COMPLETE + Added: trunk/LayoutTests/fast/dom/nodesFromRect/nodesFromRect-shadow.html (0 => 219551) --- trunk/LayoutTests/fast/dom/nodesFromRect/nodesFromRect-shadow.html (rev 0) +++ trunk/LayoutTests/fast/dom/nodesFromRect/nodesFromRect-shadow.html 2017-07-17 02:10:42 UTC (rev 219551) @@ -0,0 +1,43 @@ + + + + +.box { +width: 30px; +height: 30px; +padding: 0px; +} + + + + + + + + + + + +