Skip to content

Commit

Permalink
[IFC][Integration] Enable first-letter for IFC
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=244098

Reviewed by Antti Koivisto.

First-letter content is a fragment wrapped inside an inline box. IFC supports both.

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

Canonical link: https://commits.webkit.org/253577@main
  • Loading branch information
alanbaradlay committed Aug 19, 2022
1 parent 5440989 commit 1166551
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
Expand Up @@ -118,9 +118,6 @@ static void printReason(AvoidanceReason reason, TextStream& stream)
case AvoidanceReason::FlowHasLineSnap:
stream << "-webkit-line-snap property";
break;
case AvoidanceReason::FlowHasPseudoFirstLetter:
stream << "first-letter";
break;
case AvoidanceReason::FlowHasTextCombine:
stream << "text combine";
break;
Expand Down Expand Up @@ -314,8 +311,6 @@ static OptionSet<AvoidanceReason> canUseForStyle(const RenderElement& renderer,
SET_REASON_AND_RETURN_IF_NEEDED(FlowHasTextOverflow, reasons, includeReasons);
if (style.writingMode() == WritingMode::BottomToTop)
SET_REASON_AND_RETURN_IF_NEEDED(FlowHasUnsupportedWritingMode, reasons, includeReasons);
if (style.hasPseudoStyle(PseudoId::FirstLetter))
SET_REASON_AND_RETURN_IF_NEEDED(FlowHasPseudoFirstLetter, reasons, includeReasons);
if (style.hasTextCombine())
SET_REASON_AND_RETURN_IF_NEEDED(FlowHasTextCombine, reasons, includeReasons);
if (!style.hangingPunctuation().isEmpty())
Expand Down
Expand Up @@ -64,7 +64,7 @@ enum class AvoidanceReason : uint64_t {
// Unused = 1LLU << 22,
// Unused = 1LLU << 23,
// Unused = 1LLU << 24,
FlowHasPseudoFirstLetter = 1LLU << 25,
// Unused = 1LLU << 25,
FlowHasTextCombine = 1LLU << 26,
// Unused = 1LLU << 27,
// Unused = 1LLU << 28,
Expand Down

0 comments on commit 1166551

Please sign in to comment.