servo: Merge #17549 - Make '-moz-context-properties' support 'fill-opacity' and 'stroke-opacity' (from KuoE0:make-moz-context-properties-support-fill-opacity-and-stroke-opacity); r=heycam

Enable 'fill-opacity' and 'stroke-opacity' for '-moz-context-properties' to make the context-{fill|stroke}-opacity work in SVG-as-an-image.

---
<!-- 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
- [x] These changes fix [Bug 1373159](https://bugzilla.mozilla.org/show_bug.cgi?id=1373159)

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because the test cases will be added in gecko.

<!-- 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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 9d1b26de1f24e4183ecf0c8aa4957aec9674d1f9

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 3d0b906c394c8671bf05e3d1f92dcedbf5047da2
This commit is contained in:
KuoE0 2017-06-28 13:01:32 -07:00
Родитель d25f611706
Коммит 3b9e52d365
1 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -4021,6 +4021,10 @@ clip-path
self.gecko.mContextPropsBits |= structs::NS_STYLE_CONTEXT_PROPERTY_FILL as u8;
} else if servo.0 == atom!("stroke") {
self.gecko.mContextPropsBits |= structs::NS_STYLE_CONTEXT_PROPERTY_STROKE as u8;
} else if servo.0 == atom!("fill-opacity") {
self.gecko.mContextPropsBits |= structs::NS_STYLE_CONTEXT_PROPERTY_FILL_OPACITY as u8;
} else if servo.0 == atom!("stroke-opacity") {
self.gecko.mContextPropsBits |= structs::NS_STYLE_CONTEXT_PROPERTY_STROKE_OPACITY as u8;
}
unsafe { gecko.set_raw_from_addrefed::<structs::nsIAtom>(servo.0.into_addrefed()) }
}