aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/display_list/builder.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/layout/display_list/builder.rs')
-rw-r--r--components/layout/display_list/builder.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/components/layout/display_list/builder.rs b/components/layout/display_list/builder.rs
index 56748d55d2b..17f946f7187 100644
--- a/components/layout/display_list/builder.rs
+++ b/components/layout/display_list/builder.rs
@@ -1875,6 +1875,12 @@ impl Fragment {
}
},
SpecificFragmentInfo::Canvas(ref canvas_fragment_info) => {
+ if canvas_fragment_info.dom_width == Au(0) ||
+ canvas_fragment_info.dom_height == Au(0)
+ {
+ return;
+ }
+
let image_key = match canvas_fragment_info.source {
CanvasFragmentSource::WebGL(image_key) => image_key,
CanvasFragmentSource::Image(ref ipc_renderer) => match *ipc_renderer {