aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout_2020/fragments.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/layout_2020/fragments.rs')
-rw-r--r--components/layout_2020/fragments.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/components/layout_2020/fragments.rs b/components/layout_2020/fragments.rs
index a0ea097abb6..e0c335eb3c9 100644
--- a/components/layout_2020/fragments.rs
+++ b/components/layout_2020/fragments.rs
@@ -10,12 +10,13 @@ use std::sync::Arc;
use style::properties::ComputedValues;
use style::values::computed::Length;
use style::Zero;
-use webrender_api::FontInstanceKey;
+use webrender_api::{FontInstanceKey, ImageKey};
pub(crate) enum Fragment {
Box(BoxFragment),
Anonymous(AnonymousFragment),
Text(TextFragment),
+ Image(ImageFragment),
}
pub(crate) struct BoxFragment {
@@ -61,6 +62,12 @@ pub(crate) struct TextFragment {
pub glyphs: Vec<Arc<GlyphStore>>,
}
+pub(crate) struct ImageFragment {
+ pub style: ServoArc<ComputedValues>,
+ pub content_rect: Rect<Length>,
+ pub image_key: ImageKey,
+}
+
impl AnonymousFragment {
pub fn no_op(mode: (WritingMode, Direction)) -> Self {
Self {