'urlbar' has lost 'level' element in 43.0

RESOLVED WONTFIX

Status

()

Firefox
Extension Compatibility
RESOLVED WONTFIX
3 years ago
2 years ago

People

(Reporter: Artem Kuroptev, Unassigned)

Tracking

43 Branch
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

3 years ago
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0
Build ID: 20151216175450

Steps to reproduce:

I have the following code in my userChrome.css:

###
/* Make secure Web site URLs stand out */

#urlbar > .autocomplete-textbox-container {
  background-color: #FFf0f0 !important;
}

#urlbar[level="low"] > .autocomplete-textbox-container,
#urlbar[level="high"] > .autocomplete-textbox-container {
    background-color: rgb(245,246,190) !important;
    color: black !important;
}
#urlbar[level="broken"] > .autocomplete-textbox-container {
  background-color: #FFEEEE !important;
}
###


Actual results:

.autocomplete-textbox-container always has #FFf0f0 color, even for secure sites. 'level' does not work in selectors. 


Expected results:

HTTPS sites without mixed content should have rgb(245,246,190) color in the .autocomplete-textbox-container.

The code stopped work after update from 43 to 43.0.1.

Updated

3 years ago
Component: Untriaged → Location Bar

Comment 1

3 years ago
https://hg.mozilla.org/releases/mozilla-release/rev/35b3e4d35d29#l2.12
Blocks: 1204486
Status: UNCONFIRMED → NEW
Component: Location Bar → Extension Compatibility
Ever confirmed: true
See Also: → bug 456761
Summary: 'urlbar' has lost 'level' element in 43.0.1 → 'urlbar' has lost 'level' element in 43.0
Paolo, is there an alternative for 'level'?
Flags: needinfo?(paolo.mozmail)

Comment 3

3 years ago
(In reply to Jorge Villalobos [:jorgev] from comment #2)
> Paolo, is there an alternative for 'level'?

We now set the "verifiedIdentity" and "chromeUI" classes on the "identity-box" element:

http://mxr.mozilla.org/mozilla-central/source/browser/themes/shared/identity-block/identity-block.inc.css#50

It may be possible to style the rest of the URL bar based on these classes, using the sibling selector "+".
Flags: needinfo?(paolo.mozmail)
Closing this bug as the change was intended and there are alternatives available.
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → WONTFIX

Comment 5

2 years ago
(In reply to :Paolo Amadini from comment #3)
> (In reply to Jorge Villalobos [:jorgev] from comment #2)
> > Paolo, is there an alternative for 'level'?
> 
> We now set the "verifiedIdentity" and "chromeUI" classes on the
> "identity-box" element:
> 
> http://mxr.mozilla.org/mozilla-central/source/browser/themes/shared/identity-
> block/identity-block.inc.css#50
> 
> It may be possible to style the rest of the URL bar based on these classes,
> using the sibling selector "+".

Author of the Firefox 2 theme here. (ID: 6898)
verifiedIdentity has existed on the identity block for ages. The point is, you cannot style the background of the url bar anymore depending on security level (level low/high/broken) due to the attribute being removed (bug 1204486)
#urlbar[level="high"][pageproxystate="valid"] > .autocomplete-textbox-container
#urlbar[level="low"][pageproxystate="valid"] > .autocomplete-textbox-container
http://mxr.mozilla.org/firefox2/source/themes/classic/navigator/navigator.css#198 (committed Jul 2006!)

#urlbar[pageproxystate="valid"] > #identity-box.verifiedIdentity ~ .urlbar-input-box
I've tried using .urlbar-input-box with verifiedIdentiy/verifiedDomain (and some margin fixes), but since .urlbar-input-box seems to be anonymous, the line above doesn't to work. Is there a way to achieve this now that the level attribute is gone?
Flags: needinfo?(paolo.mozmail)

Comment 6

2 years ago
(In reply to rctgamer3 from comment #5)
> I've tried using .urlbar-input-box with verifiedIdentiy/verifiedDomain (and
> some margin fixes), but since .urlbar-input-box seems to be anonymous, the
> line above doesn't to work. Is there a way to achieve this now that the
> level attribute is gone?

I confirm it, apparently the sibling selector doesn't work here since the latter element is part of the anonymous content of the textbox binding.

Dão, is there any other way to achieve this with the current URL bar structure? Or maybe we should move the new identity block styling classes to the URL bar textbox and update our CSS rules accordingly?
Flags: needinfo?(paolo.mozmail) → needinfo?(dao)
(In reply to :Paolo Amadini from comment #6)
> Dão, is there any other way to achieve this with the current URL bar
> structure?

nope

> Or maybe we should move the new identity block styling classes to
> the URL bar textbox and update our CSS rules accordingly?

I don't think we should do that. Changing the background color of the entire location bar has been discouraged ever since the identity block was introduced, which we think is a superior UI with less room for misunderstandings.
Flags: needinfo?(dao)
You need to log in before you can comment on or make changes to this bug.