Closed
Bug 1455138
Opened 6 years ago
Closed 6 years ago
Use SVG context paint for macOS tree twisties
Categories
(Toolkit :: Themes, enhancement, P3)
Tracking
()
RESOLVED
FIXED
mozilla62
Tracking | Status | |
---|---|---|
firefox62 | --- | fixed |
People
(Reporter: ntim, Assigned: ntim)
References
Details
(Whiteboard: [ntim-intern-project])
Attachments
(1 file, 2 obsolete files)
Possible since bug 1381453
Updated•6 years ago
|
Priority: -- → P3
Assignee | ||
Updated•6 years ago
|
OS: Unspecified → Mac OS X
Summary: Use SVG context paint for tree twisties → Use SVG context paint for macOS tree twisties
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Updated•6 years ago
|
Attachment #8983378 -
Attachment is obsolete: true
Attachment #8983378 -
Flags: review?(gijskruitbosch+bugs)
Comment hidden (mozreview-request) |
Assignee | ||
Updated•6 years ago
|
Attachment #8983379 -
Attachment is obsolete: true
Attachment #8983379 -
Flags: review?(gijskruitbosch+bugs)
Comment 4•6 years ago
|
||
mozreview-review |
Comment on attachment 8983379 [details] Bug 1455138 - Use SVG context paint for macOS tree twisties. https://reviewboard.mozilla.org/r/249292/#review255456 ::: browser/themes/osx/places/places.css:79 (Diff revision 1) > -.sidebar-placesTreechildren::-moz-tree-twisty(closed, selected) { > - list-style-image: url("chrome://global/skin/tree/arrow-disclosure.svg#arrow-disclosure-collapsed-inverted"); > +.sidebar-placesTreechildren::-moz-tree-twisty(selected) { > + fill: currentColor; Why do you need to repeat the `fill: currentColor` here? ::: browser/themes/osx/places/places.css:109 (Diff revision 1) > - .sidebar-placesTreechildren:-moz-locale-dir(rtl)::-moz-tree-twisty(closed, selected) { > - list-style-image: url("chrome://global/skin/tree/arrow-disclosure.svg#arrow-disclosure-collapsed-rtl"); > } > > - .sidebar-placesTreechildren:-moz-locale-dir(rtl)::-moz-tree-twisty(closed, selected, focus) { > - list-style-image: url("chrome://global/skin/tree/arrow-disclosure.svg#arrow-disclosure-collapsed-inverted-rtl") > + .sidebar-placesTreechildren::-moz-tree-twisty(selected, focus) { > + fill-opacity: 1; Could we include the fill-opacity property in the earlier rules? It'd be a no-op for the cell-text, but it would simplify the stylesheets...
Attachment #8983379 -
Flags: review+
Comment 5•6 years ago
|
||
mozreview-review |
Comment on attachment 8983385 [details] Bug 1455138 - Use SVG context paint for macOS tree twisties. https://reviewboard.mozilla.org/r/249294/#review255472 ::: browser/themes/osx/places/organizer.css:44 (Diff revision 1) > border-top: 1px solid #505d6d; > margin: 0 10px; > } > > +#placesList > treechildren::-moz-tree-twisty(selected), > #placesList > treechildren::-moz-tree-cell-text(selected) { Please fix the whitespace while we're here. ::: browser/themes/osx/places/organizer.css:59 (Diff revision 1) > + fill: currentColor; > + fill-opacity: 0.6; > } > > -#placesList > treechildren::-moz-tree-twisty(closed, selected) { > - list-style-image: url("chrome://global/skin/tree/arrow-disclosure.svg#arrow-disclosure-collapsed-inverted"); > +#placesList > treechildren::-moz-tree-twisty(selected) { > + fill: currentColor; Same issue as before, also in the other files. ::: browser/themes/osx/places/organizer.css:88 (Diff revision 1) > - #placesList > treechildren:-moz-locale-dir(rtl)::-moz-tree-twisty(closed, selected) { > - list-style-image: url("chrome://global/skin/tree/arrow-disclosure.svg#arrow-disclosure-collapsed-rtl"); > } > > - #placesList > treechildren:-moz-locale-dir(rtl)::-moz-tree-twisty(closed, selected, focus) { > - list-style-image: url("chrome://global/skin/tree/arrow-disclosure.svg#arrow-disclosure-collapsed-inverted-rtl"); > + #placesList > treechildren::-moz-tree-twisty(selected, focus) { > + fill-opacity: 1; see previous review, but also for the other files... ::: browser/themes/osx/syncedtabs/sidebar.css:43 (Diff revision 1) > - background-image: url("chrome://global/skin/tree/arrow-disclosure.svg#arrow-disclosure-expanded"); > -} > + background-image: url("chrome://global/skin/tree/arrow-expanded.svg"); > + -moz-context-properties: fill, fill-opacity; This is a background image, not a list-style-image. Does the context-fill work in that case, also given this is an HTML document that IIRC might not even be privileged? It's also not actually a XUL tree...
Attachment #8983385 -
Flags: review?(gijskruitbosch+bugs)
Assignee | ||
Comment 6•6 years ago
|
||
(In reply to :Gijs (he/him) from comment #4) > Comment on attachment 8983379 [details] > Bug 1455138 - Use SVG context paint for macOS tree twisties. > > https://reviewboard.mozilla.org/r/249292/#review255456 > > ::: browser/themes/osx/places/places.css:79 > (Diff revision 1) > > -.sidebar-placesTreechildren::-moz-tree-twisty(closed, selected) { > > - list-style-image: url("chrome://global/skin/tree/arrow-disclosure.svg#arrow-disclosure-collapsed-inverted"); > > +.sidebar-placesTreechildren::-moz-tree-twisty(selected) { > > + fill: currentColor; > > Why do you need to repeat the `fill: currentColor` here? It doesn't seem to work without the repetition. > This is a background image, not a list-style-image. Does the context-fill work in that case, also given this is an HTML document that IIRC might not even be privileged? Yes, it does, I've tested the patch, and other places in the source code use it the same way.
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 9•6 years ago
|
||
mozreview-review |
Comment on attachment 8983385 [details] Bug 1455138 - Use SVG context paint for macOS tree twisties. https://reviewboard.mozilla.org/r/249294/#review255616 reluctant r=me with the repetition removed or addressed in a follow-up bug with specifics about what doesn't work. ::: browser/themes/osx/places/organizer.css:60 (Diff revision 3) > + fill: currentColor; > + fill-opacity: 0.6; > } > > -#placesList > treechildren::-moz-tree-twisty(closed, selected) { > - list-style-image: url("chrome://global/skin/tree/arrow-disclosure.svg#arrow-disclosure-collapsed-inverted"); > +#placesList > treechildren::-moz-tree-twisty(selected) { > + fill: currentColor; This not working without the repetition doesn't make sense. The previous rule should already apply, as `::-moz-tree-twisty` is less specific than `::-moz-tree-twisty(selected)`. Can you ask someone who knows Stylo about why this wouldn't work (if landing this is blocking other stuff, maybe in a follow-up bug that you link to in a comment in the CSS) ? ::: browser/themes/osx/places/organizer.css:82 (Diff revision 3) > } > > + #placesList > treechildren::-moz-tree-twisty(selected, focus), > #placesList > treechildren::-moz-tree-cell-text(selected, focus) { > color: #fff; > + fill-opacity: 1; In particular, you then don't seem to need to repeat the fill: currentColor bit here? :-\
Attachment #8983385 -
Flags: review?(gijskruitbosch+bugs) → review+
Assignee | ||
Comment 10•6 years ago
|
||
(In reply to :Gijs (he/him) from comment #9) > Comment on attachment 8983385 [details] > Bug 1455138 - Use SVG context paint for macOS tree twisties. > > https://reviewboard.mozilla.org/r/249294/#review255616 > > reluctant r=me with the repetition removed or addressed in a follow-up bug > with specifics about what doesn't work. > > ::: browser/themes/osx/places/organizer.css:60 > (Diff revision 3) > > + fill: currentColor; > > + fill-opacity: 0.6; > > } > > > > -#placesList > treechildren::-moz-tree-twisty(closed, selected) { > > - list-style-image: url("chrome://global/skin/tree/arrow-disclosure.svg#arrow-disclosure-collapsed-inverted"); > > +#placesList > treechildren::-moz-tree-twisty(selected) { > > + fill: currentColor; > > This not working without the repetition doesn't make sense. The previous > rule should already apply, as `::-moz-tree-twisty` is less specific than > `::-moz-tree-twisty(selected)`. > > Can you ask someone who knows Stylo about why this wouldn't work (if landing > this is blocking other stuff, maybe in a follow-up bug that you link to in a > comment in the CSS) ? I think it might be due to style invalidation (I've seen this bug before, specially on trees, where some properties would not update unless a paint was forced). I'll look more into it tomorrow, and see what I can do. > ::: browser/themes/osx/places/organizer.css:82 > (Diff revision 3) > > } > > > > + #placesList > treechildren::-moz-tree-twisty(selected, focus), > > #placesList > treechildren::-moz-tree-cell-text(selected, focus) { > > color: #fff; > > + fill-opacity: 1; > > In particular, you then don't seem to need to repeat the fill: currentColor > bit here? :-\ The color: #fff; bit is probably forcing a repaint here.
Assignee | ||
Comment 11•6 years ago
|
||
ni? myself to look more into this tomorrow.
Assignee: nobody → ntim.bugs
Flags: needinfo?(ntim.bugs)
Assignee | ||
Updated•6 years ago
|
Flags: needinfo?(ntim.bugs)
Comment 12•6 years ago
|
||
Pushed by ntim.bugs@gmail.com: https://hg.mozilla.org/integration/autoland/rev/6646425c8cd1 Use SVG context paint for macOS tree twisties. r=Gijs
Comment 13•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/6646425c8cd1
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox62:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
Assignee | ||
Updated•6 years ago
|
Flags: needinfo?(ntim.bugs)
Whiteboard: [ntim-intern-project]
Assignee | ||
Comment 14•6 years ago
|
||
(In reply to :Gijs (Not available 3-19 Aug; he/him) from comment #9) > Comment on attachment 8983385 [details] > Bug 1455138 - Use SVG context paint for macOS tree twisties. > > https://reviewboard.mozilla.org/r/249294/#review255616 > > reluctant r=me with the repetition removed or addressed in a follow-up bug > with specifics about what doesn't work. > > ::: browser/themes/osx/places/organizer.css:60 > (Diff revision 3) > > + fill: currentColor; > > + fill-opacity: 0.6; > > } > > > > -#placesList > treechildren::-moz-tree-twisty(closed, selected) { > > - list-style-image: url("chrome://global/skin/tree/arrow-disclosure.svg#arrow-disclosure-collapsed-inverted"); > > +#placesList > treechildren::-moz-tree-twisty(selected) { > > + fill: currentColor; > > This not working without the repetition doesn't make sense. The previous > rule should already apply, as `::-moz-tree-twisty` is less specific than > `::-moz-tree-twisty(selected)`. > > Can you ask someone who knows Stylo about why this wouldn't work (if landing > this is blocking other stuff, maybe in a follow-up bug that you link to in a > comment in the CSS) ? Most of this code has been cleaned up as of bug 1469287.
You need to log in
before you can comment on or make changes to this bug.
Description
•