Skip to content

Commit

Permalink
[IFC] Let text content hyphenate even when there's an opaque inline i…
Browse files Browse the repository at this point in the history
…tem in-between them

https://bugs.webkit.org/show_bug.cgi?id=260806

Reviewed by Antti Koivisto.

It addresses cases like in imported/w3c/web-platform-tests/css/css-text/hyphens/hyphens-out-of-flow-002.html.

* Source/WebCore/layout/formattingContexts/inline/InlineContentBreaker.cpp:
(WebCore::Layout::InlineContentBreaker::tryHyphenationAcrossOverflowingInlineTextItems const):

Canonical link: https://commits.webkit.org/267398@main
  • Loading branch information
alanbaradlay committed Aug 29, 2023
1 parent da7c3de commit bd1a9e7
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,9 @@ std::optional<InlineContentBreaker::OverflowingTextContent::BreakingPosition> In
for (size_t index = 0; index < runs.size(); ++index) {
auto& inlineItem = runs[index].inlineItem;
// FIXME: Maybe content across inline boxes should be hyphenated as well.
if (inlineItem.style().fontCascade() != style.fontCascade() || !inlineItem.isText())
if (inlineItem.isOpaque())
continue;
if (!inlineItem.isText() || inlineItem.style().fontCascade() != style.fontCascade())
return { };

auto& inlineTextItem = downcast<InlineTextItem>(inlineItem);
Expand Down

0 comments on commit bd1a9e7

Please sign in to comment.