Auto merge of #16510 - mrobinson:establishes-3d-context, r=jdm

Remove StackingContext::establishes_3d_context

This member is now unused since WebRender is the only display backend.

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because they do not change behavior.

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16510)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-04-18 03:43:15 -05:00 committed by GitHub
commit 3e1f4fdc9a
2 changed files with 4 additions and 15 deletions

View file

@ -373,9 +373,6 @@ pub struct StackingContext {
/// The perspective matrix to be applied to children.
pub perspective: Option<Matrix4D<f32>>,
/// Whether this stacking context creates a new 3d rendering context.
pub establishes_3d_context: bool,
/// The scroll policy of this layer.
pub scroll_policy: ScrollPolicy,
@ -395,7 +392,6 @@ impl StackingContext {
blend_mode: mix_blend_mode::T,
transform: Option<Matrix4D<f32>>,
perspective: Option<Matrix4D<f32>>,
establishes_3d_context: bool,
scroll_policy: ScrollPolicy,
parent_scroll_id: ScrollRootId)
-> StackingContext {
@ -409,7 +405,6 @@ impl StackingContext {
blend_mode: blend_mode,
transform: transform,
perspective: perspective,
establishes_3d_context: establishes_3d_context,
scroll_policy: scroll_policy,
parent_scroll_id: parent_scroll_id,
}
@ -426,7 +421,6 @@ impl StackingContext {
mix_blend_mode::T::normal,
None,
None,
true,
ScrollPolicy::Scrollable,
ScrollRootId::root())
}

View file

@ -47,9 +47,8 @@ use std::default::Default;
use std::mem;
use std::sync::Arc;
use style::computed_values::{background_attachment, background_clip, background_origin};
use style::computed_values::{background_repeat, background_size, border_style};
use style::computed_values::{cursor, image_rendering, overflow_x};
use style::computed_values::{pointer_events, position, transform_style, visibility};
use style::computed_values::{background_repeat, background_size, border_style, cursor};
use style::computed_values::{image_rendering, overflow_x, pointer_events, position, visibility};
use style::computed_values::filter::Filter;
use style::computed_values::text_shadow::TextShadow;
use style::logical_geometry::{LogicalPoint, LogicalRect, LogicalSize, WritingMode};
@ -58,8 +57,8 @@ use style::properties::longhands::border_image_repeat::computed_value::RepeatKey
use style::properties::style_structs;
use style::servo::restyle_damage::REPAINT;
use style::values::{Either, RGBA, computed};
use style::values::computed::{AngleOrCorner, Gradient, GradientKind, LengthOrPercentage, LengthOrPercentageOrAuto};
use style::values::computed::NumberOrPercentage;
use style::values::computed::{AngleOrCorner, Gradient, GradientKind, LengthOrPercentage};
use style::values::computed::{LengthOrPercentageOrAuto, NumberOrPercentage};
use style::values::specified::{HorizontalDirection, VerticalDirection};
use style_traits::CSSPixel;
use style_traits::cursor::Cursor;
@ -1685,9 +1684,6 @@ impl FragmentDisplayListBuilding for Fragment {
filters.push(Filter::Opacity(effects.opacity))
}
let transform_style = self.style().get_used_transform_style();
let establishes_3d_context = transform_style == transform_style::T::flat;
let context_type = match mode {
StackingContextCreationMode::PseudoFloat => StackingContextType::PseudoFloat,
StackingContextCreationMode::PseudoPositioned => StackingContextType::PseudoPositioned,
@ -1703,7 +1699,6 @@ impl FragmentDisplayListBuilding for Fragment {
self.style().get_effects().mix_blend_mode,
self.transform_matrix(&border_box),
self.perspective_matrix(&border_box),
establishes_3d_context,
scroll_policy,
parent_scroll_id)
}