Closed Bug 2069726 Opened 1 month ago Closed 6 days ago

Show the remote control stripe on the address bar only

Categories

(Firefox :: Theme, task)

task

Tracking

()

RESOLVED FIXED
159 Branch
Tracking Status
firefox159 --- fixed

People

(Reporter: dao, Assigned: kramerjaron, Mentored)

References

(Blocks 1 open bug)

Details

(Keywords: good-first-bug, Whiteboard: [sng][mcab-hnt-followon][lang=css])

Attachments

(2 files)

Filing as a good first bug to learn workflows.

When Firefox runs under remote control (Marionette, WebDriver, the Remote Agent), the address bar's background gets a red diagonal stripe so an automated session is easy to tell apart from a normal one. The rule that paints it is scoped to a class every <moz-urlbar> carries, .urlbar-background, so the stripe also lands on the toolbar's separate search bar (#searchbar-new) and on any other bar built from the same template. Only the address bar should have it.

The rule to change lives in browser/themes/shared/urlbar.css, inside the :root[remotecontrol] block:

.urlbar-background {
background-image: repeating-linear-gradient(-45deg, rgba(255, 60, 60, 0.25) 0 25px, rgba(175, 0, 0, 0.25) 25px 50px);
background-attachment: fixed;
animation: none !important;
}

Scoping the selector to #urlbar > .urlbar-background gives it the scope the rest of the indicator already has: #remote-control-box and the robot icon inside it are a single element in browser/base/content/navigator-toolbox.inc.xhtml, slotted into the address bar, so that half of the indicator is address-bar-only.

Link to the code (search the page for remotecontrol):
https://searchfox.org/firefox-main/source/browser/themes/shared/urlbar.css

To reproduce:

  1. If the separate search bar is not in your toolbar, right-click the toolbar, choose Customize Toolbar, and drag the search bar in.

  2. Start the browser under remote control:

    ./mach run --marionette

  3. Compare the two bars. The search bar carries the same red diagonal stripe as the address bar.

To verify the fix, repeat the steps above and check that the search bar is no longer striped, and that the address bar is still striped in each of its states: unfocused, focused, and with the results list open.

Tutorial to contribute:
https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html
https://firefox-source-docs.mozilla.org/contributing/stack_quickref.html

Please don't ask for the bug to be assigned. It will be automatically assigned to the first patch.

Assignee: nobody → kramerjaron
Status: NEW → ASSIGNED
Whiteboard: [lang=css] → [mcab-hnt-followon][lang=css]
Whiteboard: [mcab-hnt-followon][lang=css] → [sng][mcab-hnt-followon][lang=css]
Pushed by dgottwald@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/777b69ee13d0 https://hg.mozilla.org/integration/autoland/rev/09a1bbe0dd1d Scope the remote control stripe to the address bar. r=dao,desktop-theme-reviewers,urlbar-reviewers
Status: ASSIGNED → RESOLVED
Closed: 6 days ago
Resolution: --- → FIXED
Target Milestone: --- → 159 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: