Skip to content

Commit

Permalink
[css-writing-modes] Disable text-combine-upright with sideways writin…
Browse files Browse the repository at this point in the history
…g modes

https://bugs.webkit.org/show_bug.cgi?id=260034
rdar://113703767

Reviewed by Sammy Gill.

text-combine-upright should only work when using vertical typographic modes, not horizontal.

Check for the typographic mode instead of the writing mode, to exclude sideways writing mode (which uses the horizontal typographic mode).

* LayoutTests/TestExpectations:
* Source/WebCore/rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineTextIfNeeded):

Canonical link: https://commits.webkit.org/266792@main
  • Loading branch information
nt1m committed Aug 10, 2023
1 parent a7dc74b commit 6f0a9e8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 0 additions & 4 deletions LayoutTests/TestExpectations
Original file line number Diff line number Diff line change
Expand Up @@ -4476,10 +4476,6 @@ webkit.org/b/234704 imported/w3c/web-platform-tests/css/css-writing-modes/text-c
webkit.org/b/234704 imported/w3c/web-platform-tests/css/css-writing-modes/text-combine-upright-compression-006a.html [ ImageOnlyFailure ]
webkit.org/b/234704 imported/w3c/web-platform-tests/css/css-writing-modes/text-combine-upright-compression-007.html [ ImageOnlyFailure ]

# sideways writing-mode with text-combine-upright
webkit.org/b/260034 imported/w3c/web-platform-tests/css/css-writing-modes/text-combine-upright-sideways-001.html [ ImageOnlyFailure ]
webkit.org/b/260034 imported/w3c/web-platform-tests/css/css-writing-modes/text-combine-upright-sideways-002.html [ ImageOnlyFailure ]

# Used flex-basis should be used to compute definiteness instead of specified.
webkit.org/b/233196 imported/w3c/web-platform-tests/css/css-flexbox/percentage-heights-016.html [ ImageOnlyFailure ]
webkit.org/b/233196 imported/w3c/web-platform-tests/css/css-flexbox/percentage-heights-017.html [ ImageOnlyFailure ]
Expand Down
4 changes: 2 additions & 2 deletions Source/WebCore/rendering/RenderCombineText.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ void RenderCombineText::combineTextIfNeeded()
m_isCombined = false;
m_needsFontUpdate = false;

// CSS3 spec says text-combine works only in vertical writing mode.
if (style().isHorizontalWritingMode())
// text-combine-upright works only in vertical typographic mode.
if (style().typographicMode() == TypographicMode::Horizontal)
return;

auto description = originalFont().fontDescription();
Expand Down

0 comments on commit 6f0a9e8

Please sign in to comment.