Bug 1383650 Comment 13 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

Implementing CSS property for `x`, I think there are these steps:

1. Add an entry at servo/components/style/properties/longhands/inherited_svg.mako.rs, and layout/style/nsStyleStruct.h

2. Map SVG attribute to CSS by overriding `IsAttributeMapped()`, so that a value set in SVG will be known by CSS part.

3. Override `DidSetComputedStyle` for the frame, so that we are aware of the CSS change.

The cursory WIP patch seems to be working fine on my local machine, and the CSS transition stuff works just automatically...

Emilio, do you think there is anything I'm missing on the CSS part? In particular, I'd like to know:

1. Is `nsComputedDOMStyle::GetComputedStyleNoFlush` very cheap? Is it better to store the CSS value in the SVG element then update them when `DidSetComputedStyle`?

2. I have to add `X_CONTEXT` constant in `nsStyleStruct.h`, otherwise it doesn't compile. But it's meaningless for `x`... Do we need to update some Rust code so that we don't need to declare this constant?

Thanks!
Implementing CSS property for `x`, I think there are these steps:

1. Add an entry at `servo/components/style/properties/longhands/inherited_svg.mako.rs`, and `layout/style/nsStyleStruct.h`

2. Map SVG attribute to CSS by overriding `IsAttributeMapped()`, so that a value set in SVG will be known by CSS part.

3. Override `DidSetComputedStyle` for the frame, so that we are aware of the CSS change.

The cursory WIP patch seems to be working fine on my local machine, and the CSS transition stuff works just automatically...

Emilio, do you think there is anything I'm missing on the CSS part? In particular, I'd like to know:

1. Is `nsComputedDOMStyle::GetComputedStyleNoFlush` very cheap? Is it better to store the CSS value in the SVG element then update them when `DidSetComputedStyle`?

2. I have to add `X_CONTEXT` constant in `nsStyleStruct.h`, otherwise it doesn't compile. But it's meaningless for `x`... Do we need to update some Rust code so that we don't need to declare this constant?

Thanks!

Back to Bug 1383650 Comment 13