Skip to content

Commit

Permalink
geckolib: Return from Servo_ComputeColor whether the value was curren…
Browse files Browse the repository at this point in the history
…tcolor.

MozReview-Commit-ID: CwOJrfBG12J
  • Loading branch information
heycam committed Nov 26, 2017
1 parent 3f0ccd0 commit cbba980
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ports/geckolib/glue.rs
Expand Up @@ -4559,6 +4559,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;

Expand Down Expand Up @@ -4593,6 +4594,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,
Expand Down

0 comments on commit cbba980

Please sign in to comment.