Closed Bug 463189 Opened 16 years ago Closed 16 years ago

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

Categories

(Firefox :: Theme, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED
Firefox 3.1b2

People

(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)

References

Details

(Keywords: dev-doc-complete)

Attachments

(3 files)

Attached patch Patch (v1)Splinter Review
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)
Attachment #346417 - Flags: review?(mconnor) → review+
Comment on attachment 346417 [details] [diff] [review]
Patch (v1)

makes sense.
Attached patch Unit testSplinter Review
Simple unit test for the patch.
Attachment #346657 - Flags: review?(mconnor)
Attachment #346657 - Flags: review?(mconnor) → review+
Attached patch Unified patchSplinter Review
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?
Attachment #346720 - Flags: approval1.9.1b2? → approval1.9.1b2+
http://hg.mozilla.org/mozilla-central/rev/13eb132ec2c8
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Keywords: dev-doc-needed
I added some docs for this to <https://developer.mozilla.org/En/Theme_changes_in_Firefox_3.1>, 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.
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
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: