mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Auto merge of #16665 - longsonr:1347409, r=heycam,emilio
Servo changes for bug 1347409 bug 1347409 is introducing a fallback type for SVG paint servers so that we can distinguish between url(something) and url(something) none and serialise those cases correctly. When we get a url(something) color we need to set the mFallbackType to eStyleSVGFallbackType_Color. This change has already been reviewed in https://bugzilla.mozilla.org/show_bug.cgi?id=1347409 --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [X] These changes do not require tests because they are covered by tests that will land in gecko as part of the rest of the patch there. <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16665) <!-- Reviewable:end -->
This commit is contained in:
commit
c71d97ae5e
3 changed files with 30 additions and 2 deletions
|
@ -395,6 +395,7 @@ fn color_to_nscolor_zero_currentcolor(color: Color) -> structs::nscolor {
|
|||
pub fn set_${ident}(&mut self, mut v: longhands::${ident}::computed_value::T) {
|
||||
use values::computed::SVGPaintKind;
|
||||
use self::structs::nsStyleSVGPaintType;
|
||||
use self::structs::nsStyleSVGFallbackType;
|
||||
|
||||
let ref mut paint = ${get_gecko_property(gecko_ffi_name)};
|
||||
unsafe {
|
||||
|
@ -423,6 +424,7 @@ fn color_to_nscolor_zero_currentcolor(color: Color) -> structs::nscolor {
|
|||
}
|
||||
|
||||
if let Some(fallback) = fallback {
|
||||
paint.mFallbackType = nsStyleSVGFallbackType::eStyleSVGFallbackType_Color;
|
||||
paint.mFallbackColor = color_to_nscolor_zero_currentcolor(fallback);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue