mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Do not replace an ellipsis when reflowing a line
The ellipsis should be replaced, if needed, when the text itself is reflowed.
This commit is contained in:
parent
783829eccc
commit
8a90cda09f
2 changed files with 21 additions and 5 deletions
|
@ -15,6 +15,7 @@ use flow::{CONTAINS_TEXT_OR_REPLACED_FRAGMENTS, EarlyAbsolutePositionInfo, Mutab
|
|||
use flow::OpaqueFlow;
|
||||
use flow_ref::FlowRef;
|
||||
use fragment::{CoordinateSystem, Fragment, FragmentBorderBoxIterator, Overflow};
|
||||
use fragment::IS_ELLIPSIS;
|
||||
use fragment::SpecificFragmentInfo;
|
||||
use gfx::display_list::OpaqueNode;
|
||||
use gfx::font::FontMetrics;
|
||||
|
@ -331,6 +332,16 @@ impl LineBreaker {
|
|||
None => break,
|
||||
Some(fragment) => fragment,
|
||||
};
|
||||
|
||||
// If ellipsis are still needed, then they were already needed for the previous fragment.
|
||||
if fragment.flags.contains(IS_ELLIPSIS) {
|
||||
continue
|
||||
}
|
||||
|
||||
// If ellipsis are still needed, then they were already needed for the previous fragment.
|
||||
if fragment.flags.contains(IS_ELLIPSIS) {
|
||||
continue
|
||||
}
|
||||
|
||||
// Try to append the fragment.
|
||||
self.reflow_fragment(fragment, flow, layout_context);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue