mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Combine ReflowGoal and ReflowQueryType
This simplifies the logic in the layout_thread and makes it clearer which types of reflows generate display lists and cause display updates.
This commit is contained in:
parent
75a4dcf293
commit
0380431157
9 changed files with 177 additions and 267 deletions
|
@ -85,7 +85,7 @@ use js::jsapi::Heap;
|
|||
use js::jsval::JSVal;
|
||||
use net_traits::request::CorsSettings;
|
||||
use ref_filter_map::ref_filter_map;
|
||||
use script_layout_interface::message::ReflowQueryType;
|
||||
use script_layout_interface::message::ReflowGoal;
|
||||
use script_thread::ScriptThread;
|
||||
use selectors::attr::{AttrSelectorOperation, NamespaceConstraint, CaseSensitivity};
|
||||
use selectors::matching::{ElementSelectorFlags, LocalMatchingContext, MatchingContext, MatchingMode};
|
||||
|
@ -105,7 +105,7 @@ use std::rc::Rc;
|
|||
use style::CaseSensitivityExt;
|
||||
use style::applicable_declarations::ApplicableDeclarationBlock;
|
||||
use style::attr::{AttrValue, LengthOrPercentageOrAuto};
|
||||
use style::context::{QuirksMode, ReflowGoal};
|
||||
use style::context::QuirksMode;
|
||||
use style::element_state::*;
|
||||
use style::invalidation::element::restyle_hints::RESTYLE_SELF;
|
||||
use style::properties::{Importance, PropertyDeclaration, PropertyDeclarationBlock, parse_style_attribute};
|
||||
|
@ -3070,9 +3070,7 @@ impl TaskOnce for ElementPerformFullscreenEnter {
|
|||
// Step 7.5
|
||||
element.set_fullscreen_state(true);
|
||||
document.set_fullscreen_element(Some(&element));
|
||||
document.window().reflow(ReflowGoal::ForDisplay,
|
||||
ReflowQueryType::NoQuery,
|
||||
ReflowReason::ElementStateChanged);
|
||||
document.window().reflow(ReflowGoal::Full, ReflowReason::ElementStateChanged);
|
||||
|
||||
// Step 7.6
|
||||
document.upcast::<EventTarget>().fire_event(atom!("fullscreenchange"));
|
||||
|
@ -3105,9 +3103,7 @@ impl TaskOnce for ElementPerformFullscreenExit {
|
|||
// Step 9.6
|
||||
element.set_fullscreen_state(false);
|
||||
|
||||
document.window().reflow(ReflowGoal::ForDisplay,
|
||||
ReflowQueryType::NoQuery,
|
||||
ReflowReason::ElementStateChanged);
|
||||
document.window().reflow(ReflowGoal::Full, ReflowReason::ElementStateChanged);
|
||||
|
||||
document.set_fullscreen_element(None);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue