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:
Clark Gaebel 2014-10-13 12:20:56 -07:00
parent 6a11ee89de
commit 481adcd654
6 changed files with 209 additions and 30 deletions

View file

@ -32,6 +32,8 @@ extern crate url;
#[phase(plugin)]
extern crate string_cache_macros;
use std::sync::Arc;
pub mod bloom;
pub mod cache;
pub mod debug_utils;
@ -55,3 +57,11 @@ pub mod workqueue;
pub fn breakpoint() {
unsafe { ::std::intrinsics::breakpoint() };
}
// Workaround for lack of `ptr_eq` on Arcs...
#[inline]
pub fn arc_ptr_eq<T: 'static + Send + Sync>(a: &Arc<T>, b: &Arc<T>) -> bool {
let a: &T = a.deref();
let b: &T = b.deref();
(a as *const T) == (b as *const T)
}