mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Rename "get_applicable_declarations" to "push_applicable_declarations".
This commit is contained in:
parent
fe1bb6a325
commit
b6d59a17f0
2 changed files with 24 additions and 24 deletions
|
@ -40,22 +40,22 @@ impl<'ln> MatchMethods for LayoutNode<'ln> {
|
||||||
let mut layout_data_ref = self.mutate_layout_data();
|
let mut layout_data_ref = self.mutate_layout_data();
|
||||||
match *layout_data_ref.get() {
|
match *layout_data_ref.get() {
|
||||||
Some(ref mut layout_data) => {
|
Some(ref mut layout_data) => {
|
||||||
stylist.get_applicable_declarations(self,
|
stylist.push_applicable_declarations(self,
|
||||||
style_attribute,
|
style_attribute,
|
||||||
None,
|
None,
|
||||||
&mut layout_data.data.applicable_declarations);
|
&mut layout_data.data.applicable_declarations);
|
||||||
stylist.get_applicable_declarations(self,
|
stylist.push_applicable_declarations(self,
|
||||||
None,
|
None,
|
||||||
Some(Before),
|
Some(Before),
|
||||||
&mut layout_data
|
&mut layout_data
|
||||||
.data
|
.data
|
||||||
.before_applicable_declarations);
|
.before_applicable_declarations);
|
||||||
stylist.get_applicable_declarations(self,
|
stylist.push_applicable_declarations(self,
|
||||||
None,
|
None,
|
||||||
Some(After),
|
Some(After),
|
||||||
&mut layout_data
|
&mut layout_data
|
||||||
.data
|
.data
|
||||||
.after_applicable_declarations);
|
.after_applicable_declarations);
|
||||||
}
|
}
|
||||||
None => fail!("no layout data")
|
None => fail!("no layout data")
|
||||||
}
|
}
|
||||||
|
|
|
@ -358,14 +358,14 @@ impl Stylist {
|
||||||
|
|
||||||
/// Returns the applicable CSS declarations for the given element. This corresponds to
|
/// Returns the applicable CSS declarations for the given element. This corresponds to
|
||||||
/// `ElementRuleCollector` in WebKit.
|
/// `ElementRuleCollector` in WebKit.
|
||||||
pub fn get_applicable_declarations<E:TElement,
|
pub fn push_applicable_declarations<E:TElement,
|
||||||
N:TNode<E>,
|
N:TNode<E>,
|
||||||
V:SmallVec<Arc<~[PropertyDeclaration]>>>(
|
V:SmallVec<Arc<~[PropertyDeclaration]>>>(
|
||||||
&self,
|
&self,
|
||||||
element: &N,
|
element: &N,
|
||||||
style_attribute: Option<&PropertyDeclarationBlock>,
|
style_attribute: Option<&PropertyDeclarationBlock>,
|
||||||
pseudo_element: Option<PseudoElement>,
|
pseudo_element: Option<PseudoElement>,
|
||||||
applicable_declarations: &mut V) {
|
applicable_declarations: &mut V) {
|
||||||
assert!(element.is_element());
|
assert!(element.is_element());
|
||||||
assert!(style_attribute.is_none() || pseudo_element.is_none(),
|
assert!(style_attribute.is_none() || pseudo_element.is_none(),
|
||||||
"Style attributes do not apply to pseudo-elements");
|
"Style attributes do not apply to pseudo-elements");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue