Seems good to me! Note that the shape of the document body is actually required per spec, but we can use a UA shadow root here.
Btw I think you're cross posting between public and private mailing lists. :)
On Sep 19, 2016 9:10 PM, "Philip Jägenstedt" <foo...@chromium.org> wrote:
>
> AFAIK there's no good reason for the difference, it's just an historical accident. ImageDocument is a pretty terrible image viewer, it could be made a lot better for large images in particular.
>
> Even if UA shadow roots are used, I think that'd be observable in that any attempt by the page to attach another shadow root would then fail. Pretty obscure, but I think it'd be worth investigating if these documents actually need to be considered same-origin with the page that embeds them.
Shadow DOM v1 doesn't allow author shadow roots on the body, so from the spec level we're fine. Shadow DOM v0 did, but I doubt the intersection of v0 and people messing with image documents is large. We already used the UA shadow root strategy for video IIRC.
>
> One might also consider using different documents for iframes and top-level frames.
>
>
> On Mon, Sep 19, 2016 at 8:42 PM Elliott Sprehn <esp...@chromium.org> wrote:
>>
>> Seems good to me! Note that the shape of the document body is actually required per spec, but we can use a UA shadow root here.
>>
>> Btw I think you're cross posting between public and private mailing lists. :)
>>
>>
>> On Sep 19, 2016 6:37 PM, <dfalc...@chromium.org> wrote:
>>>
>>> Hey all,
>>>
>>> As part of adding a new download manager UI to Chrome on Android, I've been investigating how standalone images & video are shown in tabs (e.g. for viewing files stored locally on your device or selecting "open image in new tab" from the context menu). I tracked down the page generation to ImageDocument.cpp and MediaDocument.cpp, but was wondering about the inconsistency between the two: images are drawn starting in the top-left with a white background, while media is shown centered on the screen with a black background.
>>>
>>>
>>>