summaryrefslogtreecommitdiff
path: root/src/model/styles.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-10-31 09:05:50 +0100
committerLaurenz <laurmaedje@gmail.com>2022-10-31 09:05:50 +0100
commit237feda063a3a556658f1e3e34f7f8867e800f60 (patch)
treede5d0fc18ab8407949f05503686121dd43a93c91 /src/model/styles.rs
parent66ad023519e5250f88f9066a2607efe5442a7b76 (diff)
Remove semantic role handling
Diffstat (limited to 'src/model/styles.rs')
-rw-r--r--src/model/styles.rs19
1 files changed, 0 insertions, 19 deletions
diff --git a/src/model/styles.rs b/src/model/styles.rs
index d21f3a9f..ddeeaa53 100644
--- a/src/model/styles.rs
+++ b/src/model/styles.rs
@@ -7,7 +7,6 @@ use comemo::Tracked;
use super::{Barrier, Content, Key, Property, Recipe, Selector, Show, Target};
use crate::diag::SourceResult;
-use crate::frame::Role;
use crate::util::ReadableTypeId;
use crate::World;
@@ -161,8 +160,6 @@ pub enum StyleEntry {
Property(Property),
/// A show rule recipe.
Recipe(Recipe),
- /// A semantic role.
- Role(Role),
/// A barrier for scoped styles.
Barrier(Barrier),
/// Guards against recursive show rules.
@@ -222,7 +219,6 @@ impl Debug for StyleEntry {
match self {
Self::Property(property) => property.fmt(f)?,
Self::Recipe(recipe) => recipe.fmt(f)?,
- Self::Role(role) => role.fmt(f)?,
Self::Barrier(barrier) => barrier.fmt(f)?,
Self::Guard(sel) => write!(f, "Guard against {sel:?}")?,
Self::Unguard(sel) => write!(f, "Unguard against {sel:?}")?,
@@ -324,21 +320,6 @@ impl<'a> StyleChain<'a> {
Ok(realized)
}
- /// Retrieve the current role.
- pub fn role(self) -> Option<Role> {
- let mut depth = 0;
-
- for entry in self.entries() {
- match *entry {
- StyleEntry::Role(role) => return Some(role),
- StyleEntry::Barrier(_) if depth == 1 => return None,
- StyleEntry::Barrier(_) => depth += 1,
- _ => {}
- }
- }
- None
- }
-
/// Whether the recipe identified by the selector is guarded.
fn guarded(self, sel: Selector) -> bool {
for entry in self.entries() {