layout: Implement overflow-x and overflow-y per CSS-OVERFLOW § 3.

Fragmentation is not yet supported.
This commit is contained in:
Patrick Walton 2015-01-07 16:05:10 -08:00 committed by Simon Sapin
parent 417a932e30
commit a82fc00806
9 changed files with 199 additions and 17 deletions

View file

@ -34,7 +34,7 @@ use std::mem;
use std::num::ToPrimitive;
use std::ops::{Add, Sub, Mul, Div, Rem, Neg, Shl, Shr, Not, BitOr, BitAnd, BitXor};
use std::u16;
use style::computed_values::{overflow, text_align, text_justify, text_overflow, vertical_align};
use style::computed_values::{overflow_x, text_align, text_justify, text_overflow, vertical_align};
use style::computed_values::{white_space};
use style::properties::ComputedValues;
use std::sync::Arc;
@ -653,8 +653,8 @@ impl LineBreaker {
let available_inline_size = self.pending_line.green_zone.inline -
self.pending_line.bounds.size.inline - indentation;
match (fragment.style().get_inheritedtext().text_overflow,
fragment.style().get_box().overflow) {
(text_overflow::T::clip, _) | (_, overflow::T::visible) => {}
fragment.style().get_box().overflow_x) {
(text_overflow::T::clip, _) | (_, overflow_x::T::visible) => {}
(text_overflow::T::ellipsis, _) => {
need_ellipsis = fragment.border_box.size.inline > available_inline_size;
}