aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/table/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/layout/table/mod.rs')
-rw-r--r--components/layout/table/mod.rs13
1 files changed, 11 insertions, 2 deletions
diff --git a/components/layout/table/mod.rs b/components/layout/table/mod.rs
index fe7f90437b8..08fc89d927e 100644
--- a/components/layout/table/mod.rs
+++ b/components/layout/table/mod.rs
@@ -82,6 +82,7 @@ use style::properties::style_structs::Font;
use style_traits::dom::OpaqueNode;
use super::flow::BlockFormattingContext;
+use crate::SharedStyle;
use crate::cell::ArcRefCell;
use crate::flow::BlockContainer;
use crate::formatting_contexts::IndependentFormattingContext;
@@ -98,12 +99,10 @@ pub struct Table {
/// The style of this table. These are the properties that apply to the "wrapper" ie the element
/// that contains both the grid and the captions. Not all properties are actually used on the
/// wrapper though, such as background and borders, which apply to the grid.
- #[conditional_malloc_size_of]
style: Arc<ComputedValues>,
/// The style of this table's grid. This is an anonymous style based on the table's style, but
/// eliminating all the properties handled by the "wrapper."
- #[conditional_malloc_size_of]
grid_style: Arc<ComputedValues>,
/// The [`BaseFragmentInfo`] for this table's grid. This is necessary so that when the
@@ -288,6 +287,11 @@ pub struct TableTrack {
/// Whether or not this [`TableTrack`] was anonymous, for instance created due to
/// a `span` attribute set on a parent `<colgroup>`.
is_anonymous: bool,
+
+ /// A shared container for this track's style, used to share the style for the purposes
+ /// of drawing backgrounds in individual cells. This allows updating the style in a
+ /// single place and having it affect all cell `Fragment`s.
+ shared_background_style: SharedStyle,
}
#[derive(Debug, MallocSizeOf, PartialEq)]
@@ -308,6 +312,11 @@ pub struct TableTrackGroup {
/// The range of tracks in this [`TableTrackGroup`].
track_range: Range<usize>,
+
+ /// A shared container for this track's style, used to share the style for the purposes
+ /// of drawing backgrounds in individual cells. This allows updating the style in a
+ /// single place and having it affect all cell `Fragment`s.
+ shared_background_style: SharedStyle,
}
impl TableTrackGroup {