Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update WR (preserve-3d, AA improvements) #16860

Merged
merged 1 commit into from May 16, 2017
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Large diffs are not rendered by default.

@@ -39,7 +39,7 @@ use style_traits::viewport::ViewportConstraints;
use time::{precise_time_ns, precise_time_s};
use touch::{TouchHandler, TouchAction};
use webrender;
use webrender_traits::{self, ClipId, LayoutPoint, ScrollEventPhase, ScrollLocation};
use webrender_traits::{self, ClipId, LayoutPoint, ScrollEventPhase, ScrollLocation, ScrollClamping};
use windowing::{self, MouseWindowEvent, WindowEvent, WindowMethods, WindowNavigateMsg};

#[derive(Debug, PartialEq)]
@@ -777,7 +777,8 @@ impl<Window: WindowMethods> IOCompositor<Window> {
}

fn scroll_fragment_to_point(&mut self, id: ClipId, point: Point2D<f32>) {
self.webrender_api.scroll_node_with_id(LayoutPoint::from_untyped(&point), id);
self.webrender_api.scroll_node_with_id(LayoutPoint::from_untyped(&point), id,
ScrollClamping::ToContentBounds);
}

fn handle_window_message(&mut self, event: WindowEvent) {
@@ -48,6 +48,16 @@ pub struct DisplayList {
}

impl DisplayList {
/// Return the bounds of this display list based on the dimensions of the root
/// stacking context.
pub fn bounds(&self) -> Rect<Au> {
match self.list.get(0) {
Some(&DisplayItem::PushStackingContext(ref item)) => item.stacking_context.bounds,
Some(_) => unreachable!("Root element of display list not stacking context."),
None => Rect::zero(),
}
}

// Returns the text index within a node for the point of interest.
pub fn text_index(&self,
node: OpaqueNode,
@@ -215,7 +215,8 @@ impl WebRenderDisplayListConverter for DisplayList {
fn convert_to_webrender(&self, pipeline_id: PipelineId) -> DisplayListBuilder {
let traversal = DisplayListTraversal::new(self);
let webrender_pipeline_id = pipeline_id.to_webrender();
let mut builder = DisplayListBuilder::new(webrender_pipeline_id);
let mut builder = DisplayListBuilder::new(webrender_pipeline_id,
self.bounds().size.to_sizef());

let mut current_scroll_root_id = ClipId::root_scroll_node(webrender_pipeline_id);
builder.push_clip_id(current_scroll_root_id);
@@ -280,7 +281,7 @@ impl WebRenderDisplayItemConverter for DisplayItem {
item.text_run.font_key,
item.text_color,
item.text_run.actual_pt_size,
item.blur_radius,
item.blur_radius.to_f32_px(),
None);
}
}

This file was deleted.

This file was deleted.

This file was deleted.

@@ -1,3 +1,3 @@
[border-radius-clipping.htm]
type: reftest
expected: FAIL
disabled: https://github.com/servo/webrender/issues/1256

This file was deleted.

This file was deleted.

@@ -0,0 +1,3 @@
[transform-3d-rotateY-stair-above-001.htm]
type: reftest
expected: FAIL

This file was deleted.

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.