- From: Robert O'Callahan <robert@ocallahan.org>
- Date: Thu, 12 May 2011 18:25:39 +1200
On Thu, May 12, 2011 at 4:45 PM, Jer Noble <jer.noble at apple.com> wrote: > > On May 11, 2011, at 7:41 PM, Robert O'Callahan wrote: > > > On Thu, May 12, 2011 at 6:27 AM, Jer Noble <jer.noble at apple.com> wrote: > > In order to fix rendering under the new full-screen API to be on par with > WebKit's existing full-screen support for video elements, we chose to add a > new pseudo-class and associated style rule to forcibly reset z-index styles > and other stacking-context styles. This is of course not ideal, and we have > only added this fix for full screen video elements. This rendering "quirk" > makes it much more difficult for authors to elevate a single element to > full-screen mode without modifying styles on the rest of their page. > > > > Proposal: the current API proposal simply recommends a set of CSS styles. > The proposal should instead require that no other elements render above the > current full-screen element and its children, and leave it up to > implementers to achieve that requirement. (E.g., WebKit may implement this > by walking up the ancestors of the full-screen element disabling any styles > which create stacking contexts.) > > > > This could have side effects observable to the page. I'd prefer to > standardize exactly what happens here. > > I agree that an explicit requirement is desirable. > OK but what should that requirement be? I'll give it some thought. > 2. Animating into and out of full screen. > > > > WebKit's current video full-screen support will animate an element > between its full-screen and non-full-screen states. This has both security > and user experience benefits. However, with the current z-index-based > rendering technique recommended by the proposed Full Screen API, animating > the full-screen transition is extremely difficult. > > > > Proposal: The full-screen element should create a new view, separate from > its parent document's view. This would allow the UA to resize and animate > the view separate from the parent document's view. This would also solve > issue 1 above. > > > > I'm not sure what you mean exactly by a "new view". Depending on what you > mean, that could create all kinds of implementation and spec issues. For > example, if an element can have different style or layout in the two views, > DOM APIs that return those things become ambiguous. I would strongly object > to that. > > I'm not suggesting that the element exists in two views simultaneously, but > rather that it becomes the root of a new viewport. > What does that mean in CSS terms? Does the element cease to exist in the old viewport? If so, what would that mean in CSS terms? Having elements in the same document be in different viewports still creates all kinds of spec and implementation issues :-(. > It seems to me you could animate the transition without having multiple > concurent views. For example, "freeze" the rendering of the document in its > browser window, put the document into the fullscreen state, and display it > in a popup window that starts off matching the geometry of the fullscreen > element and zooms out to cover the screen. > > That is much more difficult than it sounds. :) > > Freezing the non-full-screen content is already undesirable. The animation > can take an arbitrary amount of time to complete, Really? Why? It shouldn't take more than a second to complete, surely? > 4. A lack of rejection. > > > > The current proposal provides no notification to authors that a request > to enter full screen has been denied. From an UA implementor's perspective, > it makes writing test cases much more difficult. From an author's > perspective it makes failing over to another full screen technique (such as > a "full-window" substitute mode) impossible. > > > > Proposal: add a "fullscreenrequestdenied" event and require it to be > dispatched when and if the UA denies a full-screen request. > > > > My main concern is that with some UI scenarios there might not be a good > time to fire the "denied" event. For example, in Firefox 4 when an > application requests geolocation a popup appears, and if the user clicks > anywhere outside the popup the popup disappears but there is still UI > allowing the user to grant the request later. If we used the same approach > for fullscreen, I think we wouldn't want to fire the denied event unless the > user actually selects "no" in the popup. (It would seem confusing to deny > the request and then grant it later.) I'm wary of authors writing code that > assumes a denied event will fire and breaks when it doesn't, or when it > fires later than they expect. > > > > > The current API already requires that authors listen for events that may > occur in the far future. I don't see how this event would be any different. > You mean "fullscreenchanged"? I'm confident authors will understand that "fullscreenchanged" might fire late or never and will encounter that during testing. I'm less confident it will be obvious to authors that both "fullscreenchanged" and "fullscreendenied" might never fire and will encounter that during testing. > And your geolocation example actually argues the other way: the existing > geolocation API includes an asynchronous error handler that is explicitly > called when a request is denied. This would be a similar if not identical > use case. > I don't necessarily agree with that part of the geolocation API :-). > For your use-case of falling back to a "full-window" substitute mode, I > would suggest Web authors automatically go into the full-window state almost > immediately after requesting fullscreen, but cancel it if the window > actually goes into fullscreen mode. > > That seems non-optimal. It would result in a very confusing user > experience ("The page is requesting full screen? But it already is full > screen!"), and I doubt any authors would choose to implement it that way. > It seems rational to me: click on fullscreen, the video fills the entire window (but not the screen), and some browser UI appears to suggest going the rest of the way. Maybe that's not great, but the user experience where the app waits for fullscreendenied before filling the window sounds even worse, if that event never fires. It's also pretty bad if some passive UI appears, the user ignores it, then later notices it and dismisses it, and the video suddenly fills the window! Are you planning to have any kind of UI for fullscreen permission, or do these issues simply not arise for you? Rob -- "Now the Bereans were of more noble character than the Thessalonians, for they received the message with great eagerness and examined the Scriptures every day to see if what Paul said was true." [Acts 17:11]
Received on Wednesday, 11 May 2011 23:25:39 UTC