Closed
Bug 1471162
Opened 7 years ago
Closed 7 years ago
Get rid of fake floating scrollbars on OSX
Categories
(DevTools :: Framework, enhancement, P3)
Tracking
(firefox63 fixed)
RESOLVED
FIXED
Firefox 63
Tracking | Status | |
---|---|---|
firefox63 | --- | fixed |
People
(Reporter: jdescottes, Assigned: jdescottes)
References
Details
Attachments
(3 files)
+++ This bug was initially created as a clone of Bug #1464785 +++
Stop using fake floating scrollbars on OSX when Bug 1464722 lands.
Assignee | ||
Comment 1•7 years ago
|
||
I tried to implement this since Bug 1464722 landed, but interestingly, the new style applies to all scrollbars except for 2:
- main scrollbar in options panel
- main scrollbar in markup view
For these two the scrollbars keep the default color. So far I have no idea where this different behavior comes from.
Also when there are both a horizontal and a vertical scrollbar with custom colors, the corner between the two is transparent.
Assignee | ||
Comment 2•7 years ago
|
||
Comment 3•7 years ago
|
||
(In reply to Julian Descottes [:jdescottes][:julian] from comment #1)
> I tried to implement this since Bug 1464722 landed, but interestingly, the
> new style applies to all scrollbars except for 2:
> - main scrollbar in options panel
> - main scrollbar in markup view
>
> For these two the scrollbars keep the default color. So far I have no idea
> where this different behavior comes from.
If you can upload a wip patch and point me to the place, I can have a look.
> Also when there are both a horizontal and a vertical scrollbar with custom
> colors, the corner between the two is transparent.
Are you using webrender? If so, that's probably bug 1471766.
Comment 4•7 years ago
|
||
(In reply to Julian Descottes [:jdescottes][:julian] from comment #1)
> I tried to implement this since Bug 1464722 landed, but interestingly, the
> new style applies to all scrollbars except for 2:
> - main scrollbar in options panel
> - main scrollbar in markup view
Actually, it sounds like viewport scrollbars are unstyled again :/
Comment hidden (mozreview-request) |
Comment 6•7 years ago
|
||
Ah... Ok, I know why... I'm silly :/
Assignee | ||
Comment 7•7 years ago
|
||
(In reply to Xidorn Quan [:xidorn] UTC+10 from comment #6)
> Ah... Ok, I know why... I'm silly :/
Thanks for having a look so quickly! Attached a patch, but looks like you don't need it for the moment :)
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → jdescottes
Status: NEW → ASSIGNED
Comment hidden (mozreview-request) |
Assignee | ||
Comment 9•7 years ago
|
||
All scrollbars are now properly styled! However I still have the "transparent" (or blank sometimes) corner issue.
The easiest way to reproduce it is, with my patch:
- go to about:newtab
- open devtools
- switch to dark theme
- open Style Editor panel in devtools
It should normally be showing contentSearchUI.css, which has pretty long lines, and therefore makes it easy to trigger both horizontal and vertical scrollbars.
I checked I have all the webrender preferences turned off.
Flags: needinfo?(xidorn+moz)
Comment 10•7 years ago
|
||
I used Browser Toolbox to checked that position, and it turns out that the scrollbars are not provided natively at all. They are controlled by CodeMirror.
It's not clear to me how do you make CodeMirror use <scrollbar> element for the scrollbars, but apparently the corner is just a div.CodeMirror-scrollbar-filler and doesn't use <scrollcorner> which is what is supposed to be styled.
You can probably either put an xul <scrollcorner> into the element, or apply "-moz-appearance: scrollcorner" to it to make it styled.
Flags: needinfo?(xidorn+moz)
Assignee | ||
Comment 11•7 years ago
|
||
You are right, sorry about that! I have no idea how this is setup either, but we do have custom styles already for this.
- debugger's css: https://searchfox.org/mozilla-central/rev/d2966246905102b36ef5221b0e3cbccf7ea15a86/devtools/client/debugger/new/dist/debugger.css#251-253
:root.theme-dark .CodeMirror-scrollbar-filler {
background: transparent;
}
which translates into the transparent corner I was talking about for the debugger. I believe this one can be completely removed, CodeMirror seems to take care of hiding the corner now when real floating scrollbars are used.
- devtools' codemirror.css: https://searchfox.org/mozilla-central/rev/d2966246905102b36ef5221b0e3cbccf7ea15a86/devtools/client/sourceeditor/codemirror/lib/codemirror.css#20-22
.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
background-color: white; /* The little square between H and V scrollbars */
}
which is responsible for the white corner in the styleeditor. Here we can apply the fix you suggested and force -moz-appearance: scrollcorner (or rather do it in the mozilla.css file containing our codemirror overrides)
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 14•7 years ago
|
||
mozreview-review |
Comment on attachment 8988728 [details]
Bug 1471162 - Style codemirror scrollbar corners correctly in dark-theme;
https://reviewboard.mozilla.org/r/253936/#review260662
Attachment #8988728 -
Flags: review?(gl) → review+
Comment 15•7 years ago
|
||
mozreview-review |
Comment on attachment 8988460 [details]
Bug 1471162 - Stop using fake floating scrollbar in OSX dark theme;
https://reviewboard.mozilla.org/r/253738/#review260664
Tested on macOS just now. Seems to work fine (I made sure layout.css.scrollbar-colors.enabled was false, and I forced actual scrollbar in system preferences).
::: devtools/client/shared/theme-switching.js:93
(Diff revision 3)
> devtoolsStyleSheets.get(newThemeDef).push(styleSheet);
> loadEvents.push(loadPromise);
> }
>
> - if (os !== "win") {
> - // Windows always uses native scrollbars, other platforms still use custom floating
> + if (os !== "win" && os !== "mac") {
> + // Windows & Mac always use native scrollbars, Linux still use custom floating
nit: s/use/uses
Attachment #8988460 -
Flags: review?(pbrosset) → review+
Comment 16•7 years ago
|
||
Oh, and I tested with both patches applied too, so part 2 seems fine too.
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 19•7 years ago
|
||
Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/72a5ab3371fa
Stop using fake floating scrollbar in OSX dark theme;r=pbro
https://hg.mozilla.org/integration/autoland/rev/9839a5ebf84b
Style codemirror scrollbar corners correctly in dark-theme;r=gl
Comment 20•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/72a5ab3371fa
https://hg.mozilla.org/mozilla-central/rev/9839a5ebf84b
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox63:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 63
You need to log in
before you can comment on or make changes to this bug.
Description
•