webcompat / testcase-reducer

An addon helping to reduce test-cases from live pages.
6 stars 3 forks source link

Address the loss of correct CSS prefixes caused by bz1790896 #20

Closed wisniewskit closed 2 years ago

wisniewskit commented 2 years ago

Firefox treats prefixed CSS which is being emulated for web compatibility in ways which make it impossible for Testcase Reducer unable to know if the original stylesheet had a webkit or moz prefix, since it uses the CSSOM to get the property names.

For instance, see the results of running on the HTML element on this attachment and note that it think -moz-box-orient was in the original stylesheet, not -webkit-box-orient).

This caused by bz1790896, which is not going to be fixed as it's wasteful and overcomplicates the core code.

We can work around this by reading the raw CSS text and parsing it ourselves. We will no longer need the selector parser library if we do this, and could unlock some future abilities, but it will mean writing our own simplified parser for full stylesheets.