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

NSS/NSPR, scroll fixes, texture upload fixes, and hit testing #495

Closed
wants to merge 16 commits into from
Closed
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Don't clip layers to the screen area

  • Loading branch information
pcwalton committed May 30, 2013
commit 2d1a00c3cf02c9f91cc3e39a818421795d3a3b72
@@ -10,12 +10,12 @@ use layout::display_list_builder::{DisplayListBuilder, FlowDisplayListBuilderMet
use layout::flow::{BlockFlow, FlowContext, FlowData, InlineBlockFlow};
use layout::inline::InlineLayout;

use au = gfx::geometry;
use core::cell::Cell;
use geom::point::Point2D;
use geom::rect::Rect;
use gfx::display_list::DisplayList;
use gfx::geometry::Au;
use gfx::geometry;
use servo_util::tree::{TreeNodeRef, TreeUtils};

pub struct BlockFlowData {
@@ -95,8 +95,8 @@ impl BlockFlowData {
assert!(child_ctx.starts_block_flow() || child_ctx.starts_inline_flow());

do child_ctx.with_base |child_node| {
min_width = au::max(min_width, child_node.min_width);
pref_width = au::max(pref_width, child_node.pref_width);
min_width = geometry::max(min_width, child_node.min_width);
pref_width = geometry::max(pref_width, child_node.pref_width);
}
}

@@ -155,8 +155,11 @@ impl BlockFlowData {
}
}

let height = if self.is_root { Au::max(ctx.screen_size.size.height, cur_y) }
else { cur_y };
let height = if self.is_root {
Au::max(ctx.screen_size.size.height, cur_y)
} else {
cur_y
};

self.common.position.size.height = height;

@@ -13,10 +13,6 @@ use layout::context::LayoutContext;
use layout::display_list_builder::{DisplayListBuilder, FlowDisplayListBuilderMethods};
use layout::flow::FlowContext;
use util::task::spawn_listener;
use servo_util::time;
use servo_util::time::time;
use servo_util::time::profile;
use servo_util::time::ProfilerChan;

use core::cast::transmute;
use core::cell::Cell;
@@ -42,7 +38,9 @@ use script::layout_interface::{MatchSelectorsDamage, Msg, NoDamage, QueryMsg, Re
use script::script_task::{ScriptMsg, SendEventMsg};
use servo_net::image_cache_task::{ImageCacheTask, ImageResponseMsg};
use servo_net::local_image_cache::LocalImageCache;
use servo_util::tree::TreeUtils;
use servo_util::tree::{TreeNodeRef, TreeUtils};
use servo_util::time::{ProfilerChan, profile, time};
use servo_util::time;

pub fn create_layout_task(render_task: RenderTask,
img_cache_task: ImageCacheTask,
@@ -222,9 +220,13 @@ impl Layout {
// TODO: Be smarter about what needs painting.
layout_root.build_display_list(&builder, &layout_root.position(), display_list);

let root_size = do layout_root.with_base |base| {
base.position.size
};

let render_layer = RenderLayer {
display_list: display_list.take(),
size: Size2D(screen_size.width.to_px() as uint, screen_size.height.to_px() as uint)
size: Size2D(root_size.width.to_px() as uint, root_size.height.to_px() as uint)
};

self.render_task.channel.send(RenderMsg(render_layer));
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.