PR 1507
This commit is contained in:
@@ -22,6 +22,10 @@ struct BlockStyle {
|
||||
int16_t textIndent = 0;
|
||||
bool textIndentDefined = false; // true if text-indent was explicitly set in CSS
|
||||
bool textAlignDefined = false; // true if text-align was explicitly set in CSS
|
||||
// Set when this block was created by a <br> element. Used by startNewTextBlock to inject
|
||||
// a full line-height gap when the <br> block stays empty (section-break use case).
|
||||
// NOT propagated through getCombinedBlockStyle so it can't leak into sibling blocks.
|
||||
bool fromBrElement = false;
|
||||
|
||||
// Combined horizontal insets (margin + padding)
|
||||
[[nodiscard]] int16_t leftInset() const { return marginLeft + paddingLeft; }
|
||||
@@ -58,6 +62,9 @@ struct BlockStyle {
|
||||
combinedBlockStyle.alignment = alignment;
|
||||
combinedBlockStyle.textAlignDefined = textAlignDefined;
|
||||
}
|
||||
// fromBrElement is never propagated — it is consumed by startNewTextBlock
|
||||
// when the empty <br> block is merged with the following paragraph.
|
||||
combinedBlockStyle.fromBrElement = false;
|
||||
return combinedBlockStyle;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user