Commit 489de599 authored by philipj@opera.com's avatar philipj@opera.com

Remove special case for HTMLMediaElement in determineDispatchBehavior

This was added in WebKit r87692 in order to fix "Scrubbing a Vimeo movie
when in fullscreen stops playback; no way to make it start again":
https://bugs.webkit.org/show_bug.cgi?id=61717

The commit message and bug comments makes it clear that this special
case is no longer needed:

 1. The media controls fullscreen button now uses largely the same code
    path as Element::webkitRequestFullscreen. "Video-only full screen is
    a mode where we use the shadow DOM as an implementation detail that
    should not be detectable by the web content" is no longer true at
    all, since Web content can observe the events fired, etc.

 2. Scrubbing no longer uses HTMLMediaElement::setPausedInternal(),
    which looks like the cause of "no way to make it start again".

BUG=none
TEST=None originally added with the code, but existing tests pass.

Review URL: https://codereview.chromium.org/210763004

git-svn-id: svn://svn.chromium.org/blink/trunk@170017 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 98dd4e48
...@@ -39,7 +39,6 @@ ...@@ -39,7 +39,6 @@
#include "core/events/MouseEvent.h" #include "core/events/MouseEvent.h"
#include "core/events/TouchEvent.h" #include "core/events/TouchEvent.h"
#include "core/events/TouchEventContext.h" #include "core/events/TouchEventContext.h"
#include "core/html/HTMLMediaElement.h"
#include "core/svg/SVGElementInstance.h" #include "core/svg/SVGElementInstance.h"
#include "core/svg/SVGUseElement.h" #include "core/svg/SVGUseElement.h"
...@@ -76,15 +75,6 @@ static inline bool inTheSameScope(ShadowRoot* shadowRoot, EventTarget* target) ...@@ -76,15 +75,6 @@ static inline bool inTheSameScope(ShadowRoot* shadowRoot, EventTarget* target)
static inline EventDispatchBehavior determineDispatchBehavior(Event* event, ShadowRoot* shadowRoot, EventTarget* target) static inline EventDispatchBehavior determineDispatchBehavior(Event* event, ShadowRoot* shadowRoot, EventTarget* target)
{ {
// Video-only full screen is a mode where we use the shadow DOM as an implementation
// detail that should not be detectable by the web content.
if (Element* element = FullscreenElementStack::currentFullScreenElementFrom(target->toNode()->document())) {
// FIXME: We assume that if the full screen element is a media element that it's
// the video-only full screen. Both here and elsewhere. But that is probably wrong.
if (isHTMLMediaElement(*element) && shadowRoot && shadowRoot->host() == element)
return StayInsideShadowDOM;
}
// WebKit never allowed selectstart event to cross the the shadow DOM boundary. // WebKit never allowed selectstart event to cross the the shadow DOM boundary.
// Changing this breaks existing sites. // Changing this breaks existing sites.
// See https://bugs.webkit.org/show_bug.cgi?id=52195 for details. // See https://bugs.webkit.org/show_bug.cgi?id=52195 for details.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment