Closed Bug 1363346 Opened 7 years ago Closed 7 years ago

Use SVG context-fill instead of clip-path for animation-fast-track.svg

Categories

(DevTools :: Inspector: Animations, enhancement, P3)

enhancement

Tracking

(firefox56 fixed)

RESOLVED FIXED
Firefox 56
Tracking Status
firefox56 --- fixed

People

(Reporter: ntim, Assigned: Towkir, Mentored)

Details

(Keywords: good-first-bug)

Attachments

(1 file, 1 obsolete file)

in https://dxr.mozilla.org/mozilla-central/source/devtools/client/themes/animationinspector.css#459 :
-moz-context-properties: fill;
fill: (...)

then in the SVG:

<!-- This Source Code Form is subject to the terms of the Mozilla Public
   - License, v. 2.0. If a copy of the MPL was not distributed with this
   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 9 12" width="16" height="16">
  <path d="M5.75 0l-1 5.5 2 .5-3.5 6 1-5-2-.5z" fill="context-fill"/>
</svg>
Mentor: ntim.bugs
Keywords: good-first-bug
Priority: -- → P3
Assignee: nobody → 3ugzilla
Status: NEW → ASSIGNED
Attached patch svg-context-fill.patch (obsolete) — Splinter Review
Looks good on my local build, hope it works ;)
Attachment #8880275 - Flags: review?(ntim.bugs)
Comment on attachment 8880275 [details] [diff] [review]
svg-context-fill.patch

Review of attachment 8880275 [details] [diff] [review]:
-----------------------------------------------------------------

::: devtools/client/themes/animationinspector.css
@@ +475,3 @@
>  }
>  
>  .animation-timeline .some-properties .name::after {

I know it wasn't part of the bug initially, but the rules on .animation-timeline .some-properties .name::after and .animation-timeline .all-properties .name::after are identical.

Can you remove this block, and just share the selector ?

.animation-timeline .all-properties .name::after,
.animation-timeline .some-properties .name::after {
  -moz-context-properties: fill;
  ...
}
Attachment #8880275 - Flags: review?(ntim.bugs) → feedback+
Thanks for working on this btw, the patch works great!
Comment on attachment 8880275 [details] [diff] [review]
svg-context-fill.patch

Review of attachment 8880275 [details] [diff] [review]:
-----------------------------------------------------------------

::: devtools/client/themes/animationinspector.css
@@ +469,5 @@
>  
>  .animation-timeline .all-properties .name::after {
> +  -moz-context-properties: fill;
> +  fill: var(--theme-content-color3);
> +  background-image: url(images/animation-fast-track.svg#thunderbolt);

Oh, I almost forgot, can you remove #thunderbolt from the URL ? #thunderbolt references to the old clip path, that's now removed.
Should I nit the code like this ?:
> background-image: url("images/animation-fast-track.svg");

I am talking about the quotation, currently there is no quotes.
Flags: needinfo?(ntim.bugs)
However, I have made the changes. Please have a look.
Attachment #8880275 - Attachment is obsolete: true
Attachment #8882161 - Flags: review?(ntim.bugs)
(In reply to [:Towkir] Ahmed from comment #5)
> Should I nit the code like this ?:
> > background-image: url("images/animation-fast-track.svg");
> 
> I am talking about the quotation, currently there is no quotes.

I don't mind either way to be honest.
Flags: needinfo?(ntim.bugs)
Comment on attachment 8882161 [details] [diff] [review]
svg-context-fill.patch

Review of attachment 8882161 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good to me!
Attachment #8882161 - Flags: review?(ntim.bugs) → review+
Keywords: checkin-needed
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/aab62d15c1ca
Use SVG context-fill instead of clip-path for animation-fast-track.svg now. r=ntim
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/aab62d15c1ca
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 56
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: