Open Bug 1809045 Opened 2 years ago Updated 3 months ago

[Inactive CSS] Several properties are incorrectly marked as not applying to :visited

Categories

(DevTools :: Inspector: Rules, defect, P2)

defect

Tracking

(Not tracked)

ASSIGNED

People

(Reporter: Oriol, Assigned: sebo)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file)

https://searchfox.org/mozilla-central/rev/0947c440956c648b853cf79a4737b282396abf09/devtools/server/actors/utils/inactive-property-helper.js#22-47

const VISITED_INVALID_PROPERTIES = allCssPropertiesExcept([
  "all",
  "color",
  "background",
  "background-color",
  "border",
  "border-color",
  "border-bottom-color",
  "border-left-color",
  "border-right-color",
  "border-top-color",
  "border-block",
  "border-block-color",
  "border-block-start-color",
  "border-block-end-color",
  "border-inline",
  "border-inline-color",
  "border-inline-start-color",
  "border-inline-end-color",
  "column-rule",
  "column-rule-color",
  "outline",
  "outline-color",
  "text-decoration-color",
  "text-emphasis-color",
]);

This list is lacking some longhands (see https://searchfox.org/mozilla-central/rev/0947c440956c648b853cf79a4737b282396abf09/servo/components/style/properties/properties.mako.rs#944-965):

  "-webkit-text-fill-color",
  "-webkit-text-stroke-color",
  "caret-color",
  "fill",
  "stroke",

It's also lacking some shorthands:

  "-webkit-text-stroke",
  "border-block-start",
  "border-block-end",
  "border-inline-start",
  "border-inline-end",
  "border-top",
  "border-right",
  "border-bottom",
  "border-left",
  "text-decoration",
  "text-emphasis-color",

And some aliases:

  "-moz-border-start",
  "-moz-border-start-color",
  "-moz-border-end",
  "-moz-border-end-color",

It would be good if shorthands and aliases were automatically handled from the longhands (bug 1608993), and the longhands were obtained from servo.

Thanks for the report Oriol, do you want to take this bug by any chance?

Severity: -- → S3
Flags: needinfo?(oriol-bugzilla)
Priority: -- → P2

I won't have time to write a proper solution that generates the list automatically.

Flags: needinfo?(oriol-bugzilla)

All properties missing from the whitelist for styles allowed for visited links were added manually.

An automatic generation of the list of allowed properties (or at least of shorthands and aliases) is covered by bug 1608993.

Assignee: nobody → sebastianzartner
Status: NEW → ASSIGNED

I've simply added the missing properties to the list, so they are not incorrectly marked as invalid anymore.

The proper solution, which generates the list automatically, should be done in bug 1608993, maybe the Servo part for the longhands there, too, or in a new bug.

Sebastian

There is an r+ patch which didn't land and no activity in this bug for 2 weeks.
:sebo, could you have a look please?
If you still have some work to do, you can add an action "Plan Changes" in Phabricator.
For more information, please visit BugBot documentation.

Flags: needinfo?(sebastianzartner)
Flags: needinfo?(nchevobbe)

Oops, I think sebo was waiting for an answer on Phabricator. I replied there

Flags: needinfo?(sebastianzartner)
Flags: needinfo?(nchevobbe)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: