Skip to content

Commit

Permalink
[IFC][hanging punctuation] Enable "hanging punctuation: force-end"
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=249714

Reviewed by Tim Nguyen.

"hanging-punctuation: force-end": a stop or comma at the end of a line hangs.
https://w3c.github.io/csswg-drafts/css-text/#hanging-punctuation-property

* Source/WebCore/layout/integration/LayoutIntegrationCoverage.cpp:
(WebCore::LayoutIntegration::printReason):
(WebCore::LayoutIntegration::canUseForStyle):
* Source/WebCore/layout/integration/LayoutIntegrationCoverage.h:

Canonical link: https://commits.webkit.org/258336@main
  • Loading branch information
alanbaradlay authored and nt1m committed Dec 27, 2022
1 parent 609dbb7 commit f2e8e1c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
Expand Up @@ -94,9 +94,6 @@ static void printReason(AvoidanceReason reason, TextStream& stream)
case AvoidanceReason::ContentIsRuby:
stream << "ruby";
break;
case AvoidanceReason::FlowHasUnsupportedHangingPunctuation:
stream << "unsupported hanging punctuation";
break;
case AvoidanceReason::FlowIsPaginated:
stream << "paginated";
break;
Expand Down Expand Up @@ -300,8 +297,6 @@ static OptionSet<AvoidanceReason> canUseForStyle(const RenderElement& renderer,
OptionSet<AvoidanceReason> reasons;
if (style.writingMode() == WritingMode::BottomToTop)
SET_REASON_AND_RETURN_IF_NEEDED(FlowHasUnsupportedWritingMode, reasons, includeReasons);
if (style.hangingPunctuation().contains(HangingPunctuation::ForceEnd))
SET_REASON_AND_RETURN_IF_NEEDED(FlowHasUnsupportedHangingPunctuation, reasons, includeReasons)
if (style.styleType() == PseudoId::FirstLetter && (!style.initialLetter().isEmpty() || style.initialLetterDrop() || style.initialLetterHeight()))
SET_REASON_AND_RETURN_IF_NEEDED(FlowHasInitialLetter, reasons, includeReasons);
// These are non-standard properties.
Expand Down
Expand Up @@ -81,7 +81,7 @@ enum class AvoidanceReason : uint64_t {
FeatureIsDisabled = 1LLU << 41,
FlowDoesNotEstablishInlineFormattingContext = 1LLU << 42,
// Unused = 1LLU << 43,
FlowHasUnsupportedHangingPunctuation = 1LLU << 44,
// Unused = 1LLU << 44,
// Unused = 1LLU << 45,
// Unused = 1LLU << 46,
MultiColumnFlowIsNotTopLevel = 1LLU << 47,
Expand Down

0 comments on commit f2e8e1c

Please sign in to comment.