mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Layerize canvas
Note that this keeps using readback right now, `NativeSurface` painting will be implemented soon. Also see https://github.com/servo/servo/issues/6142
This commit is contained in:
parent
6481058309
commit
3350522306
35 changed files with 769 additions and 500 deletions
|
@ -6,7 +6,7 @@
|
|||
|
||||
#![deny(unsafe_code)]
|
||||
|
||||
use canvas::canvas_msg::CanvasMsg;
|
||||
use canvas_traits::CanvasMsg;
|
||||
use css::node_style::StyledNode;
|
||||
use context::LayoutContext;
|
||||
use floats::ClearType;
|
||||
|
@ -195,9 +195,7 @@ impl SpecificFragmentInfo {
|
|||
SpecificFragmentInfo::Iframe(_) => "SpecificFragmentInfo::Iframe",
|
||||
SpecificFragmentInfo::Image(_) => "SpecificFragmentInfo::Image",
|
||||
SpecificFragmentInfo::InlineAbsolute(_) => "SpecificFragmentInfo::InlineAbsolute",
|
||||
SpecificFragmentInfo::InlineAbsoluteHypothetical(_) => {
|
||||
"SpecificFragmentInfo::InlineAbsoluteHypothetical"
|
||||
}
|
||||
SpecificFragmentInfo::InlineAbsoluteHypothetical(_) => "SpecificFragmentInfo::InlineAbsoluteHypothetical",
|
||||
SpecificFragmentInfo::InlineBlock(_) => "SpecificFragmentInfo::InlineBlock",
|
||||
SpecificFragmentInfo::ScannedText(_) => "SpecificFragmentInfo::ScannedText",
|
||||
SpecificFragmentInfo::Table => "SpecificFragmentInfo::Table",
|
||||
|
@ -1993,6 +1991,13 @@ impl Fragment {
|
|||
if self.style().get_effects().transform.is_some() {
|
||||
return true
|
||||
}
|
||||
|
||||
// Canvas always layerizes, as an special case
|
||||
// FIXME(pcwalton): Don't unconditionally form stacking contexts for each canvas.
|
||||
if let SpecificFragmentInfo::Canvas(_) = self.specific {
|
||||
return true
|
||||
}
|
||||
|
||||
match self.style().get_box().position {
|
||||
position::T::absolute | position::T::fixed => {
|
||||
// FIXME(pcwalton): This should only establish a new stacking context when
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue