From f4e10192ca79e9c81ac56719647f2d45d19ff4be Mon Sep 17 00:00:00 2001 From: Ting-Yu Lin Date: Thu, 29 Sep 2022 03:40:55 +0000 Subject: [PATCH] style: Remove StyleClear::Line Before this patch, StyleClear::Line indicates that the nsLineBox has break-after but no float clearance (note we don't allow line break-before with clear:none); StyleClear::None indicates the line has no break-before nor break-after. In this patch, I added `mHasForcedLineBreak` bit in nsLineBox to indicate the line has a break so that StyleClear can serve its original meaning -- the float clearance. In Part 6, I'll rename more existing methods and variables related to float clearance. Now, instead of using StyleClear::None to clear the line break status, the caller should use ClearForcedLineBreak(); Similar to set SetInlineLineBreakBeforeAndReset() and SetInlineLineBreakAfter on nsReflowStatus, SetBreakTypeBefore/SetBreakTypeAfter on nsLineBox always sets break status with an optional float clearance parameter. This patch shouldn't change the behavior. Differential Revision: https://phabricator.services.mozilla.com/D158224 --- components/style/properties/gecko.mako.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/components/style/properties/gecko.mako.rs b/components/style/properties/gecko.mako.rs index 7bb4571cb20..448acd56e27 100644 --- a/components/style/properties/gecko.mako.rs +++ b/components/style/properties/gecko.mako.rs @@ -1164,7 +1164,6 @@ fn static_assert() { "clear", "Left Right None Both", gecko_enum_prefix="StyleClear", - gecko_inexhaustive=True, ) %> ${impl_keyword('clear', 'mBreakType', clear_keyword)}