mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
* new_js_regex and matches_js_regex need a CanGc argument Signed-off-by: dericko681 <abonghoderick@gmail.com> * new_js_regex and matches_js_regex need a CanGc argument Signed-off-by: dericko681 <abonghoderick@gmail.com> * edit Propagate CanGc arguments through new_js_regex and matches_js_regex Signed-off-by: dericko681 <abonghoderick@gmail.com> * Propagate CanGc arguments through new_js_regex and matches_js_regex Signed-off-by: dericko681 <abonghoderick@gmail.com> * Propagate CanGc arguments through new_js_regex and matches_js_regex Signed-off-by: dericko681 <abonghoderick@gmail.com> * Propagate CanGc arguments through new_js_regex and matches_js_regex Signed-off-by: dericko681 <abonghoderick@gmail.com> --------- Signed-off-by: dericko681 <abonghoderick@gmail.com>
This commit is contained in:
parent
b5c8164e99
commit
83da63f638
60 changed files with 600 additions and 435 deletions
|
@ -115,7 +115,7 @@ impl AttrMethods<crate::DomTypeHolder> for Attr {
|
|||
fn SetValue(&self, value: DOMString) {
|
||||
if let Some(owner) = self.owner() {
|
||||
let value = owner.parse_attribute(self.namespace(), self.local_name(), value);
|
||||
self.set_value(value, &owner);
|
||||
self.set_value(value, &owner, CanGc::note());
|
||||
} else {
|
||||
*self.value.borrow_mut() = AttrValue::String(value.into());
|
||||
}
|
||||
|
@ -153,7 +153,7 @@ impl AttrMethods<crate::DomTypeHolder> for Attr {
|
|||
}
|
||||
|
||||
impl Attr {
|
||||
pub(crate) fn set_value(&self, mut value: AttrValue, owner: &Element) {
|
||||
pub(crate) fn set_value(&self, mut value: AttrValue, owner: &Element, can_gc: CanGc) {
|
||||
let name = self.local_name().clone();
|
||||
let namespace = self.namespace().clone();
|
||||
let old_value = DOMString::from(&**self.value());
|
||||
|
@ -180,8 +180,11 @@ impl Attr {
|
|||
owner.will_mutate_attr(self);
|
||||
self.swap_value(&mut value);
|
||||
if *self.namespace() == ns!() {
|
||||
vtable_for(owner.upcast())
|
||||
.attribute_mutated(self, AttributeMutation::Set(Some(&value)));
|
||||
vtable_for(owner.upcast()).attribute_mutated(
|
||||
self,
|
||||
AttributeMutation::Set(Some(&value)),
|
||||
can_gc,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue