mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
auto merge of #5261 : pcwalton/servo/too-many-reflows, r=pcwalton,metajack
These help Facebook Timeline a lot. r? @metajack
This commit is contained in:
commit
aa6ed369b8
3 changed files with 17 additions and 6 deletions
|
@ -1212,7 +1212,11 @@ impl ScriptTask {
|
||||||
fn handle_reflow_event(&self, pipeline_id: PipelineId) {
|
fn handle_reflow_event(&self, pipeline_id: PipelineId) {
|
||||||
debug!("script got reflow event");
|
debug!("script got reflow event");
|
||||||
let page = get_page(&self.root_page(), pipeline_id);
|
let page = get_page(&self.root_page(), pipeline_id);
|
||||||
self.force_reflow(&*page, ReflowReason::ReceivedReflowEvent);
|
let document = page.document().root();
|
||||||
|
let window = window_from_node(document.r()).root();
|
||||||
|
window.r().reflow(ReflowGoal::ForDisplay,
|
||||||
|
ReflowQueryType::NoQuery,
|
||||||
|
ReflowReason::ReceivedReflowEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Initiate a non-blocking fetch for a specified resource. Stores the InProgressLoad
|
/// Initiate a non-blocking fetch for a specified resource. Stores the InProgressLoad
|
||||||
|
|
|
@ -34,11 +34,13 @@ default = ["glutin_app", "window"]
|
||||||
window = ["glutin_app/window"]
|
window = ["glutin_app/window"]
|
||||||
headless = ["glutin_app/headless"]
|
headless = ["glutin_app/headless"]
|
||||||
|
|
||||||
[profile.release]
|
# Uncomment to profile on Linux:
|
||||||
opt-level = 3
|
#
|
||||||
debug = true
|
# [profile.release]
|
||||||
rpath = false
|
# opt-level = 3
|
||||||
lto = false
|
# debug = true
|
||||||
|
# rpath = false
|
||||||
|
# lto = false
|
||||||
|
|
||||||
[dependencies.compositing]
|
[dependencies.compositing]
|
||||||
path = "../compositing"
|
path = "../compositing"
|
||||||
|
|
|
@ -26,9 +26,14 @@ bitflags! {
|
||||||
macro_rules! task_types ( ( $( $fun:ident = $flag:ident ; )* ) => (
|
macro_rules! task_types ( ( $( $fun:ident = $flag:ident ; )* ) => (
|
||||||
impl TaskState {
|
impl TaskState {
|
||||||
$(
|
$(
|
||||||
|
#[cfg(not(ndebug))]
|
||||||
pub fn $fun(self) -> bool {
|
pub fn $fun(self) -> bool {
|
||||||
self.contains($flag)
|
self.contains($flag)
|
||||||
}
|
}
|
||||||
|
#[cfg(ndebug)]
|
||||||
|
pub fn $fun(self) -> bool {
|
||||||
|
true
|
||||||
|
}
|
||||||
)*
|
)*
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue