Auto merge of #9503 - glennw:fix-text-node-opacity, r=pcwalton

Ensure that text nodes don't inherit opacity.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9503)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-02-04 09:46:49 +05:30
commit a9f6ab2153
4 changed files with 71 additions and 0 deletions

View file

@ -6958,6 +6958,12 @@ pub fn modify_style_for_text(style: &mut Arc<ComputedValues>) {
padding.padding_bottom = computed::LengthOrPercentage::Length(Au(0));
padding.padding_left = computed::LengthOrPercentage::Length(Au(0));
}
if style.effects.opacity != 1.0 {
let mut style = Arc::make_mut(style);
let mut effects = Arc::make_mut(&mut style.effects);
effects.opacity = 1.0;
}
}
/// Adjusts the `margin` property as necessary to account for the text of an `input` element.