Closed Bug 1637632 Opened 4 years ago Closed 4 years ago

Create a Compatibility actor

Categories

(DevTools :: Inspector: Rules, task, P3)

task

Tracking

(firefox79 fixed)

RESOLVED FIXED
Firefox 79
Tracking Status
firefox79 --- fixed

People

(Reporter: mtigley, Assigned: lelouch.cpp)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Create another property called includeCompatiblityIssues on the options argument for PageStyleActor’s getApplied
That way, the computation for CSS issues will be in one place rather than duplicating logic that’s in the Compatibility panel’s _getNodeIssues

Additional items this issue should address, but we can separate these as separate patches.

• Refactor _getNodesIssues to use the new list of CSS compat warnings returned by getApplied
• Access the target browsers list on the server-side (or pass this is an option from the client).

Summary: Extend getApplied() to take an option for getting the CSS compatibility issues → Create a Compatibility actor

Based on discussions in the public Slack channel, we'll be creating a Compatibility Actor for use by both the Compatibility and CSS Rules panel. For now, we'll only worry about adding a methods that gets the CSS browser compat warnings.

This patch creates a CompatibilityActor and exposes it using
the IspectorActor via the InspectorFront.
To check the correctness this patch replaces the call to the
MDNCompatibility with the call to compatibility.getNodeCssIssues
which is a direct encapsulation for the pageStyle.getApplied() +
MDNCompatibility call.

Current Status:
The compatibility actor works only when:

  • The issues is text-style-adjust
  • The element with the issus is in focus
  • All CSS issues panel is always empty

To test the above behavior one can visit https://duckduckgo.com/
and focus on the out HTML element in the inspector panel

Attachment #9152083 - Attachment description: Bug 1637632 - WIP: Create a compatibility actor r=mtigley,daisuke → Bug 1637632 - Create a compatibility actor and connect it to Inspector's Compatibility panel r=mtigley,daisuke,rcaliman
Blocks: 1643961

Added browser test for CompatibilityActor to check consistency and
correctness.
Thse test include:

  • Test for no issue
  • Test for simple issue
  • Test for invalid CSS rule
  • Test for aliases
  • Test for browser specific issues
  • Test for multiple issues for same element

Depends on D77060

Pushed by mtigley@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/bbe4cf873819
Create a compatibility actor and connect it to Inspector's Compatibility panel r=mtigley,daisuke,devtools-backward-compat-reviewers
https://hg.mozilla.org/integration/autoland/rev/62d50af432bb
Add browser tests for the CompatibilityActor r=mtigley,daisuke
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 79
Regressions: 1630176
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: