extract querymsg from ReflowGoal

This commit is contained in:
moe 2018-03-16 14:06:27 +08:00 committed by csmoe
parent b93f153ed5
commit df6b64181b
5 changed files with 177 additions and 154 deletions

View file

@ -108,7 +108,7 @@ use net_traits::response::HttpsState;
use num_traits::ToPrimitive;
use profile_traits::time::{TimerMetadata, TimerMetadataFrameType, TimerMetadataReflowType};
use ref_slice::ref_slice;
use script_layout_interface::message::{Msg, NodesFromPointQueryType, ReflowGoal};
use script_layout_interface::message::{Msg, NodesFromPointQueryType, QueryMsg, ReflowGoal};
use script_runtime::{CommonScriptMsg, ScriptThreadEventCategory};
use script_thread::{MainThreadScriptMsg, ScriptThread};
use script_traits::{AnimationState, DocumentActivity, MouseButton, MouseEventType};
@ -1968,7 +1968,7 @@ impl Document {
client_point: &Point2D<f32>,
reflow_goal: NodesFromPointQueryType)
-> Vec<UntrustedNodeAddress> {
if !self.window.reflow(ReflowGoal::NodesFromPointQuery(*client_point, reflow_goal),
if !self.window.reflow(ReflowGoal::LayoutQuery(QueryMsg::NodesFromPointQuery(*client_point, reflow_goal), u64::default()),
ReflowReason::Query) {
return vec!();
};