Closed Bug 120398 Opened 23 years ago Closed 6 years ago

ability to specify 'projection' CSS2 media


(Core :: CSS Parsing and Computation, enhancement, P4)






(Reporter: mnot, Unassigned)



(Keywords: css2)

Opera automagically switches to the 'projection' CSS2 media when 'full screen'
is selected; this is nifty. Would be good to do this automatically, and/or
expose it as a preference or 'view' option.
->style system
Assignee: asa → dbaron
Component: Browser-General → Style System
Ever confirmed: true
QA Contact: doronr → ian
Summary: RFE: ability to specify 'projection' CSS2 media → RFE: ability to specify 'projection' CSS2 media
Yep.  However, full screen mode has been removed.
P3/Future, but definitely worth doing if it ever looks like we're going to do
full screen mode, since this is close to a de-facto standard for how CSS should
work in full screen mode.
OS: Linux → All
Priority: -- → P3
Hardware: PC → All
Target Milestone: --- → Future
We have full screen mode on Windows now.
It may be useful to generalize this, and be able to choose from all supported
media.  For example, you could have sub menus under 'Use Style' for each medium
that contain each named style for that medium. (View->Use
Style->projection->style3, or View->Use Style->screen->style1).

Just my $0x2/0x64.
Keywords: css2
Eric Meyer mentioned in his blog that he used this feature of Opera for a
presentation at Web Design World:
The actual presentation is here:
I would be awesome to support this Mozilla.

I actually thought that comment 5 was a duplicate of a more general bug about
allowing viewing of basically any media type on screen and print, but I can't
find it. The closest I found are some comments in bug 51848 about allowing use
of print media style sheets for viewing on screen. See bug 51848 comment 3.
*** Bug 200293 has been marked as a duplicate of this bug. ***
Please don't ignore bug 200293, it has additional suggestions on how to 
implement this UI-wise.
Hmm.. So we need a scriptable API of some sort to change the current medium of
the prescontext, no?
As suggested, I move the relevant content from the earlier reported bug here, 
sorry for the duplication.

Mozilla already have most of the hooks and CSS support required to do this. 
Step by step, here's what should happen:

1. You load a page which defines media="projection" as the media type for one 
of its CSSes
2. You switch to fullscreen mode
3. Mozilla applies the CSS with media type "projection"
4. Mozilla makes sure that PageUp/PageDown actually navigates to the 
page-break-before and page-break-after CSS elements
5. When you return to normal view, Mozilla makes the media="projection" CSS 
inactive again.

In addition I whould propose some enhancements that would help the user 
experience of this feature:

a) Mozilla shows a small "presentation mode" indicator that you can click when 
there is a CSS with media="projection" defined in the page, which sends you to 
fullscreen mode.

b) Mozilla remaps left/right mouse button to previous/next page respectively 
in the projection mode, so you can navigate the slides using just the mouse 

c) Mozilla hides the scroll bar and address bar in fullscreen mode when the 
media="projection" style sheet is present.

There are no hooks I'm aware off to switch the media type of a prescontext on
the fly, and that's all that we'd need to do here (switch media type and
reresolve style).
er, well, that and make "projection" be a paged media mode.
a) With reference to #10 point b. Remapping the mousebuttons would be a really
awful usability mistake. Especially remapping the right mousebutton we would
lose the context menu and the functionality exposed there. There may be an
alternative method of getting the same functionality, but suddenly changing how
the system works would be a big leap for some people.

b) In addition we should make whether the projection mode is shown a user
preference that they can turn on or off for when they are in fullscreen mode
(perhaps only losing the buttons and scrollbar if they have it turned on),
perhaps somewhere under the navigator tree. I really like the utility of
projection (and have been voting for this bug for a while), but sometimes I just
want to have a normal scrollable display in fullscreen.

c) Related to point a, it should be recognised that the current CSS2
specification specifies projection as a "static" medium
<> however the current
working draft of CSS 2.1 specifies projection as "interactive"
<> , a nice 180 degree turn
around there then but something people should be aware of. (I personally think
it should be "both", because it can be printed, but there you go).

d) Printing a HTML/CSS presentation onto OHP's using mozilla, how can you
"override" the print media stylesheet (if you have one) with the projection
stylesheet. Some kind of style picker on the print preview page might be useful.
 For example the following drop down menu next to the Landscape/Portrait option,
[] indicating initial selected style. 

[Default Print Style]
*Alternative print style 1
*Alternative print style 2
*Default Projection Style
*Alternative projection style 1
With reference to 13a, the merapping is only supposed to take place if the 
user clicks the special "presentation mode" button, not by default in 
fullscreen mode - sorry for being a bit unclear on that. The same applies to 
hiding scrollbar and URL bar.
Just do as Limi sez, and sweetness + light will prevail :-)
sorry, I half-disagree.

I think a "presentation mode" would be good, but it's not related to full-screen.
Usually when I go full-screen I don't want presentation mode.

Presentation mode should be an additional mode, only available when the
presentation css is present.
...which is what I tried to be more specific about in comment #14 :)
what I mean is - I don't expect full-screen to cause my stylesheet to change.
For one, I usually go full-screen to read Marvel DotComics (in flash) and I
would be *very* annoyed if it switched to presentation mode :-)
...which is why I suggested the presentation button. This is not a discussion 
forum, can we stop this before it gets silly, Lalo? <wink /> :)
I think what needs to happen is:

 1) "Gecko" needs a hook to be able to set the medium of a docshell and/or
content viewer, probably so that it can change on the fly.  This might be used
to set "screen", "projection", "tv", etc.  This is relatively easy to do.  The
external API should probably take a string and then convert the string to an
atom for internal storage.

 2) Once that happens, someone needs to design and implement UI for a projection
mode.  I agree that it ought to be possible to go into full screen mode both
with or without the medium changing to projection.  (A trivial initial
implementation might involve a hidden pref, but we'd probably want something
better in the end, which may involve installable UI extensions.)  Having both a
"full screen mode" and "projection mode" on the menu seems a bit excessive to
me, but perhaps it isn't.
Maybe I'm a heretic, but this bug seems to have gotten polluted.

We went from comment 3:
"[Switching to projection CSS in full-screen mode] is close to a de-facto
standard for how CSS should work in full screen mode."

To comment 20:
" ought to be possible to go into full screen mode both
with or without the medium changing to projection.... Having both a
"full screen mode" and "projection mode" on the menu seems a bit excessive to
me, but perhaps it isn't."

Isn't the UI menu structure polluted enough?  Will the average user understand
(or care) what distinction we're proposing to draw between "full screen" and

If supporting projection means creating such complication, let's just leave
things alone since the "de facto standard" motivating us to do it isn't how
we're planning to actually do it....

Otherwise, I mostly agree with comment 10 (minus adding/subtracting from the UI
and remapping the mouse buttons): if you go to full screen mode on a page with
projection CSS, switch to the projection CSS.  Otherwise, don't.
I strongly object to any heuristics that try to detect whether a page "has
projection CSS".  What if an author has style rules that should be used when the
medium is "screen" but not when it is "projection", and no other differences?

In reality, it probably won't make much of a difference, except for web authors
who say media="screen" without knowing what they're doing, so perhaps I'd agree
that the best solution is just unconditionally to change the medium to
projection for full screen mode.
To sum this up a little (it's a pretty old bug, after all):

I think, most people here agreed that the presentation mode would be a
nice-to-have feature (but don't forget it's a limited audience that reads this
bug). However, the point of discussion seems to be how to activate it. Since
some people disliked the idea of switching modes automatically (after all,
fullscreen mode is a pretty helpful thing, too), I suggest the following:

1) Give it a pref option: do you want presentation mode in full screen ?
2) Let the menu entry depend on the selected option.
3) If there is a presentation mode in the page, make F11 cycle through all three
modes (normal/fullscreen/presentation) ignoring the prefs. Otherwise, only
switch between normal/fullscreen modes (surprise).

That way, there would be a shortcut to both fullscreen and presentation mode
(F11) as well as a general preference of the user if she/he actually wants to
see the presentation (i.e. no seperate menu entry). The option /might/ also
change the order in which fullscreen and presentation mode are shown with F11.

Well, anyway, I think the important point here is to provide both fullscreen AND
presentation mode to the user and I think, F11 is the right way to go.

Something related to comment #13: Wouldn't it be easiest to simply provide the
available media types as an additional option in "View->Use Style"?

Something like:
* normal (screen)
o projection
o handheld
o ...
* basic page style
o my style
o and another one

It's a more general approach and would also be great for testing web-pages!

Blocks: majorbugs
Whiteboard: parity-opera
Theer are more related things emerging. For instance Small Screen Rendering:

Projection, Print, Mobile, and others are useful when developing misc
tools/sites. For accessability testing it would be great to turn off CSS at all
or to emultate Text only browser.

Projection is just one of the types ov view with extended functionality
(next-slite previous slide, etc.)

Probably there should be another bug for that but I'm not sure what place to
comment about that.
Summary: RFE: ability to specify 'projection' CSS2 media → ability to specify 'projection' CSS2 media
*** Bug 248723 has been marked as a duplicate of this bug. ***
Another presentation using this feature is available from
<URL: >.
(Just in case you need another example. :)
No longer blocks: majorbugs
Assignee: dbaron → nobody
QA Contact: ian → style-system
Flags: wanted1.9.2?
Flags: wanted1.9.2?
Flags: wanted1.9.2-
Flags: blocking1.9.2-
I am interested in this feature. It would be great if we can fix it in the next build.
Flags: in-testsuite-
Now that Opera has switched to Blink it no longer does this.

Also the modern facilities (media queries) deprecated 'projection'.
Closed: 6 years ago
Resolution: --- → WONTFIX
Whiteboard: parity-opera
You need to log in before you can comment on or make changes to this bug.