Title: [287488] trunk
Revision
287488
Author
[email protected]
Date
2021-12-30 17:32:32 -0800 (Thu, 30 Dec 2021)

Log Message

REGRESSION(r286955): Fix painting text-decorations with combined text
https://bugs.webkit.org/show_bug.cgi?id=234707

Reviewed by Dean Jackson.

Source/WebCore:

Test: imported/w3c/web-platform-tests/css/css-writing-modes/text-combine-upright-decorations-001.html

* rendering/TextBoxPainter.cpp:
(WebCore::TextBoxPainter::createDecorationPainter):
(WebCore::TextBoxPainter::paintBackgroundDecorations):
(WebCore::TextBoxPainter::paintForegroundDecorations):

LayoutTests:

* TestExpectations:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (287487 => 287488)


--- trunk/LayoutTests/ChangeLog	2021-12-31 00:26:34 UTC (rev 287487)
+++ trunk/LayoutTests/ChangeLog	2021-12-31 01:32:32 UTC (rev 287488)
@@ -1,3 +1,12 @@
+2021-12-30  Tim Nguyen  <[email protected]>
+
+        REGRESSION(r286955): Fix painting text-decorations with combined text
+        https://bugs.webkit.org/show_bug.cgi?id=234707
+
+        Reviewed by Dean Jackson.
+
+        * TestExpectations:
+
 2021-12-27  Tim Nguyen  <[email protected]>
 
         Implement text-combine-upright property

Modified: trunk/LayoutTests/TestExpectations (287487 => 287488)


--- trunk/LayoutTests/TestExpectations	2021-12-31 00:26:34 UTC (rev 287487)
+++ trunk/LayoutTests/TestExpectations	2021-12-31 01:32:32 UTC (rev 287488)
@@ -4207,7 +4207,6 @@
 webkit.org/b/212046 imported/w3c/web-platform-tests/css/css-flexbox/scrollbars.html [ ImageOnlyFailure ]
 
 # text-combine-upright bugs
-webkit.org/b/234707 imported/w3c/web-platform-tests/css/css-writing-modes/text-combine-upright-decorations-001.html [ ImageOnlyFailure ]
 webkit.org/b/234704 imported/w3c/web-platform-tests/css/css-writing-modes/text-combine-upright-layout-rules-001.html [ ImageOnlyFailure ]
 webkit.org/b/164510 imported/w3c/web-platform-tests/css/css-writing-modes/text-combine-upright-line-breaking-rules-001.html [ ImageOnlyFailure ]
 webkit.org/b/234704 imported/w3c/web-platform-tests/css/css-writing-modes/text-combine-upright-value-all-001.html [ ImageOnlyFailure ]

Modified: trunk/Source/WebCore/ChangeLog (287487 => 287488)


--- trunk/Source/WebCore/ChangeLog	2021-12-31 00:26:34 UTC (rev 287487)
+++ trunk/Source/WebCore/ChangeLog	2021-12-31 01:32:32 UTC (rev 287488)
@@ -1,3 +1,17 @@
+2021-12-30  Tim Nguyen  <[email protected]>
+
+        REGRESSION(r286955): Fix painting text-decorations with combined text
+        https://bugs.webkit.org/show_bug.cgi?id=234707
+
+        Reviewed by Dean Jackson.
+
+        Test: imported/w3c/web-platform-tests/css/css-writing-modes/text-combine-upright-decorations-001.html
+
+        * rendering/TextBoxPainter.cpp:
+        (WebCore::TextBoxPainter::createDecorationPainter):
+        (WebCore::TextBoxPainter::paintBackgroundDecorations):
+        (WebCore::TextBoxPainter::paintForegroundDecorations):
+
 2021-12-27  Tim Nguyen  <[email protected]>
 
         Implement text-combine-upright property

Modified: trunk/Source/WebCore/rendering/TextBoxPainter.cpp (287487 => 287488)


--- trunk/Source/WebCore/rendering/TextBoxPainter.cpp	2021-12-31 00:26:34 UTC (rev 287487)
+++ trunk/Source/WebCore/rendering/TextBoxPainter.cpp	2021-12-31 01:32:32 UTC (rev 287488)
@@ -361,10 +361,6 @@
 
     updateGraphicsContext(context, markedText.style.textStyles);
 
-    bool isCombinedText = textBox().isCombinedText();
-    if (isCombinedText)
-        context.concatCTM(rotation(m_paintRect, Clockwise));
-
     // Note that if the text is truncated, we let the thing being painted in the truncation
     // draw its own decoration.
     GraphicsContextStateSaver stateSaver { context, false };
@@ -396,22 +392,26 @@
 
 void TextBoxPainter::paintBackgroundDecorations(TextDecorationPainter& decorationPainter, const StyledMarkedText& markedText, const FloatRect& snappedSelectionRect)
 {
+    bool isCombinedText = textBox().isCombinedText();
+    if (isCombinedText)
+        m_paintInfo.context().concatCTM(rotation(m_paintRect, Clockwise));
+
     decorationPainter.paintBackgroundDecorations(m_paintTextRun.subRun(markedText.startOffset, markedText.endOffset - markedText.startOffset), textOriginFromPaintRect(snappedSelectionRect), snappedSelectionRect.location());
 
-    if (textBox().isCombinedText()) {
-        GraphicsContext& context = m_paintInfo.context();
-        context.concatCTM(rotation(m_paintRect, Counterclockwise));
-    }
+    if (isCombinedText)
+        m_paintInfo.context().concatCTM(rotation(m_paintRect, Counterclockwise));
 }
 
 void TextBoxPainter::paintForegroundDecorations(TextDecorationPainter& decorationPainter, const FloatRect& snappedSelectionRect)
 {
+    bool isCombinedText = textBox().isCombinedText();
+    if (isCombinedText)
+        m_paintInfo.context().concatCTM(rotation(m_paintRect, Clockwise));
+
     decorationPainter.paintForegroundDecorations(snappedSelectionRect.location());
 
-    if (textBox().isCombinedText()) {
-        GraphicsContext& context = m_paintInfo.context();
-        context.concatCTM(rotation(m_paintRect, Counterclockwise));
-    }
+    if (isCombinedText)
+        m_paintInfo.context().concatCTM(rotation(m_paintRect, Counterclockwise));
 }
 
 void TextBoxPainter::paintCompositionUnderlines()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to