Closed Bug 1359631 Opened 8 years ago Closed 8 years ago

Convert a bunch of toolkit SVG icons to use context-fill

Categories

(Toolkit :: Themes, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: jwatt, Assigned: jwatt)

References

Details

(Keywords: perf)

Attachments

(5 files, 5 obsolete files)

59 bytes, text/x-review-board-request
dao
: review+
Details
59 bytes, text/x-review-board-request
dao
: review+
Details
59 bytes, text/x-review-board-request
dao
: review+
Details
59 bytes, text/x-review-board-request
dao
: review+
Details
59 bytes, text/x-review-board-request
dao
: review+
Details
As part of fixing bug 1358998 we should stop using the :not(:target) selector in toolkit SVG icons. I don't have cycles to convert all of them but I've done a bunch.
Ho, hum. I tried to use reviewboard to request review, but as per my previous experiences with reviewboard things have not gone as I expected. The patches are visible at: https://reviewboard.mozilla.org/r/133640/diff/1/ but for whatever reason haven't shown up here as review requests. Dao, do you need me to figure out how to fix whatever's going wrong here or are you happy to just go ahead with the reviews?
Flags: needinfo?(dao+bmo)
Flags: needinfo?(dao+bmo)
Assignee: nobody → jwatt
Keywords: perf
Comment on attachment 8861675 [details] Bug 1359631 - Convert Toolkit's media/pauseButton.svg to use context paint to improve performance. https://reviewboard.mozilla.org/r/133640/#review136678 ::: browser/themes/linux/browser.css:993 (Diff revision 1) > > .ac-type-icon[type=keyword], > .ac-site-icon[type=searchengine] { > - list-style-image: url(chrome://global/skin/icons/autocomplete-search.svg#search-icon); > + list-style-image: url(chrome://global/skin/icons/autocomplete-search.svg); > + /* uncomment after bug 1350010 lands: context-properties: fill; */ > + fill: GrayText; /* context-fill for image */ Does currentColor work here? I don't think we need to repeat the "context-fill for image" comment all over the place. ::: toolkit/themes/linux/global/jar.mn (Diff revision 1) > # file, You can obtain one at http://mozilla.org/MPL/2.0/. > > #include ../../shared/non-mac.jar.inc.mn > > toolkit.jar: > - skin/classic/global/autocomplete.css What's going on here?
Attachment #8861675 - Flags: review?(dao+bmo) → review-
Comment on attachment 8861675 [details] Bug 1359631 - Convert Toolkit's media/pauseButton.svg to use context paint to improve performance. https://reviewboard.mozilla.org/r/133640/#review136680 ::: toolkit/themes/shared/jar.inc.mn:34 (Diff revision 1) > skin/classic/global/icons/calendar-arrows.svg (../../shared/icons/calendar-arrows.svg) > skin/classic/global/icons/find-arrows.svg (../../shared/icons/find-arrows.svg) > skin/classic/global/icons/info.svg (../../shared/incontent-icons/info.svg) > +#ifndef XP_MACOSX > + skin/classic/global/icons/autocomplete-search.svg (../../shared/icons/autocomplete-search.svg) > +#endif This can probably go into non-mac.jar.inc.mn.
Depends on: 1359762
Comment on attachment 8861675 [details] Bug 1359631 - Convert Toolkit's media/pauseButton.svg to use context paint to improve performance. https://reviewboard.mozilla.org/r/133640/#review136678 > Does currentColor work here? > > I don't think we need to repeat the "context-fill for image" comment all over the place. To me it seems like the purpose of the 'fill' properties will be really non-obvious to most/many people who may read this code, especially at the points where we're not also [going to be, once uncommented] setting 'context-properties'. So I'd expect these to be helpful. If you're sure you would rather they're removed I'll remove them all. > What's going on here? I noticed the contents of the Windows and Linux files are identical, so I moved the windows file to the shared directory toolkit/themes/shared/icons/, and removed the linux file. With the linux file removed I need to remove this line which references it.
(In reply to Jonathan Watt [:jwatt] from comment #11) > > I don't think we need to repeat the "context-fill for image" comment all over the place. > > To me it seems like the purpose of the 'fill' properties will be really > non-obvious to most/many people who may read this code, especially at the > points where we're not also [going to be, once uncommented] setting > 'context-properties'. So I'd expect these to be helpful. If you're sure you > would rather they're removed I'll remove them all. I think context-properties: fill; helps. More generally, this is going to be the most common if not only use of fill in chrome stylesheets. People will get used to it. Adding the comment everywhere seems rather cumbersome. > > What's going on here? > > I noticed the contents of the Windows and Linux files are identical, so I > moved the windows file to the shared directory toolkit/themes/shared/icons/, > and removed the linux file. With the linux file removed I need to remove > this line which references it. You accidentally removed autocomplete.css rather than the icon.
(In reply to Dão Gottwald [::dao] from comment #9) > Does currentColor work here? As discussed on IRC, in other patches I have set the value to currentColor if the color is being obviously set nearby. Otherwise, testing each platform adds a lot more time to an already tricky and time consuming conversion task, and is a straw too far for this camel. ;) (In reply to Dão Gottwald [::dao] from comment #12) > I think context-properties: fill; helps. More generally, this is going to be > the most common if not only use of fill in chrome stylesheets. People will > get used to it. Adding the comment everywhere seems rather cumbersome. Fair enough. > You accidentally removed autocomplete.css rather than the icon. Ah, thanks for catching.
Attachment #8861677 - Attachment is obsolete: true
Attachment #8861677 - Flags: review?(dao+bmo)
Attachment #8861678 - Attachment is obsolete: true
Attachment #8861678 - Flags: review?(dao+bmo)
Attachment #8861679 - Attachment is obsolete: true
Attachment #8861679 - Flags: review?(dao+bmo)
Attachment #8861680 - Attachment is obsolete: true
Attachment #8861680 - Flags: review?(dao+bmo)
Attachment #8861681 - Attachment is obsolete: true
Attachment #8861681 - Flags: review?(dao+bmo)
Comment on attachment 8861675 [details] Bug 1359631 - Convert Toolkit's media/pauseButton.svg to use context paint to improve performance. https://reviewboard.mozilla.org/r/133640/#review136954
Attachment #8861675 - Flags: review?(dao+bmo) → review+
Comment on attachment 8861676 [details] Bug 1359631 - Convert Toolkit's media/playButton.svg to use context paint to improve performance. https://reviewboard.mozilla.org/r/133642/#review136958
Attachment #8861676 - Flags: review?(dao+bmo) → review+
Pushed by jwatt@jwatt.org: https://hg.mozilla.org/integration/mozilla-inbound/rev/aa50d29ff246 Convert Toolkit's icons/autocomplete-search.svg to use context paint to improve performance. r=dao https://hg.mozilla.org/integration/mozilla-inbound/rev/d8fcfead17d1 Convert Toolkit's extensions/utilities.svg to use context paint to improve performance. r=dao
Keywords: leave-open
Note these patches require the patch from bug 1359762 to work.
Comment on attachment 8862961 [details] Bug 1359631 - Convert Toolkit's narrate/back.svg to use context paint to improve performance. https://reviewboard.mozilla.org/r/134820/#review139612 ::: toolkit/themes/shared/narrateControls.css:59 (Diff revision 1) > border-top-right-radius: 3px; > background-image: url("chrome://global/skin/narrate/forward.svg#enabled"); > } > > #narrate-skip-previous:disabled { > - background-image: url("chrome://global/skin/narrate/back.svg#disabled"); > + fill: rgb(128 128 128 / 50%); Wow, I hadn't seen this notation before. The "/" is confusing, as 1 / 50% == 200% :(
Attachment #8862961 - Flags: review?(dao+bmo) → review+
Comment on attachment 8862962 [details] Bug 1359631 - Convert Toolkit's narrate/forward.svg to use context paint to improve performance. https://reviewboard.mozilla.org/r/134822/#review139614 ::: toolkit/themes/shared/narrateControls.css:65 (Diff revision 1) > #narrate-skip-previous:disabled { > fill: rgb(128 128 128 / 50%); > } > > #narrate-skip-next:disabled { > - background-image: url("chrome://global/skin/narrate/forward.svg#disabled"); > + fill: rgb(128 128 128 / 50%); Please merge this with the previous rule.
Attachment #8862962 - Flags: review?(dao+bmo) → review+
Comment on attachment 8862963 [details] Bug 1359631 - Convert Toolkit's reader/RM-Close-24x24.svg to use context paint to improve performance. https://reviewboard.mozilla.org/r/134824/#review139616
Attachment #8862963 - Flags: review?(dao+bmo) → review+
Pushed by jwatt@jwatt.org: https://hg.mozilla.org/integration/mozilla-inbound/rev/36f3300731f1 Convert Toolkit's media/pauseButton.svg to use context paint to improve performance. r=dao https://hg.mozilla.org/integration/mozilla-inbound/rev/dc27c1db27f5 Convert Toolkit's media/playButton.svg to use context paint to improve performance. r=dao https://hg.mozilla.org/integration/mozilla-inbound/rev/7522e1fc66dd Convert Toolkit's narrate/back.svg to use context paint to improve performance. r=dao https://hg.mozilla.org/integration/mozilla-inbound/rev/cf0ab8d3d5bd Convert Toolkit's narrate/forward.svg to use context paint to improve performance. r=dao https://hg.mozilla.org/integration/mozilla-inbound/rev/7d7c2780cbeb Convert Toolkit's reader/RM-Close-24x24.svg to use context paint to improve performance. r=dao
Keywords: leave-open
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: