Skip to content

Commit b87248b

Browse files
committed
remove unused hasColoredInline bit
Unused since d2f6b5e
1 parent e44e83d commit b87248b

2 files changed

Lines changed: 8 additions & 23 deletions

File tree

src/layout-box.ts

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -182,16 +182,15 @@ export abstract class Box extends RenderItem {
182182
hasNewlines: 1 << 11,
183183
hasSoftWrap: 1 << 12,
184184
hasCollapsibleWs: 1 << 13,
185-
// 14..16: propagation bits: Inline <- Inline
185+
// 14..15: propagation bits: Inline <- Inline
186186
hasPaintedInlines: 1 << 14,
187-
hasColoredInline: 1 << 15,
188-
hasSizedInline: 1 << 16,
189-
// 17: propagation bits: Inline <- Break, Inline, ReplacedBox
190-
hasBreakInlineOrReplaced: 1 << 17,
191-
// 18..19: propagation bits: Inline <- FormattingBox
192-
hasFloatOrReplaced: 1 << 18,
193-
hasInlineBlocks: 1 << 19,
194-
// 20..32: if you take them, remove them from PROPAGATES_TO_INLINE_BITS
187+
hasSizedInline: 1 << 15,
188+
// 16: propagation bits: Inline <- Break, Inline, ReplacedBox
189+
hasBreakInlineOrReplaced: 1 << 16,
190+
// 17..18: propagation bits: Inline <- FormattingBox
191+
hasFloatOrReplaced: 1 << 17,
192+
hasInlineBlocks: 1 << 18,
193+
// 19..31: if you take them, remove them from PROPAGATES_TO_INLINE_BITS
195194
};
196195

197196
/**

src/layout-flow.ts

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1145,16 +1145,6 @@ export class Inline extends Box {
11451145
) {
11461146
parent.bitfield |= Box.BITS.hasSizedInline;
11471147
}
1148-
if (
1149-
!parent.hasColoredInline() && (
1150-
this.style.color.r !== parent.style.color.r ||
1151-
this.style.color.g !== parent.style.color.g ||
1152-
this.style.color.b !== parent.style.color.b ||
1153-
this.style.color.a !== parent.style.color.a
1154-
)
1155-
) {
1156-
parent.bitfield |= Box.BITS.hasColoredInline;
1157-
}
11581148

11591149
// Bits that propagate to Inline propagate again if the parent is Inline
11601150
parent.bitfield |= (this.bitfield & Box.PROPAGATES_TO_INLINE_BITS);
@@ -1205,10 +1195,6 @@ export class Inline extends Box {
12051195
return this.bitfield & Box.BITS.hasSizedInline;
12061196
}
12071197

1208-
hasColoredInline() {
1209-
return this.bitfield & Box.BITS.hasColoredInline;
1210-
}
1211-
12121198
hasLineLeftGap() {
12131199
return this.style.hasLineLeftGap(this);
12141200
}

0 commit comments

Comments
 (0)