Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow Gecko FFI functions for color parsing to report errors #19490

Merged
merged 5 commits into from Dec 5, 2017
Next

geckolib: Return from Servo_ComputeColor whether the value was curren…

…tcolor.
  • Loading branch information
heycam committed Dec 5, 2017
commit 393ab5ab1e9fa4a26dfdb985af1036eb199d9ea3
@@ -4577,6 +4577,7 @@ pub extern "C" fn Servo_ComputeColor(
current_color: structs::nscolor,
value: *const nsAString,
result_color: *mut structs::nscolor,
was_current_color: *mut bool,
) -> bool {
use style::gecko;

@@ -4611,6 +4612,11 @@ pub extern "C" fn Servo_ComputeColor(
Some(computed_color) => {
let rgba = computed_color.to_rgba(current_color);
*result_color = gecko::values::convert_rgba_to_nscolor(&rgba);
if !was_current_color.is_null() {
unsafe {
*was_current_color = computed_color.is_currentcolor();
}
}
true
}
None => false,
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.