35 | | One last piece that you have to do is to allow for getComputedStyle() to work. There is a function, ComputedStyleExtractor::propertyValue() which inspects a RenderStyle and constructs a CSSValue for a given property. Because of this, your property must be round-trippable through RenderStyle. This function switches over the property to extract, and each one has a stanza where the RenderStyle is inspected and the resulting CSSValue is built up. |
| 35 | There are a couple other follow-up pieces you will also need to do: |
| 36 | |
| 37 | One extra piece that you have to do is to allow for getComputedStyle() to work. There is a function, ComputedStyleExtractor::propertyValue() which inspects a RenderStyle and constructs a CSSValue for a given property. Because of this, your property must be round-trippable through RenderStyle. This function switches over the property to extract, and each one has a stanza where the RenderStyle is inspected and the resulting CSSValue is built up. |
| 38 | |
| 39 | Another extra piece comes into play when style changes. We have machinery which partitions all our properties into properties which require layout, properties which require repainting, properties which require recompositing, etc. When a property changes, we inspect this partitioning to decide which operations we need to perform as a result of the style change. You can add this partitioning information about your new property in RenderStyle::diff(). |