Skip to content

Commit

Permalink
stylo: Use saturating subtraction for script level
Browse files Browse the repository at this point in the history
  • Loading branch information
Manishearth committed Sep 6, 2017
1 parent c063ff8 commit e4de8d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/style/properties/gecko.mako.rs
Expand Up @@ -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);
Expand Down

0 comments on commit e4de8d1

Please sign in to comment.