Closed Bug 1553194 Opened 7 years ago Closed 7 years ago

CssLogic Maintenance

Categories

(DevTools :: General, task, P3)

task

Tracking

(firefox69 fixed)

RESOLVED FIXED
Firefox 69
Tracking Status
firefox69 --- fixed

People

(Reporter: rcaliman, Assigned: rcaliman)

Details

Attachments

(2 files)

Miscellaneous maintenance in CssLogic and associated files:

  • remove obsolete code
  • fix comments

isInherited is a callback function that checks if a given CSS property is inherited. It is misleadingly commented as a cache of inherited properties (which perhaps it is on the InspectorUtils implementation, but on the consumer side it is just a function).

The actual call is done by InspectorUtils.isPropertyInherited. There is no need to pass the handler to CssLogic or to CssPropertyInfo since InspectorUtils is available in the same context as the definition of the consumers.

There is no other use case where a custom handler is passed to check for inherited properties in so it is safe to remove this as an argument and just use InspectorUtils.isPropertyInherited where needed. This cleans up the code slightly.

Depends on D32016
The code comment is perhaps a leftover from a file duplication to extract shared methods to shared/inspector/css-logic.js from server/actors/inspector/css-logic.js.

The comment is confusing because there is no usage of any of the CssLogic terminology within the file.

Pushed by rcaliman@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e24c48157bf1 Remove unnecessary isInherited from CssLogic constructor. r=pbro https://hg.mozilla.org/integration/autoland/rev/e61c315b780d Remove unrelated code comment from shared/css-logic.js r=pbro
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 69
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: