Title: [253911] trunk/Source/WebCore
- Revision
- 253911
- Author
- [email protected]
- Date
- 2019-12-25 10:26:36 -0800 (Wed, 25 Dec 2019)
Log Message
[LFC][Painting] Fix LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/tab-stop-threshold-001.html
https://bugs.webkit.org/show_bug.cgi?id=205594
<rdar://problem/58194138>
Reviewed by Antti Koivisto.
Construct the TextRun with relative coordinates to get tab stops right.
* layout/displaytree/DisplayPainter.cpp:
(WebCore::Display::paintInlineContent):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (253910 => 253911)
--- trunk/Source/WebCore/ChangeLog 2019-12-25 17:50:57 UTC (rev 253910)
+++ trunk/Source/WebCore/ChangeLog 2019-12-25 18:26:36 UTC (rev 253911)
@@ -1,5 +1,18 @@
2019-12-25 Zalan Bujtas <[email protected]>
+ [LFC][Painting] Fix LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/tab-stop-threshold-001.html
+ https://bugs.webkit.org/show_bug.cgi?id=205594
+ <rdar://problem/58194138>
+
+ Reviewed by Antti Koivisto.
+
+ Construct the TextRun with relative coordinates to get tab stops right.
+
+ * layout/displaytree/DisplayPainter.cpp:
+ (WebCore::Display::paintInlineContent):
+
+2019-12-25 Zalan Bujtas <[email protected]>
+
[LFC][IFC] Forward scan for soft wrap opportunities
https://bugs.webkit.org/show_bug.cgi?id=205584
<rdar://problem/58188386>
Modified: trunk/Source/WebCore/layout/displaytree/DisplayPainter.cpp (253910 => 253911)
--- trunk/Source/WebCore/layout/displaytree/DisplayPainter.cpp 2019-12-25 17:50:57 UTC (rev 253910)
+++ trunk/Source/WebCore/layout/displaytree/DisplayPainter.cpp 2019-12-25 18:26:36 UTC (rev 253911)
@@ -126,14 +126,16 @@
context.setStrokeColor(style.color());
context.setFillColor(style.color());
- auto logicalLeft = absoluteOffset.x() + run.logicalLeft();
+ auto absoluteLogicalLeft = absoluteOffset.x() + run.logicalLeft();
// FIXME: Add non-baseline align painting
auto& lineBox = displayInlineContent->lineBoxForRun(run);
auto baselineOffset = absoluteOffset.y() + lineBox.logicalTop() + lineBox.baselineOffset();
- if (auto expansionContext = textContext->expansion())
- context.drawText(style.fontCascade(), TextRun { textContext->content(), logicalLeft, expansionContext->horizontalExpansion, expansionContext->behavior }, { logicalLeft, baselineOffset });
- else
- context.drawText(style.fontCascade(), TextRun { textContext->content(), logicalLeft }, { logicalLeft, baselineOffset });
+ auto expansionContext = textContext->expansion();
+ auto textRun = TextRun { textContext->content(), run.logicalLeft(),
+ expansionContext ? expansionContext->horizontalExpansion : 0,
+ expansionContext ? expansionContext->behavior : DefaultExpansion };
+ textRun.setTabSize(!style.collapseWhiteSpace(), style.tabSize());
+ context.drawText(style.fontCascade(), textRun, { absoluteLogicalLeft, baselineOffset });
} else if (auto* cachedImage = run.image()) {
auto runAbsoluteRect = FloatRect { absoluteOffset.x() + run.logicalLeft(), absoluteOffset.y() + run.logicalTop(), run.logicalWidth(), run.logicalHeight() };
context.drawImage(*cachedImage->image(), runAbsoluteRect);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes