Provide an easy method for theme developers to style the browser in private browsing mode

VERIFIED FIXED in Firefox 3.1b2



9 years ago
9 years ago


(Reporter: Ehsan, Assigned: Ehsan)



Firefox 3.1b2
Bug Flags:
blocking-firefox3.5 -
in-testsuite +

Firefox Tracking Flags

(Not tracked)



(3 attachments)

Created attachment 346417 [details] [diff] [review]
Patch (v1)

We should provide an easy method for theme developers to make some parts of the browsers UI look different in private browsing mode.  I think this will be a common request from theme developers, and unless we do something about it, this can only happen with an extension.

So, I'm proposing a really simple change to make rules such as the below possible in themes in case the designer wants to turn the background of the location bar gray for example.

[browsingmode=private] #urlbar {
  background: #eee;

It'd be great if we can take this for Beta 2 in order to give theme developers some time to play with this idea.
Flags: blocking-firefox3.1?
Attachment #346417 - Flags: review?(mconnor)


9 years ago
Attachment #346417 - Flags: review?(mconnor) → review+
Comment on attachment 346417 [details] [diff] [review]
Patch (v1)

makes sense.
Created attachment 346657 [details] [diff] [review]
Unit test

Simple unit test for the patch.
Attachment #346657 - Flags: review?(mconnor)
Attachment #346657 - Flags: review?(mconnor) → review+
Created attachment 346720 [details] [diff] [review]
Unified patch

Unified patch including the test.  Should have minimal risk.  Requesting approval to land on Beta 2 in order to give theme developers a chance to explore the possibilities of theming the private browsing mode.
Attachment #346720 - Flags: review+
Attachment #346720 - Flags: approval1.9.1b2?


9 years ago
Attachment #346720 - Flags: approval1.9.1b2? → approval1.9.1b2+
Last Resolved: 9 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Keywords: dev-doc-needed
I added some docs for this to <>, but I'm not sure if that's considered enough, so I'm leaving the dev-doc-needed flag set.
This is great, we'll want to take advantage of this in 3.2 for an ambient change in the theme.
Flags: blocking-firefox3.1? → blocking-firefox3.1-
The existing coverage is about all that we ever do for changes like this, so I'm calling this doc complete.
Keywords: dev-doc-needed → dev-doc-complete
Ehsan, while trying to verify this enhancement I'm not able to see any change of the urlbar when using the given example from comment 0. I put the lines into my userChrome.css and restarted the browser. But the location bar doesn't change its background color when entering the Private Browsing mode.

I ran the test with Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2a1pre) Gecko/20090213 Minefield/3.2a1pre
How about:

[browsingmode=private] #urlbar {
  background: #eee !important;

?  The code part of this patch should work fine, since its unit test has been passing on all platforms...
Here we are. Important was the important fix here. Thanks Ehsan.

Verified fixed on Windows and OS X with:

Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b3pre) Gecko/20090213 Shiretoko/3.1b3pre

Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1b3pre) Gecko/20090213 Shiretoko/3.1b3pre
You need to log in before you can comment on or make changes to this bug.