+Domenic
I've always wondered how important the shape of the image, plain text, video, audio, and plugin embedded documents was for web compat.
In theory they're real API that is web exposed. In practice I think browsers put random not always the same stuff down there.
If we want to keep the current shape we could instead use a UA shadow root on the body and put the UA wrappers and content there. That might be the easiest route.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
Yeah I'm aware the spec says what to do. That said I don't think browsers agree on all the various UA generated documents today... But if we all agree on what to do for a video maybe we should explore UA shadow roots.
I'll have to think about the implications of UA shadows. If an author then adds their own shadow root to the <body> the download button would disappear. I think shadow dom v1 was also careful to say author shadows don't work on things with UA shadows, but the body isn't one of those things. If we instead turduken the video and stick the button inside its UA shadow with a nested <video> the size of the video element on the outside will include the button incorrectly.
I'm also curious how often authors even embed videos in frames or window.open them such that they'd observe this. Why wouldn't they use video directly? I guess that's something to UseCount.
Does Firefox have any UI controls for media documents that are not inside the video itself as an overlay?
From: qin...@google.com [mailto:qin...@google.com] On Behalf Of Min Qin
> With this work around, we can show and hide the download button when needed and won't impact user's experience on video watching.
> And this won't impact the getBoundingClientRect() or document.body.clientHeight as Elliot mentioned.
>
> And since javascript is allowed, we could even put it in onload(), but we can always leave that as a TODO
Can you answer my question from earlier?
On Tue, Apr 5, 2016 at 1:36 PM, Domenic Denicola <d...@domenic.me> wrote:From: qin...@google.com [mailto:qin...@google.com] On Behalf Of Min Qin
> With this work around, we can show and hide the download button when needed and won't impact user's experience on video watching.
> And this won't impact the getBoundingClientRect() or document.body.clientHeight as Elliot mentioned.
>
> And since javascript is allowed, we could even put it in onload(), but we can always leave that as a TODO
Can you answer my question from earlier?Do you mean this question: " can you explain why this workaround is a better solution than the UA shadow root approach?"As I mentioned , this won't impact the getBoundingClientRect() or document.body.clientHeight as Elliot mentioned, and it allows us to show/hide the button when needed.
Document
object, but potentially before the page has finished fully loading, the user agent must update the session history with the new page."- E
I'd rather we just violated the spec than use script to work around the funny wording in the spec. Using script doesn't preserve any useful author invariants. Showing the button after a click seems like very weird UX as well. I'd say lets use a UA shadowRoot for now.
Catching up with this thread now. To which element would then UA shadowRoot be attached? It can't be the video itself, and in my ad-hoc testing, document.body.createShadowRoot causes the video itself to become invisible.
I think it would be worth investigating whether the internal structure of MediaDocument needs to be exposed for web compat at all. If it doesn't, maybe the entire iframe could be treated as cross-origin? It's less likely that this could be done for images, but still worth measuring if video is measured.
On Wed, Apr 6, 2016 at 3:00 AM, Philip Jägenstedt <phi...@opera.com> wrote:...I'd rather we just violated the spec than use script to work around the funny wording in the spec. Using script doesn't preserve any useful author invariants. Showing the button after a click seems like very weird UX as well. I'd say lets use a UA shadowRoot for now.Catching up with this thread now. To which element would then UA shadowRoot be attached? It can't be the video itself, and in my ad-hoc testing, document.body.createShadowRoot causes the video itself to become invisible.You need to add an insertion point to the shadow root. Try createShadowRoot().appendChild(document.createElement("content")).
I think it would be worth investigating whether the internal structure of MediaDocument needs to be exposed for web compat at all. If it doesn't, maybe the entire iframe could be treated as cross-origin? It's less likely that this could be done for images, but still worth measuring if video is measured.It would certainly be nice if we didn't need to expose the MediaDocument. Someone should UseCounter it, I can't imagine why anyone would use the MediaDocument instead of using a <video> directly.