Skip to content
Permalink
Browse files

stylo: Use saturating subtraction for script level

  • Loading branch information
Manishearth committed Sep 6, 2017
1 parent c063ff8 commit e4de8d10a65a51333f76b1b57f8d89e33fb01661
Showing with 1 addition and 1 deletion.
  1. +1 −1 components/style/properties/gecko.mako.rs
@@ -2341,7 +2341,7 @@ fn static_assert() {
pub fn calculate_script_level_size(&self, parent: &Self, device: &Device) -> (Au, Au) {
use std::cmp;

let delta = self.gecko.mScriptLevel - parent.gecko.mScriptLevel;
let delta = self.gecko.mScriptLevel.saturating_sub(parent.gecko.mScriptLevel);

let parent_size = Au(parent.gecko.mSize);
let parent_unconstrained_size = Au(parent.gecko.mScriptUnconstrainedSize);

0 comments on commit e4de8d1

Please sign in to comment.
You can’t perform that action at this time.