9 April, 2016 § Leave a comment
I spent some time last night looking in to a bug in the Firefox preferences as part of the Outreachy internship I’m mentoring. This bug is about how the context menus in our preferences were squished horizontally compared to normal context menus. I’ve put screenshots of the two below so you can compare.
Looking at bug 1247214, I knew that context menus outside of the preferences looked fine but context menus in the preferences were broken. This meant I had something I could compare side-by-side when looking at the CSS.
I used the inspector and looked at the applied styles for a
xul:menuitem and compared them between the preferences and non-preferences. I was surprised to see that they were nearly identical, and what differed was inconsequential.
After walking up the DOM from the
xul:menuitem and seeing that the two instances were still nearly identical, I had to think of a different route. Somewhat by chance I realized/remembered that there were children nodes of the
xul:menuitem that could possibly be affected. In the Inspector I expanded the
xul:menuitem and looked at the rules for the
xul:label inside of it. Immediately I noticed that the
-moz-margin-end were being set to zero and the rule looked like it wasn’t intended to affect context menus. Unsetting that rule fixed the bug.
So that describes how I found the issue with the bug. Figuring out a fix for it wouldn’t be that difficult now. I also wanted to find what changeset introduced the bug so I could learn more about why it was there.
Using MXR, I pulled up the `hg blame` for the file and went to the offending line. Clicking on the revision number on the left of the line brings up some of the diff from the changeset. At the top of this new page, I clicked on “changeset” to see the full changeset. This unfortunately was a refactoring changeset and wasn’t what actually introduced the offending lines. I then clicked on the parent changeset and based off of that revision found the file again and ran `hg blame` on it. Now the offending line was linked to the changeset that introduced the bug.
After reading through the bug that introduced the changeset I knew that I could safely make this change as the lines were never intended to alter context menus, and I also knew what to look for and test while making the change so I wouldn’t regress the original bugfix.
All of this being said, I probably could have found this quite a bit faster by using a tool called mozregression. mozregression is a tool that will help you run a binary search on all of our nightly builds (continuous integration ones too). As you are likely already aware, binary search is very fast, letting mozregression help narrow down the day that the regression got introduced from a range of 10 years to a single day in about 7 builds.
If I had taken the mozregression route I probably could have saved myself about 45 minutes of debugging and digging around. But both routes work well, and sometimes I learn more from one than the other.
I know this write-up was long, but I hope it was valuable.
6 May, 2015 § Leave a comment
(I’M PROBABLY JINXING MYSELF HERE… KNOCK ON WOOD!)
We are now a week away from the release of Firefox 38, and with it will finally come the release of in-content preferences. You can download Firefox Beta today to see what it will look like when it hits Release next week.
I want to give a huge thanks to all of the people who worked on the project. You all helped it get to the point where hundreds of millions of people will get to see a refreshed and modern preference experience.
Major thanks goes out to Stephen Horlander, Michael Maslaney, Madhava Enros, Gijs Kruitbosch, Blair McBride, Richard Marti, Tim Nguyen, Justin Dolske, Zhenshuo Fang, Dão Gottwald, Tim Taubert, Matthew Noorenberghe and a huge host of other people that have helped.
1) Dialogs opened in the Advanced pane don’t use the same tab-modal dialog implementation that can be found within the rest of the preferences. We hope to get this fixed in a future release very soon.
2) The design for focus rings within the preferences still has a refresh coming, but it won’t make Firefox 38. As with #1, we hope to get this in to a future release very soon.
3) If you have gone to
about:config and set
browser.search.showOneOffButtons to `
false`, the Search pane of the preferences is broken. The fix for this didn’t make the 38.0 cut-off, but it will be fixed within the next few weeks following release. Going forward this preference will be removed, so now may be a good time to revert that preference back to `
You can download Firefox Beta today to see what it will look like when it hits Release next week.
4 March, 2015 § 4 Comments
Firefox 38 has now merged to Aurora (Firefox Developer Edition) and we are a couple weeks into development of Firefox 39 on mozilla-central. At this point, bugs that are fixed on mozilla-central will need to be uplifted to mozilla-aurora to continue to ride the 38 train.
These are some of the 21 bugs that were fixed since the last update (1/31/2015):
- Bug 1008171 No focus for elements except textboxes (and buttons, on Windows and Linux) inside in-content preferences
- Bug 1025719 – openPreferences(panelName) doesn’t open the requested pane if about:preferences is in a yet-to-be-loaded tab
- Bug 1034296 – Action dropdown in Application pane does not open when session restored
- Bug 1037225 – Consider keeping browser.preferences.instantApply = false on Windows
- Bug 1044597 – in-content preferences: resized dialogs should not push buttons into overflow
- Bug 1047586 – Unable to interact with in-content preferences after changing minimum font size to a very large value
- Bug 1108302 – Menulists in the in-content preferences have too much padding at the start of their contents
- Bug 1111353 – No longer displayed check mark in in-content preferences if Text : white, Background : Black and Select “Never” in “Content” > “Colors…” > “Allow pages to choose their own colors, instead of my selections above”
Since the last update all of the P1-tracked bugs have been fixed. We are tracking the following P2 bugs:
Bug 1043612 – Persist the size of resizable in-content subdialogs
Bug 1136645 – InContent prefs – Make focusrings match the spec on Windows and Linux
Bug 1044600 – in-content preferences: empty dialogs after pressing backspace or the Back button
Bug 1044600 in the above list should be very close to getting fixed. It has landed and been backed out a couple times due to intermittent failures and leaks, but is making steady progress towards being fixed.
Gijs and I will be meeting up in less than two weeks in San Francisco to have a “hack week” focusing on the in-content preferences. We’ve gone through the list of bugs in the in-content preferences and put together a subset of 10 bugs that we’ll tackle during the week if they’re not fixed beforehand.
Big thanks go out to Ian Moody [:Kwan], Gijs, Yash Mehrotra, Richard Marti [:Paenglab], and Tim Nguyen [:ntim] for their help in fixing the 21 bugs.
31 January, 2015 § 1 Comment
We are now about half-way through the normal development cycle of Firefox 38. In about 3-4 weeks, what is currently “Nightly 38” will become “Firefox Developer Edition 38” (previously known as Firefox Aurora). At this point, beta builds of Firefox 36 will now revert back to the old-school preferences implementation. Firefox Beta will see the in-content preferences get more testing at the beginning of the Beta 37 iteration.
These are some of the bugs that have been fixed since the last update:
Bug 1022582 – Checkboxes and radio buttons in about:preferences lack any indication they’re checked/selected when using High Contrast mode
Bug 1043346 – InContent Prefs – Dialogs should have their dimensions reset after closing
Bug 1008172 – Scrolling up and down on pages with scrollbars in about:preferences will change subgroups (the Advanced subpanes)
Bug 1012223 – in-content preferences loading slowly
I’ve gone through the remaining bugs and attached both a “point” value as well as priorities for the bugs. Point values follow the Fibonacci sequence, and should roughly approximate the difficulty of fixing the bug. Priorities range from P1 to P3.
P1 bugs are considered those that block using the feature, as well as those that are highly visible. We are tracking three P1 bugs:
Bug 1108302 – Font size select list shows ellipsis instead of selected value (points = 1)
Bug 1044597 – in-content preferences: resized dialogs should not push buttons into overflow (points = 3)
Bug 1047586 – Unable to interact with In-content preferences after changing Font size (points = 5)
Big thanks to Richard Marti, Shubham Jindal, and Gijs Kruitbosch for helping to fix the previously-mentioned bugs.
10 December, 2014 § 2 Comments
Since the last update, bug 1022582 (checkboxes and radio buttons in about:preferences lack any indication they’re checked/selected when using High Contrast mode) has been marked ready for check-in and should be marked fixed by late tomorrow.
This marks the last of the high-contrast bugs blocking the release 🙂
We also have had great progress on bug 1043346 (dialogs should have their dimensions reset after closing). This bug looks ready to land after the patch gets updated.
I’m optimistic that we can get a fix in for bug 1008172 ([linux-only] scrolling up and down on pages with scrollbars in about:preferences will change subgroups) soon. I put some tips in the bug, and Richard Marti has said that he will try to take a look at it.
As for bug 1056478 (resizer of sub-dialog follows only half of the movement of mouse pointer), I’m not sure if we should keep it as a blocker. This bug reveals an underlying issue in Gecko (bug 1105906) that exists with any centered resizable element. Webkit doesn’t suffer from this issue, so it’s hopeful that we will find a solution, but I don’t know if this quirk should stop us from shipping.
The next bugs that I would like to see attention on are:
Bug 1043612: Persist the size of resizable in-content subdialogs
Bug 1044597: in-content preferences: resized dialogs should not push buttons into overflow
Bug 1044600: in-content preferences: empty dialogs after pressing backspace or the Back button
All three of these bugs are part of the subdialogs category. Thanks for the work to those contributing patches and helping test, we couldn’t do this without you! 🙂