mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Update WR (transaction API change)
This commit is contained in:
parent
c2d3f2a40f
commit
823f3e2eb1
11 changed files with 56 additions and 87 deletions
|
@ -73,8 +73,8 @@ use style_traits::cursor::CursorKind;
|
|||
use table_cell::CollapsedBordersForCell;
|
||||
use webrender_api::{self, BorderRadius, BorderSide, BoxShadowClipMode, ColorF, ExternalScrollId};
|
||||
use webrender_api::{FilterOp, GlyphInstance, ImageRendering, LayoutRect, LayoutSize};
|
||||
use webrender_api::{LayoutTransform, LayoutVector2D, LineStyle, NormalBorder, ScrollPolicy};
|
||||
use webrender_api::{ScrollSensitivity, StickyOffsetBounds};
|
||||
use webrender_api::{LayoutTransform, LayoutVector2D, LineStyle, NormalBorder, ScrollSensitivity};
|
||||
use webrender_api::StickyOffsetBounds;
|
||||
|
||||
fn establishes_containing_block_for_absolute(
|
||||
flags: StackingContextCollectionFlags,
|
||||
|
@ -760,7 +760,6 @@ pub trait FragmentDisplayListBuilding {
|
|||
&self,
|
||||
id: StackingContextId,
|
||||
base_flow: &BaseFlow,
|
||||
scroll_policy: ScrollPolicy,
|
||||
context_type: StackingContextType,
|
||||
established_reference_frame: Option<ClipScrollNodeIndex>,
|
||||
parent_clipping_and_scrolling: ClippingAndScrolling,
|
||||
|
@ -1887,7 +1886,6 @@ impl FragmentDisplayListBuilding for Fragment {
|
|||
&self,
|
||||
id: StackingContextId,
|
||||
base_flow: &BaseFlow,
|
||||
scroll_policy: ScrollPolicy,
|
||||
context_type: StackingContextType,
|
||||
established_reference_frame: Option<ClipScrollNodeIndex>,
|
||||
parent_clipping_and_scrolling: ClippingAndScrolling,
|
||||
|
@ -1931,7 +1929,6 @@ impl FragmentDisplayListBuilding for Fragment {
|
|||
self.transform_matrix(&border_box),
|
||||
self.style().get_used_transform_style().to_layout(),
|
||||
self.perspective_matrix(&border_box),
|
||||
scroll_policy,
|
||||
parent_clipping_and_scrolling,
|
||||
established_reference_frame,
|
||||
)
|
||||
|
@ -2713,7 +2710,6 @@ impl BlockFlowDisplayListBuilding for BlockFlow {
|
|||
let new_context = self.fragment.create_stacking_context(
|
||||
self.base.stacking_context_id,
|
||||
&self.base,
|
||||
ScrollPolicy::Scrollable,
|
||||
stacking_context_type,
|
||||
None,
|
||||
parent_clipping_and_scrolling,
|
||||
|
@ -2747,7 +2743,6 @@ impl BlockFlowDisplayListBuilding for BlockFlow {
|
|||
let stacking_context = self.fragment.create_stacking_context(
|
||||
self.base.stacking_context_id,
|
||||
&self.base,
|
||||
ScrollPolicy::Scrollable,
|
||||
StackingContextType::Real,
|
||||
established_reference_frame,
|
||||
parent_clipping_and_scrolling,
|
||||
|
@ -2885,7 +2880,6 @@ impl InlineFlowDisplayListBuilding for InlineFlow {
|
|||
let stacking_context = fragment.create_stacking_context(
|
||||
fragment.stacking_context_id,
|
||||
&self.base,
|
||||
ScrollPolicy::Scrollable,
|
||||
StackingContextType::Real,
|
||||
None,
|
||||
state.current_clipping_and_scrolling,
|
||||
|
|
|
@ -26,8 +26,8 @@ use webrender_api::{BorderRadius, BorderWidths, BoxShadowClipMode, ClipMode, Col
|
|||
use webrender_api::{ComplexClipRegion, ExtendMode, ExternalScrollId, FilterOp, FontInstanceKey};
|
||||
use webrender_api::{GlyphInstance, GradientStop, ImageKey, ImageRendering, LayoutPoint};
|
||||
use webrender_api::{LayoutRect, LayoutSize, LayoutTransform, LayoutVector2D, LineStyle};
|
||||
use webrender_api::{MixBlendMode, NinePatchBorder, NormalBorder, ScrollPolicy, ScrollSensitivity};
|
||||
use webrender_api::{Shadow, StickyOffsetBounds, TransformStyle};
|
||||
use webrender_api::{MixBlendMode, NinePatchBorder, NormalBorder, ScrollSensitivity, Shadow};
|
||||
use webrender_api::{StickyOffsetBounds, TransformStyle};
|
||||
|
||||
pub use style::dom::OpaqueNode;
|
||||
|
||||
|
@ -203,9 +203,6 @@ pub struct StackingContext {
|
|||
/// The perspective matrix to be applied to children.
|
||||
pub perspective: Option<LayoutTransform>,
|
||||
|
||||
/// The scroll policy of this layer.
|
||||
pub scroll_policy: ScrollPolicy,
|
||||
|
||||
/// The clip and scroll info for this StackingContext.
|
||||
pub parent_clipping_and_scrolling: ClippingAndScrolling,
|
||||
|
||||
|
@ -227,7 +224,6 @@ impl StackingContext {
|
|||
transform: Option<LayoutTransform>,
|
||||
transform_style: TransformStyle,
|
||||
perspective: Option<LayoutTransform>,
|
||||
scroll_policy: ScrollPolicy,
|
||||
parent_clipping_and_scrolling: ClippingAndScrolling,
|
||||
established_reference_frame: Option<ClipScrollNodeIndex>,
|
||||
) -> StackingContext {
|
||||
|
@ -242,7 +238,6 @@ impl StackingContext {
|
|||
transform,
|
||||
transform_style,
|
||||
perspective,
|
||||
scroll_policy,
|
||||
parent_clipping_and_scrolling,
|
||||
established_reference_frame,
|
||||
}
|
||||
|
@ -261,7 +256,6 @@ impl StackingContext {
|
|||
None,
|
||||
TransformStyle::Flat,
|
||||
None,
|
||||
ScrollPolicy::Scrollable,
|
||||
ClippingAndScrolling::simple(ClipScrollNodeIndex::root_scroll_node()),
|
||||
None,
|
||||
)
|
||||
|
|
|
@ -7,9 +7,8 @@
|
|||
// This might be achieved by sharing types between WR and Servo display lists, or
|
||||
// completely converting layout to directly generate WebRender display lists, for example.
|
||||
|
||||
use display_list::items::{BorderDetails, ClipScrollNode};
|
||||
use display_list::items::{ClipScrollNodeIndex, ClipScrollNodeType, DisplayItem};
|
||||
use display_list::items::{DisplayList, StackingContextType};
|
||||
use display_list::items::{BorderDetails, ClipScrollNode, ClipScrollNodeIndex, ClipScrollNodeType};
|
||||
use display_list::items::{DisplayItem, DisplayList, StackingContextType};
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use webrender_api::{self, ClipAndScrollInfo, ClipId, DisplayListBuilder, GlyphRasterSpace};
|
||||
|
||||
|
@ -213,7 +212,7 @@ impl WebRenderDisplayItemConverter for DisplayItem {
|
|||
builder.pop_all_shadows();
|
||||
},
|
||||
DisplayItem::Iframe(ref item) => {
|
||||
builder.push_iframe(&self.prim_info(), item.iframe.to_webrender());
|
||||
builder.push_iframe(&self.prim_info(), item.iframe.to_webrender(), true);
|
||||
},
|
||||
DisplayItem::PushStackingContext(ref item) => {
|
||||
let stacking_context = &item.stacking_context;
|
||||
|
@ -222,7 +221,6 @@ impl WebRenderDisplayItemConverter for DisplayItem {
|
|||
let reference_frame_clip_id = builder.push_stacking_context(
|
||||
&webrender_api::LayoutPrimitiveInfo::new(stacking_context.bounds),
|
||||
None,
|
||||
stacking_context.scroll_policy,
|
||||
stacking_context.transform.map(Into::into),
|
||||
stacking_context.transform_style,
|
||||
stacking_context.perspective,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue