mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
layout: Implement CSS transitions per CSS-TRANSITIONS § 2.
Transition events are not yet supported, and the only animatable properties are `top`, `right`, `bottom`, and `left`. However, all other features of transitions are supported. There are no automated tests at present because I'm not sure how best to test it, but three manual tests are included.
This commit is contained in:
parent
c1cc31b9d6
commit
66dd8c8a6c
31 changed files with 1603 additions and 224 deletions
|
@ -186,4 +186,10 @@ partial interface CSSStyleDeclaration {
|
|||
[TreatNullAs=EmptyString] attribute DOMString zIndex;
|
||||
|
||||
[TreatNullAs=EmptyString] attribute DOMString imageRendering;
|
||||
|
||||
[TreatNullAs=EmptyString] attribute DOMString transition;
|
||||
[TreatNullAs=EmptyString] attribute DOMString transitionDuration;
|
||||
[TreatNullAs=EmptyString] attribute DOMString transitionTimingFunction;
|
||||
[TreatNullAs=EmptyString] attribute DOMString transitionProperty;
|
||||
[TreatNullAs=EmptyString] attribute DOMString transitionDelay;
|
||||
};
|
||||
|
|
|
@ -27,7 +27,7 @@ use dom::performance::Performance;
|
|||
use dom::screen::Screen;
|
||||
use dom::storage::Storage;
|
||||
use layout_interface::{ReflowGoal, ReflowQueryType, LayoutRPC, LayoutChan, Reflow, Msg};
|
||||
use layout_interface::{ContentBoxResponse, ContentBoxesResponse};
|
||||
use layout_interface::{ContentBoxResponse, ContentBoxesResponse, ScriptReflow};
|
||||
use page::Page;
|
||||
use script_task::{TimerSource, ScriptChan};
|
||||
use script_task::ScriptMsg;
|
||||
|
@ -564,17 +564,19 @@ impl<'a> WindowHelpers for JSRef<'a, Window> {
|
|||
}
|
||||
|
||||
// Send new document and relevant styles to layout.
|
||||
let reflow = box Reflow {
|
||||
let reflow = box ScriptReflow {
|
||||
reflow_info: Reflow {
|
||||
goal: goal,
|
||||
url: self.get_url(),
|
||||
iframe: self.parent_info.is_some(),
|
||||
page_clip_rect: self.page_clip_rect.get(),
|
||||
},
|
||||
document_root: root.to_trusted_node_address(),
|
||||
url: self.get_url(),
|
||||
iframe: self.parent_info.is_some(),
|
||||
goal: goal,
|
||||
window_size: window_size,
|
||||
script_chan: self.control_chan.clone(),
|
||||
script_join_chan: join_chan,
|
||||
id: last_reflow_id.get(),
|
||||
query_type: query_type,
|
||||
page_clip_rect: self.page_clip_rect.get(),
|
||||
};
|
||||
|
||||
let LayoutChan(ref chan) = self.layout_chan;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue