mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Return the element rather than styles from the style sharing cache.
This gives us more flexibility, and doesn't cost us anything. MozReview-Commit-ID: CuvOEcLA3My
This commit is contained in:
parent
729db5ccec
commit
9092e6b4c2
2 changed files with 7 additions and 7 deletions
|
@ -655,9 +655,10 @@ where
|
|||
// Now that our bloom filter is set up, try the style sharing
|
||||
// cache.
|
||||
match target.share_style_if_possible(context) {
|
||||
Some(styles) => {
|
||||
Some(shareable_element) => {
|
||||
context.thread_local.statistics.styles_shared += 1;
|
||||
styles
|
||||
let shareable_data = shareable_element.borrow_data().unwrap();
|
||||
shareable_data.styles.clone()
|
||||
}
|
||||
None => {
|
||||
context.thread_local.statistics.elements_matched += 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue