mirror of
https://github.com/servo/servo.git
synced 2025-08-02 20:20:14 +01:00
Don't borrow CharacterData.data from layout.
This should fix the most frequent intermittent wpt failure.
This commit is contained in:
parent
fd70b366ae
commit
16e071168c
2 changed files with 9 additions and 2 deletions
|
@ -189,7 +189,7 @@ impl<'ln> TLayoutNode for LayoutNode<'ln> {
|
|||
unsafe {
|
||||
if self.get().is_text() {
|
||||
let text: JS<Text> = self.get_jsmanaged().transmute_copy();
|
||||
(*text.unsafe_get()).characterdata().data().clone()
|
||||
(*text.unsafe_get()).characterdata().data_for_layout().to_string()
|
||||
} else if self.get().is_htmlinputelement() {
|
||||
let input: JS<HTMLInputElement> = self.get_jsmanaged().transmute_copy();
|
||||
input.get_value_for_layout()
|
||||
|
@ -765,7 +765,7 @@ impl<'ln> ThreadSafeLayoutNode<'ln> {
|
|||
Some(TextNodeTypeId) => {
|
||||
unsafe {
|
||||
let text: JS<Text> = self.get_jsmanaged().transmute_copy();
|
||||
if !is_whitespace((*text.unsafe_get()).characterdata().data().as_slice()) {
|
||||
if !is_whitespace((*text.unsafe_get()).characterdata().data_for_layout()) {
|
||||
return false
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue