mirror of
https://github.com/servo/servo.git
synced 2025-06-11 01:50:10 +00:00
Improve acid2. Fix line height calculation. Text fragments get correct enclosing element style.
* Enabled acid2 on mac + linux. Updated the reference image. The only difference from the real acid2 now is the paint order and a 1 pixel horizontal offset on the nose. * Change line-height to be calculated correctly. * Apply enclosing element style to text fragments.
This commit is contained in:
parent
20f5fdd000
commit
cf79e64a5a
14 changed files with 118 additions and 101 deletions
|
@ -421,7 +421,7 @@ impl<'a> FlowConstructor<'a> {
|
|||
let mut fragment = Fragment::from_opaque_node_and_style(whitespace_node,
|
||||
whitespace_style.clone(),
|
||||
fragment_info);
|
||||
inline_fragment_accumulator.fragments.push(&mut fragment, whitespace_style);
|
||||
inline_fragment_accumulator.fragments.push(&mut fragment);
|
||||
}
|
||||
ConstructionItemConstructionResult(TableColumnFragmentConstructionItem(_)) => {
|
||||
// TODO: Implement anonymous table objects for missing parents
|
||||
|
@ -449,7 +449,7 @@ impl<'a> FlowConstructor<'a> {
|
|||
if node.get_pseudo_element_type() != Normal {
|
||||
let fragment_info = UnscannedTextFragment(UnscannedTextFragmentInfo::new(node));
|
||||
let mut fragment = Fragment::new_from_specific_info(node, fragment_info);
|
||||
inline_fragment_accumulator.fragments.push(&mut fragment, node.style().clone());
|
||||
inline_fragment_accumulator.fragments.push(&mut fragment);
|
||||
first_fragment = false;
|
||||
}
|
||||
|
||||
|
@ -585,7 +585,7 @@ impl<'a> FlowConstructor<'a> {
|
|||
let mut fragment = Fragment::from_opaque_node_and_style(whitespace_node,
|
||||
whitespace_style.clone(),
|
||||
fragment_info);
|
||||
fragment_accumulator.fragments.push(&mut fragment, whitespace_style)
|
||||
fragment_accumulator.fragments.push(&mut fragment)
|
||||
}
|
||||
ConstructionItemConstructionResult(TableColumnFragmentConstructionItem(_)) => {
|
||||
// TODO: Implement anonymous table objects for missing parents
|
||||
|
@ -639,7 +639,7 @@ impl<'a> FlowConstructor<'a> {
|
|||
};
|
||||
|
||||
let mut fragments = InlineFragments::new();
|
||||
fragments.push(&mut fragment, node.style().clone());
|
||||
fragments.push(&mut fragment);
|
||||
|
||||
let construction_item = InlineFragmentsConstructionItem(InlineFragmentsConstructionResult {
|
||||
splits: Vec::new(),
|
||||
|
@ -661,7 +661,7 @@ impl<'a> FlowConstructor<'a> {
|
|||
let mut fragment = Fragment::new_from_specific_info(node, fragment_info);
|
||||
|
||||
let mut fragment_accumulator = InlineFragmentsAccumulator::from_inline_node(node);
|
||||
fragment_accumulator.fragments.push(&mut fragment, node.style().clone());
|
||||
fragment_accumulator.fragments.push(&mut fragment);
|
||||
|
||||
let construction_item = InlineFragmentsConstructionItem(InlineFragmentsConstructionResult {
|
||||
splits: Vec::new(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue