Title: [288939] trunk
- Revision
- 288939
- Author
- [email protected]
- Date
- 2022-02-01 20:04:26 -0800 (Tue, 01 Feb 2022)
Log Message
Unreviewed, reverting r288914.
https://bugs.webkit.org/show_bug.cgi?id=235998
Broke some layout tests
Reverted changeset:
"[LFC][IFC] Using Fontcascade::spaceWidth to subtract the
trailing space width may result in incorrect layout"
https://bugs.webkit.org/show_bug.cgi?id=235937
https://commits.webkit.org/r288914
Modified Paths
Removed Paths
- trunk/LayoutTests/platform/mac-bigsur/fonts/
Diff
Modified: trunk/LayoutTests/ChangeLog (288938 => 288939)
--- trunk/LayoutTests/ChangeLog 2022-02-02 02:49:48 UTC (rev 288938)
+++ trunk/LayoutTests/ChangeLog 2022-02-02 04:04:26 UTC (rev 288939)
@@ -1,3 +1,17 @@
+2022-02-01 Commit Queue <[email protected]>
+
+ Unreviewed, reverting r288914.
+ https://bugs.webkit.org/show_bug.cgi?id=235998
+
+ Broke some layout tests
+
+ Reverted changeset:
+
+ "[LFC][IFC] Using Fontcascade::spaceWidth to subtract the
+ trailing space width may result in incorrect layout"
+ https://bugs.webkit.org/show_bug.cgi?id=235937
+ https://commits.webkit.org/r288914
+
2022-02-01 Ben Nham <[email protected]>
Forward messages from NetworkProcess to webpushd
Modified: trunk/Source/WebCore/ChangeLog (288938 => 288939)
--- trunk/Source/WebCore/ChangeLog 2022-02-02 02:49:48 UTC (rev 288938)
+++ trunk/Source/WebCore/ChangeLog 2022-02-02 04:04:26 UTC (rev 288939)
@@ -1,3 +1,17 @@
+2022-02-01 Commit Queue <[email protected]>
+
+ Unreviewed, reverting r288914.
+ https://bugs.webkit.org/show_bug.cgi?id=235998
+
+ Broke some layout tests
+
+ Reverted changeset:
+
+ "[LFC][IFC] Using Fontcascade::spaceWidth to subtract the
+ trailing space width may result in incorrect layout"
+ https://bugs.webkit.org/show_bug.cgi?id=235937
+ https://commits.webkit.org/r288914
+
2022-02-01 Chris Dumez <[email protected]>
Rename ServiceWorkerFetchResult to WorkerFetchResult and make it more generic
Modified: trunk/Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.cpp (288938 => 288939)
--- trunk/Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.cpp 2022-02-02 02:49:48 UTC (rev 288938)
+++ trunk/Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.cpp 2022-02-02 04:04:26 UTC (rev 288939)
@@ -469,7 +469,7 @@
auto width = [&]() -> std::optional<InlineLayoutUnit> {
auto singleWhiteSpace = inlineTextItem.isWhitespace() && (!TextUtil::shouldPreserveSpacesAndTabs(inlineTextBox) || (length == 1 && inlineTextBox.canUseSimplifiedContentMeasuring()));
if (singleWhiteSpace)
- return TextUtil::spaceWidth(inlineTextItem.style().fontCascade());
+ return inlineTextItem.style().fontCascade().spaceWidth();
if (length && !inlineTextItem.isZeroWidthSpaceSeparator())
return TextUtil::width(inlineTextBox, inlineTextItem.style().fontCascade(), start, start + length, { });
return { };
Modified: trunk/Source/WebCore/layout/formattingContexts/inline/text/TextUtil.cpp (288938 => 288939)
--- trunk/Source/WebCore/layout/formattingContexts/inline/text/TextUtil.cpp 2022-02-02 02:49:48 UTC (rev 288938)
+++ trunk/Source/WebCore/layout/formattingContexts/inline/text/TextUtil.cpp 2022-02-02 04:04:26 UTC (rev 288939)
@@ -52,7 +52,7 @@
RELEASE_ASSERT(from >= inlineTextItem.start());
RELEASE_ASSERT(to <= inlineTextItem.end());
if (inlineTextItem.isWhitespace() && !TextUtil::shouldPreserveSpacesAndTabs(inlineTextItem.layoutBox())) {
- auto spaceWidth = TextUtil::spaceWidth(fontCascade);
+ auto spaceWidth = fontCascade.spaceWidth();
return std::isnan(spaceWidth) ? 0.0f : std::isinf(spaceWidth) ? maxInlineLayoutUnit() : spaceWidth;
}
return TextUtil::width(inlineTextItem.inlineTextBox(), fontCascade, from, to, contentLogicalLeft);
@@ -84,16 +84,11 @@
}
if (extendedMeasuring)
- width -= (spaceWidth(fontCascade) + fontCascade.wordSpacing());
+ width -= (fontCascade.spaceWidth() + fontCascade.wordSpacing());
return std::isnan(width) ? 0.0f : std::isinf(width) ? maxInlineLayoutUnit() : width;
}
-InlineLayoutUnit TextUtil::spaceWidth(const FontCascade& fontCascade)
-{
- return fontCascade.width(TextRun { String { &space } });
-}
-
InlineLayoutUnit TextUtil::trailingWhitespaceWidth(const InlineTextBox& inlineTextBox, const FontCascade& fontCascade, size_t startPosition, size_t endPosition)
{
auto text = inlineTextBox.content();
Modified: trunk/Source/WebCore/layout/formattingContexts/inline/text/TextUtil.h (288938 => 288939)
--- trunk/Source/WebCore/layout/formattingContexts/inline/text/TextUtil.h 2022-02-02 02:49:48 UTC (rev 288938)
+++ trunk/Source/WebCore/layout/formattingContexts/inline/text/TextUtil.h 2022-02-02 04:04:26 UTC (rev 288939)
@@ -49,7 +49,6 @@
enum class UseTrailingWhitespaceMeasuringOptimization : uint8_t { Yes, No };
static InlineLayoutUnit width(const InlineTextBox&, const FontCascade&, unsigned from, unsigned to, InlineLayoutUnit contentLogicalLeft, UseTrailingWhitespaceMeasuringOptimization = UseTrailingWhitespaceMeasuringOptimization::Yes);
- static InlineLayoutUnit spaceWidth(const FontCascade&);
static InlineLayoutUnit trailingWhitespaceWidth(const InlineTextBox&, const FontCascade&, size_t startPosition, size_t endPosition);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes