mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Fix whitespace_pre with incremental reflow turned on.
This implements fragment merging, in order to incrementally reflow linebroken text. This makes the `whitespace_pre.html` reftest pass with incremental reflow turned on with `-i`.
This commit is contained in:
parent
6a11ee89de
commit
481adcd654
6 changed files with 209 additions and 30 deletions
|
@ -13,6 +13,7 @@ use script::dom::node::{TextNodeTypeId};
|
|||
use servo_util::bloom::BloomFilter;
|
||||
use servo_util::cache::{Cache, LRUCache, SimpleHashCache};
|
||||
use servo_util::smallvec::{SmallVec, SmallVec16};
|
||||
use servo_util::arc_ptr_eq;
|
||||
use std::mem;
|
||||
use std::hash::{Hash, sip};
|
||||
use std::slice::Items;
|
||||
|
@ -91,16 +92,6 @@ impl<'a> ApplicableDeclarationsCacheQuery<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
// Workaround for lack of `ptr_eq` on Arcs...
|
||||
#[inline]
|
||||
fn arc_ptr_eq<T>(a: &Arc<T>, b: &Arc<T>) -> bool {
|
||||
unsafe {
|
||||
let a: uint = mem::transmute_copy(a);
|
||||
let b: uint = mem::transmute_copy(b);
|
||||
a == b
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Equiv<ApplicableDeclarationsCacheEntry> for ApplicableDeclarationsCacheQuery<'a> {
|
||||
fn equiv(&self, other: &ApplicableDeclarationsCacheEntry) -> bool {
|
||||
if self.declarations.len() != other.declarations.len() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue