layout: Make content of display: inline-block; overflow: hidden visible.

This commit is contained in:
Patrick Walton 2014-10-06 18:03:54 -07:00
parent c87f34f877
commit 2b0e59725b
6 changed files with 34 additions and 14 deletions

View file

@ -1833,8 +1833,11 @@ pub struct ChildDisplayListAccumulator {
impl ChildDisplayListAccumulator {
/// Creates a `ChildDisplayListAccumulator` from the `overflow` property in the given style.
fn new(style: &ComputedValues, bounds: Rect<Au>, node: OpaqueNode,
level: StackingLevel, may_need_clip: bool)
fn new(style: &ComputedValues,
bounds: Rect<Au>,
node: OpaqueNode,
level: StackingLevel,
may_need_clip: bool)
-> ChildDisplayListAccumulator {
ChildDisplayListAccumulator {
clip_display_item: match (may_need_clip, style.get_box().overflow) {
@ -1869,9 +1872,9 @@ impl ChildDisplayListAccumulator {
}
}
/// Consumes this accumulator and pushes the clipping item, if any, onto the display list
/// associated with the given flow, along with the items in the given display list.
pub fn finish(self, parent: &mut Flow, mut display_list: DisplayList) {
/// Consumes this accumulator and pushes the clipping item, if any, onto the given display
/// list.
pub fn finish(self, display_list: &mut DisplayList) {
let ChildDisplayListAccumulator {
clip_display_item
} = self;
@ -1879,6 +1882,5 @@ impl ChildDisplayListAccumulator {
None => {}
Some(clip_display_item) => display_list.push(ClipDisplayItemClass(clip_display_item)),
}
flow::mut_base(parent).display_list = display_list
}
}