I am trying to compile the properties prefixed by -apple-
and -khtml-
which are/were supported by WebKit and since which version they were eventually dropped or introduced.
What are the limitations imposed on them? For example can you find them in document.body.style
?
I guess only someone in the know like the reporter of this bug could provide us an accurate list. But I prefer asking here first this way everyone will benefit from it…
A good place to start your investigation is this revision.
Introduction
The problem is not quite as simple as you might think. It is easy enough to compare revisions of the "official" list of supported CSS properties and determine the revisions at which they were introduced or retired; however, support for the use of legacy prefixes is also determined by how they are handled by the CSS parser implementation. Thus, you should consult both the timeline and the full list of legacy prefixed properties below to determine how support is handled in a given WebKit revision.
Timeline of parser changes relating to legacy property support
-apple
(and briefly-moz
!) will be normalized to-khtml
behind the scenes.-webkit
added as an alternative to-khtml
.-webkit
properties will work with legacy prefixes (i.e.-apple
and-khtml
are normalized to-webkit
). All remaining legacy prefixes were updated to-webkit
in this revision.CSSGrammar.y
toCSSParser.cpp
.-apple-dashboard-region
and-apple-line-clamp
.-webkit
properties work with legacy prefixes again. (Previous change reverted.)List of legacy properties and revisions introduced/retired
The list below has been gathered from the commit history for the list of supported properties. The first number is the revision in which support for this property was added to the list; the second is the revision in which it was removed. No distinction is made between a property being renamed as opposed to being dropped outright.
The properties removed in r13874 lived on for some time under the
-webkit
prefix, so the legacy prefixes might continue to work depending upon how they are handled by the parser. (See the timeline above for more details.)* Although deprecated,
-khtml-opacity
—and later-webkit-opacity
—was honoured by the parser right up until CSSProperties.in introduced support for aliases in r85212, and remains available as-webkit-opacity
to the latest revision.A couple of
-konq
prefixed properties were supported in very early revisions:The story today
Since r13874, the WebKit CSS parser simply normalized any legacy prefixes to
-webkit
. Essentially, all-webkit
prefixed properties worked with the-apple
or-khtml
prefixes:(This also explains why you cannot iterate through these properties in
document.body.style
—those properties have been replaced by the parser with the corresponding-webkit
property.)Peter Beverloo suggested that support for these properties should be removed or phased out For a brief time all legacy properties were disabled, with the exception of
-apple-dashboard-region
and-apple-line-clamp
, but this was reverted mere days later because of myriad compatibility issues. In newer revisions, the legacy-apple
and-khtml
prefixes are disabled unless built withENABLE(LEGACY_CSS_VENDOR_PREFIXES)
. When this feature flag is enabled, the parser permits the older behaviour outlined above.