diff options
author | Cameron McCormack <cam@mcc.id.au> | 2017-11-24 11:28:34 +0800 |
---|---|---|
committer | Cameron McCormack <cam@mcc.id.au> | 2017-11-26 10:55:37 +0800 |
commit | cbba980a8b57f11cf3ac77362f5626aeff66df0b (patch) | |
tree | 8ee305fc9cacac6672b87f83072d384a51813966 /ports | |
parent | 3f0ccd0fef1ad108a22c731e399aa815d0af5441 (diff) | |
download | servo-cbba980a8b57f11cf3ac77362f5626aeff66df0b.tar.gz servo-cbba980a8b57f11cf3ac77362f5626aeff66df0b.zip |
geckolib: Return from Servo_ComputeColor whether the value was currentcolor.
MozReview-Commit-ID: CwOJrfBG12J
Diffstat (limited to 'ports')
-rw-r--r-- | ports/geckolib/glue.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ports/geckolib/glue.rs b/ports/geckolib/glue.rs index c0b60adaad5..f7733b37516 100644 --- a/ports/geckolib/glue.rs +++ b/ports/geckolib/glue.rs @@ -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; @@ -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, |