mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Implements reflow events debugging.
Start servo with -Z relayout-event and you should have reflow events printed to the terminal.
This commit is contained in:
parent
34289943e3
commit
618f56410d
4 changed files with 70 additions and 18 deletions
|
@ -56,7 +56,7 @@ use dom::processinginstruction::ProcessingInstruction;
|
|||
use dom::range::Range;
|
||||
use dom::treewalker::TreeWalker;
|
||||
use dom::uievent::UIEvent;
|
||||
use dom::window::{Window, WindowHelpers};
|
||||
use dom::window::{Window, WindowHelpers, ReflowReason};
|
||||
|
||||
use layout_interface::{HitTestResponse, MouseOverResponse};
|
||||
use msg::compositor_msg::ScriptListener;
|
||||
|
@ -523,7 +523,7 @@ impl<'a> DocumentHelpers<'a> for JSRef<'a, Document> {
|
|||
el.authentic_click_activation(event);
|
||||
|
||||
self.commit_focus_transaction();
|
||||
window.r().reflow(ReflowGoal::ForDisplay, ReflowQueryType::NoQuery);
|
||||
window.r().reflow(ReflowGoal::ForDisplay, ReflowQueryType::NoQuery, ReflowReason::MouseEvent);
|
||||
}
|
||||
|
||||
/// Return need force reflow or not
|
||||
|
@ -664,7 +664,7 @@ impl<'a> DocumentHelpers<'a> for JSRef<'a, Document> {
|
|||
_ => ()
|
||||
}
|
||||
|
||||
window.r().reflow(ReflowGoal::ForDisplay, ReflowQueryType::NoQuery);
|
||||
window.r().reflow(ReflowGoal::ForDisplay, ReflowQueryType::NoQuery, ReflowReason::KeyEvent);
|
||||
}
|
||||
|
||||
fn set_current_script(self, script: Option<JSRef<HTMLScriptElement>>) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue