mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
Rename Root::root_ref() to Root::r().
As it will be used much more widely after the upcoming changes, this limits the effort reading and writing the method calls.
This commit is contained in:
parent
1290c18794
commit
c9f26dfd59
9 changed files with 28 additions and 28 deletions
|
@ -313,7 +313,7 @@ fn broadcast_radio_checked(broadcaster: JSRef<HTMLInputElement>, group: Option<&
|
|||
let mut iter = unsafe {
|
||||
doc_node.query_selector_iter("input[type=radio]".into_string()).unwrap()
|
||||
.filter_map(|t| HTMLInputElementCast::to_ref(t))
|
||||
.filter(|&r| in_same_group(r, owner.root_ref(), group) && broadcaster != r)
|
||||
.filter(|&r| in_same_group(r, owner.r(), group) && broadcaster != r)
|
||||
};
|
||||
for r in iter {
|
||||
if r.Checked() {
|
||||
|
@ -326,7 +326,7 @@ fn in_same_group<'a,'b>(other: JSRef<'a, HTMLInputElement>,
|
|||
owner: Option<JSRef<'b, HTMLFormElement>>,
|
||||
group: Option<&str>) -> bool {
|
||||
let other_owner = other.form_owner().root();
|
||||
let other_owner = other_owner.root_ref();
|
||||
let other_owner = other_owner.r();
|
||||
other.input_type.get() == InputType::InputRadio &&
|
||||
// TODO Both a and b are in the same home subtree.
|
||||
other_owner.equals(owner) &&
|
||||
|
@ -638,7 +638,7 @@ impl<'a> Activatable for JSRef<'a, HTMLInputElement> {
|
|||
let checked_member = unsafe {
|
||||
doc_node.query_selector_iter("input[type=radio]".into_string()).unwrap()
|
||||
.filter_map(|t| HTMLInputElementCast::to_ref(t))
|
||||
.filter(|&r| in_same_group(r, owner.root_ref(),
|
||||
.filter(|&r| in_same_group(r, owner.r(),
|
||||
group.as_ref().map(|gr| gr.as_slice())))
|
||||
.find(|r| r.Checked())
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue