Closed
Bug 1201136
Opened 10 years ago
Closed 10 years ago
Inspector doesn't support the currentColor keyword
Categories
(DevTools :: Inspector, defect)
DevTools
Inspector
Tracking
(firefox43 fixed)
RESOLVED
FIXED
Firefox 43
Tracking | Status | |
---|---|---|
firefox43 | --- | fixed |
People
(Reporter: canuckistani, Assigned: tromey)
Details
Attachments
(3 files, 1 obsolete file)
2.46 MB,
image/gif
|
Details | |
10.38 KB,
patch
|
heycam
:
review+
|
Details | Diff | Splinter Review |
2.55 KB,
patch
|
tromey
:
review+
|
Details | Diff | Splinter Review |
This seems like a validation problem in the ruleview, see attached .gif.
STR:
Apply the rule `background-color: currentColor` to any element.
ER: the currentColor value should be visible
AR: it's invisible! The color however is actually applied and the markupview is updated.
Aside: currentColor is a valid keyword for color-related rules, it should probably also be added to the autocomplete list of named colors you see in the .gif.
Assignee | ||
Comment 1•10 years ago
|
||
I think the bug is in output-parser.js.
_appendColor returns a boolean but nothing ever checks it.
It seems I introduced this.
Assignee: nobody → ttromey
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•10 years ago
|
||
inDOMUtils doesn't include "currentColor" in its list of completions (it just
gives the list from nsColorNameList.h, which includes "transparent"); but
there is a catch-all to add "inherit", "initial", and "unset". So "currentColor"
seems to be the only missing one.
Comment 3•10 years ago
|
||
We should also check (maybe another bug) what it would take to show the color swatch next to currentColor, knowing that it's a dynamic variable that depends on the inherited value of color, so we might need to do some tricky refreshing.
Assignee | ||
Comment 4•10 years ago
|
||
This patch fixes the completion problem; and updates
test_is_valid_css_color.html to cover the "transparent" and
"currentColor" cases for good measure.
This doesn't fix the entire problem.
Assignee | ||
Comment 5•10 years ago
|
||
(In reply to Patrick Brosset [:pbrosset] [:pbro] from comment #3)
> We should also check (maybe another bug) what it would take to show the
> color swatch next to currentColor, knowing that it's a dynamic variable that
> depends on the inherited value of color, so we might need to do some tricky
> refreshing.
Totally agreed; to me this sounds like bug 1102464.
Assignee | ||
Comment 6•10 years ago
|
||
Fix output-parser to keep the text when a color swatch isn't
appropriate.
Assignee | ||
Updated•10 years ago
|
Attachment #8656138 -
Flags: review?(cam)
Assignee | ||
Updated•10 years ago
|
Attachment #8656147 -
Flags: review?(bgrinstead)
Updated•10 years ago
|
Attachment #8656138 -
Flags: review?(cam) → review+
Assignee | ||
Comment 7•10 years ago
|
||
Comment 8•10 years ago
|
||
Comment on attachment 8656147 [details] [diff] [review]
make output-parser correctly handle special color values
Review of attachment 8656147 [details] [diff] [review]:
-----------------------------------------------------------------
::: browser/devtools/shared/test/browser_outputparser.js
@@ +99,5 @@
> "blur(1px) drop-shadow(0 0 0 ",
> {name: "blue", value: "#00F"},
> + ") url(\"red.svg#blue\")</span></span>"]),
> +
> + makeColorTest("color", "currentColor", ["currentColor"])
Uber nit: if you add a comma at the end of this line then it's blame won't be affected when the next test case is added.
Attachment #8656147 -
Flags: review?(bgrinstead) → review+
Assignee | ||
Comment 9•10 years ago
|
||
Updated per review.
Attachment #8656147 -
Attachment is obsolete: true
Assignee | ||
Updated•10 years ago
|
Attachment #8656725 -
Flags: review+
Assignee | ||
Updated•10 years ago
|
Keywords: checkin-needed
Comment 10•10 years ago
|
||
https://hg.mozilla.org/integration/fx-team/rev/5c6c10173e6e
https://hg.mozilla.org/integration/fx-team/rev/d9b48d545c2b
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/5c6c10173e6e
https://hg.mozilla.org/mozilla-central/rev/d9b48d545c2b
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 43
Comment 12•10 years ago
|
||
Note also the comment from a while ago in bug 927367, that system colors like ActiveBorder, ActiveCaption, etc. are also missing from auto-completion. Certainly not as big a deal, given their obscurity and that they still show in the rule view. In fact, maybe one does not even want to surface them in auto-completion...
Assignee | ||
Comment 13•10 years ago
|
||
(In reply to Simon Lindholm from comment #12)
> Note also the comment from a while ago in bug 927367, that system colors
> like ActiveBorder, ActiveCaption, etc. are also missing from
> auto-completion. Certainly not as big a deal, given their obscurity and that
> they still show in the rule view. In fact, maybe one does not even want to
> surface them in auto-completion...
Yes, I talked to Patrick about this and I think we don't want to expose these.
So I am going to close that bug as well.
Updated•7 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•