New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
text-combine-upright: all
& text-transform
don't work together
#8703
text-combine-upright: all
& text-transform
don't work together
#8703
Conversation
EWS run on previous version of this PR (hash 402b261) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the test could be a web-platform-test in the css/css-writing-modes directory, but not required for this patch.
LayoutTests/fast/text/text-combine-text-transform-expected.html
Outdated
Show resolved
Hide resolved
LayoutTests/fast/text/text-combine-text-transform-expected.html
Outdated
Show resolved
Hide resolved
402b261
to
d757636
Compare
EWS run on previous version of this PR (hash d757636) |
LayoutTests/fast/text/text-combine-text-transform-expected.html
Outdated
Show resolved
Hide resolved
`text-combine-upright: all` & `text-transform` don't work together https://bugs.webkit.org/show_bug.cgi?id=250657 Reviewed by NOBODY (OOPS!). This patch is to align WebKit with Gecko / Firefox and Blink / Chromium. Merge - https://src.chromium.org/viewvc/blink?view=rev&revision=167624 When we transform text, we set transformed text to RenderText::m_text. RenderCombineText overwrites the text at combineText() and use originalText() at combineTextIfNeeded() in painting. Therefore, text combine paints original text instead of transformed text. * Source/WebCore/rendering/RenderCombineText.h: Add "m_renderedText" as String definition * Source/WebCore/rendering/RenderCombineText.cpp: (RenderCombineText::combineTextIfNeeded): Change 'originalText' to "m_renderedText" and call it also while object replacement * LayoutTests/fast/text/text-combine-upright-text-transform.html: Add Test Case * LayoutTests/fast/text/text-combine-upright-text-transform-expected.html: Add Test Case Expectation
d757636
to
2537d1f
Compare
EWS run on current version of this PR (hash 2537d1f) |
@@ -99,7 +100,7 @@ void RenderCombineText::combineTextIfNeeded() | |||
|
|||
// An ancestor element may trigger us to lay out again, even when we're already combined. | |||
if (m_isCombined) | |||
RenderText::setRenderedText(originalText()); | |||
RenderText::setRenderedText(m_renderedText); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like the original intended was to copy the string.
@darinadler @cdumez The original Blink patch did RenderText::setRenderedText(m_renderedText.impl())
, although I'm not sure if that's the common pattern.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks right to me. No reason to take the StringImpl here, they should be equivalent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like maybe the Blink merge simply isn't working, the initial version without any of my requested changes had the test failing on Windows.
@@ -53,6 +54,7 @@ class RenderCombineText final : public RenderText { | |||
float m_combinedTextWidth { 0 }; | |||
float m_combinedTextAscent { 0 }; | |||
float m_combinedTextDescent { 0 }; | |||
String m_renderedText; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This naming is confusing. It does not represent the rendered combined text, this is pre-combined after-transformed text.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not even sure if I agree with this approach, but since RenderCombine is going to go through a proper refactoring soonish, I guess this will do for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per #8703 (comment), seems like the patch isn't working (even before my requested changes).
I'd recommend contributing the tests to WPT so we can make sure we fix this later on however.
Left comment on main bug and closing this PR now. Thanks all! |
2537d1f