layout: Implement mix-blend-mode per COMPOSITING § 3.4.1.

`background-blend-mode` is not yet supported because we don't support
multiple backgrounds yet.
This commit is contained in:
Patrick Walton 2015-01-08 13:53:17 -08:00
parent 3897547bc2
commit 97d3443003
10 changed files with 181 additions and 23 deletions

View file

@ -371,7 +371,9 @@ impl FragmentDisplayListBuilding for Fragment {
// Create the image display item.
display_list.push(DisplayItem::ImageClass(box ImageDisplayItem {
base: BaseDisplayItem::new(bounds,
DisplayItemMetadata::new(self.node, style, Cursor::DefaultCursor),
DisplayItemMetadata::new(self.node,
style,
Cursor::DefaultCursor),
clip),
image: image.clone(),
stretch_size: Size2D(Au::from_px(image.width as int),
@ -481,7 +483,9 @@ impl FragmentDisplayListBuilding for Fragment {
let gradient_display_item = DisplayItem::GradientClass(box GradientDisplayItem {
base: BaseDisplayItem::new(*absolute_bounds,
DisplayItemMetadata::new(self.node, style, Cursor::DefaultCursor),
DisplayItemMetadata::new(self.node,
style,
Cursor::DefaultCursor),
clip),
start_point: center - delta,
end_point: center + delta,
@ -1194,6 +1198,7 @@ impl BlockFlowDisplayListBuilding for BlockFlow {
&overflow,
self.fragment.style().get_box().z_index.number_or_zero(),
filters,
self.fragment.style().get_effects().mix_blend_mode,
layer))
}
}