Diff
Modified: trunk/Source/WebCore/ChangeLog (252685 => 252686)
--- trunk/Source/WebCore/ChangeLog 2019-11-20 07:23:17 UTC (rev 252685)
+++ trunk/Source/WebCore/ChangeLog 2019-11-20 15:18:55 UTC (rev 252686)
@@ -1,3 +1,39 @@
+2019-11-20 Zalan Bujtas <[email protected]>
+
+ [LFC][IFC] TextUtil::width should use FontCascade::widthForSimpleText when applicable
+ https://bugs.webkit.org/show_bug.cgi?id=204393
+ <rdar://problem/57347144>
+
+ Reviewed by Antti Koivisto.
+
+ This is one of reasons why simple line layout performs better than complex line layout.
+
+ * WebCore.xcodeproj/project.pbxproj:
+ * layout/blockformatting/BlockFormattingContext.cpp:
+ (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin):
+ * layout/inlineformatting/InlineLine.cpp:
+ (WebCore::Layout::Line::Run::expand):
+ (WebCore::Layout::Line::appendTextContent):
+ * layout/inlineformatting/InlineTextItem.cpp:
+ (WebCore::Layout::moveToNextNonWhitespacePosition):
+ (WebCore::Layout::InlineTextItem::createAndAppendTextItems):
+ * layout/inlineformatting/text/TextUtil.cpp:
+ (WebCore::Layout::TextUtil::width):
+ (WebCore::Layout::TextUtil::fixedPitchWidth):
+ * layout/inlineformatting/text/TextUtil.h:
+ * layout/layouttree/LayoutBox.cpp:
+ (WebCore::Layout::Box::Box):
+ (WebCore::Layout::Box::setTextContext):
+ (WebCore::Layout::Box::hasTextContent const):
+ (WebCore::Layout::Box::textContext const):
+ (WebCore::Layout::Box::setTextContent): Deleted.
+ (WebCore::Layout::Box::textContent const): Deleted.
+ * layout/layouttree/LayoutBox.h:
+ * layout/layouttree/LayoutTreeBuilder.cpp:
+ (WebCore::Layout::canUseSimplifiedTextMeasuring):
+ (WebCore::Layout::TreeBuilder::createLayoutBox):
+ (WebCore::Layout::outputLayoutBox):
+
2019-11-19 Devin Rousso <[email protected]>
Web Inspector: DOM.highlightSelector should work for "div, div::before"
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (252685 => 252686)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2019-11-20 07:23:17 UTC (rev 252685)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2019-11-20 15:18:55 UTC (rev 252686)
@@ -377,6 +377,7 @@
11310CF620BA4A560065A8D0 /* LayoutChildIterator.h in Headers */ = {isa = PBXBuildFile; fileRef = 11100FC920927CBC0081AA6C /* LayoutChildIterator.h */; settings = {ATTRIBUTES = (Private, ); }; };
11310CF720BA4A620065A8D0 /* LayoutAncestorIterator.h in Headers */ = {isa = PBXBuildFile; fileRef = 11100FCA2092868D0081AA6C /* LayoutAncestorIterator.h */; settings = {ATTRIBUTES = (Private, ); }; };
113409DA203E038000C66915 /* RenderTreeBuilderContinuation.h in Headers */ = {isa = PBXBuildFile; fileRef = 113409D8203E038000C66915 /* RenderTreeBuilderContinuation.h */; };
+ 113A3CB42385860100AE3ECE /* TextContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 113A3CB22385860000AE3ECE /* TextContext.h */; settings = {ATTRIBUTES = (Private, ); }; };
113D0B521F9FDD2B00F611BB /* FrameViewLayoutContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 113D0B501F9FDD2B00F611BB /* FrameViewLayoutContext.h */; settings = {ATTRIBUTES = (Private, ); }; };
115CFA6A208AF7D0001E6991 /* FormattingContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 115CFA68208AF7D0001E6991 /* FormattingContext.h */; settings = {ATTRIBUTES = (Private, ); }; };
115CFA6E208AFAB7001E6991 /* BlockFormattingContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 115CFA6C208AFAB6001E6991 /* BlockFormattingContext.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -5864,6 +5865,7 @@
112B34D41E60B98300BB310A /* SimpleLineLayoutPagination.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimpleLineLayoutPagination.h; sourceTree = "<group>"; };
113409D7203E038000C66915 /* RenderTreeBuilderContinuation.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = RenderTreeBuilderContinuation.cpp; sourceTree = "<group>"; };
113409D8203E038000C66915 /* RenderTreeBuilderContinuation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RenderTreeBuilderContinuation.h; sourceTree = "<group>"; };
+ 113A3CB22385860000AE3ECE /* TextContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextContext.h; sourceTree = "<group>"; };
113D0B4F1F9FDD2B00F611BB /* FrameViewLayoutContext.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = FrameViewLayoutContext.cpp; sourceTree = "<group>"; };
113D0B501F9FDD2B00F611BB /* FrameViewLayoutContext.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FrameViewLayoutContext.h; sourceTree = "<group>"; };
115CA83023328B1E00FD3B08 /* LayoutUnits.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = LayoutUnits.cpp; sourceTree = "<group>"; };
@@ -16656,6 +16658,7 @@
111C615620AD1AE1005B82FA /* LayoutReplaced.h */,
11100FD5209514DE0081AA6C /* LayoutTreeBuilder.cpp */,
11100FD7209514DF0081AA6C /* LayoutTreeBuilder.h */,
+ 113A3CB22385860000AE3ECE /* TextContext.h */,
);
path = layouttree;
sourceTree = "<group>";
@@ -29320,7 +29323,6 @@
AA21ECCD0ABF0FC6002B834C /* CSSCursorImageValue.h in Headers */,
9444CBE41D8861990073A074 /* CSSCustomIdentValue.h in Headers */,
BC779E141BB215BB00CAA8BF /* CSSCustomPropertyValue.h in Headers */,
- 4A9CC81816BB9AC600EC645A /* UserAgentStyle.h in Headers */,
94476BDB1DFCAC0300690E23 /* CSSDeferredParser.h in Headers */,
FBB0C5B817BBD629003D3677 /* CSSFilterImageValue.h in Headers */,
BC64B4D60CB4298A005F2B62 /* CSSFontFace.h in Headers */,
@@ -31228,7 +31230,6 @@
E45BA6AA2374926C004DFC07 /* MatchedDeclarationsCache.h in Headers */,
FABE72F51059C1EB00D888CC /* MathMLAnnotationElement.h in Headers */,
FABE72F51059C1EB00D999DD /* MathMLElement.h in Headers */,
- E4863CFE23842E9E00972158 /* RuleData.h in Headers */,
44A28AAC12DFB8AC00AE923B /* MathMLElementFactory.h in Headers */,
0BCF83F71059C1EB00D999DD /* MathMLFractionElement.h in Headers */,
FABE72F91059C1EB00D999DD /* MathMLMathElement.h in Headers */,
@@ -31977,6 +31978,7 @@
078E094717D16E1C00420AA1 /* RTCVoidRequest.h in Headers */,
5824ABA31AE81116009074B7 /* RubyElement.h in Headers */,
5824ABA71AE81384009074B7 /* RubyTextElement.h in Headers */,
+ E4863CFE23842E9E00972158 /* RuleData.h in Headers */,
A79BADA2161E7F3F00C2E652 /* RuleFeature.h in Headers */,
A79BADA4161E7F3F00C2E652 /* RuleSet.h in Headers */,
2D76BB821945632400CFD29A /* RunLoopObserver.h in Headers */,
@@ -32525,6 +32527,7 @@
B2C3DA400D006C1D00EF6F26 /* TextCodecUserDefined.h in Headers */,
B2C3DA420D006C1D00EF6F26 /* TextCodecUTF16.h in Headers */,
9343CB8212F25E510033C5EE /* TextCodecUTF8.h in Headers */,
+ 113A3CB42385860100AE3ECE /* TextContext.h in Headers */,
142B97CA13138943008BEF4B /* TextControlInnerElements.h in Headers */,
582DE3251C30C85400BE02A8 /* TextDecorationPainter.h in Headers */,
1C73A71521857587004CCEA5 /* TextDecorationThickness.h in Headers */,
@@ -32645,6 +32648,7 @@
868160D618766A130021E79D /* UserActivity.h in Headers */,
A3AF9D8620326861006CAD06 /* UserAgent.h in Headers */,
CDAB6D3117C9259500C60B34 /* UserAgentScripts.h in Headers */,
+ 4A9CC81816BB9AC600EC645A /* UserAgentStyle.h in Headers */,
656581B209D14EE6000E61D7 /* UserAgentStyleSheets.h in Headers */,
1AE79D43188DB61F002239C2 /* UserContentController.h in Headers */,
7C3F01C11C8E5ABA00ADD962 /* UserContentProvider.h in Headers */,
Modified: trunk/Source/WebCore/layout/inlineformatting/InlineLine.cpp (252685 => 252686)
--- trunk/Source/WebCore/layout/inlineformatting/InlineLine.cpp 2019-11-20 07:23:17 UTC (rev 252685)
+++ trunk/Source/WebCore/layout/inlineformatting/InlineLine.cpp 2019-11-20 15:18:55 UTC (rev 252686)
@@ -131,7 +131,7 @@
m_logicalRect.expandHorizontally(nextRun.logicalRect().width());
auto expandedLength = m_textContext->length() + nextRun.textContext()->length();
- m_textContext->expand(StringView(layoutBox().textContent()).substring(m_textContext->start(), expandedLength), expandedLength);
+ m_textContext->expand(layoutBox().textContext().content.substring(m_textContext->start(), expandedLength), expandedLength);
// FIXME: This is a very simple expansion merge. We should eventually switch over to FontCascade::expansionOpportunityCount.
if (hasExpansionOpportunity() && nextRun.hasExpansionOpportunity()) {
@@ -549,7 +549,7 @@
auto collapsedRun = inlineItem.isCollapsible() && inlineItem.length() > 1;
auto contentStart = inlineItem.start();
auto contentLength = collapsedRun ? 1 : inlineItem.length();
- auto lineRun = makeUnique<InlineItemRun>(inlineItem, logicalRect, Display::Run::TextContext { contentStart, contentLength, StringView(inlineItem.layoutBox().textContent()).substring(contentStart, contentLength) });
+ auto lineRun = makeUnique<InlineItemRun>(inlineItem, logicalRect, Display::Run::TextContext { contentStart, contentLength, inlineItem.layoutBox().textContext().content.substring(contentStart, contentLength) });
auto collapsesToZeroAdvanceWidth = willCollapseCompletely();
if (collapsesToZeroAdvanceWidth)
Modified: trunk/Source/WebCore/layout/inlineformatting/InlineTextItem.cpp (252685 => 252686)
--- trunk/Source/WebCore/layout/inlineformatting/InlineTextItem.cpp 2019-11-20 07:23:17 UTC (rev 252685)
+++ trunk/Source/WebCore/layout/inlineformatting/InlineTextItem.cpp 2019-11-20 15:18:55 UTC (rev 252686)
@@ -38,7 +38,7 @@
return character == ' ' || character == '\t';
}
-static unsigned moveToNextNonWhitespacePosition(String textContent, unsigned startPosition)
+static unsigned moveToNextNonWhitespacePosition(const StringView& textContent, unsigned startPosition)
{
auto nextNonWhiteSpacePosition = startPosition;
while (nextNonWhiteSpacePosition < textContent.length() && isWhitespaceCharacter(textContent[nextNonWhiteSpacePosition]))
@@ -82,7 +82,7 @@
void InlineTextItem::createAndAppendTextItems(InlineItems& inlineContent, const Box& inlineBox)
{
- auto text = inlineBox.textContent();
+ auto text = inlineBox.textContext().content;
if (!text.length())
return inlineContent.append(InlineTextItem::createEmptyItem(inlineBox));
Modified: trunk/Source/WebCore/layout/inlineformatting/text/TextUtil.cpp (252685 => 252686)
--- trunk/Source/WebCore/layout/inlineformatting/text/TextUtil.cpp 2019-11-20 07:23:17 UTC (rev 252685)
+++ trunk/Source/WebCore/layout/inlineformatting/text/TextUtil.cpp 2019-11-20 15:18:55 UTC (rev 252686)
@@ -46,7 +46,8 @@
if (!font.size() || from == to)
return 0;
- auto text = inlineBox.textContent();
+ auto& textContext = inlineBox.textContext();
+ auto& text = textContext.content;
ASSERT(to <= text.length());
if (font.isFixedPitch())
@@ -57,13 +58,16 @@
if (measureWithEndSpace)
++to;
LayoutUnit width;
- auto tabWidth = style.collapseWhiteSpace() ? TabSize(0) : style.tabSize();
+ if (textContext.canUseSimplifiedContentMeasuring)
+ width = font.widthForSimpleText(text.substring(from, to - from));
+ else {
+ auto tabWidth = style.collapseWhiteSpace() ? TabSize(0) : style.tabSize();
+ WebCore::TextRun run(text.substring(from, to - from), contentLogicalLeft);
+ if (tabWidth)
+ run.setTabSize(true, tabWidth);
+ width = font.width(run);
+ }
- WebCore::TextRun run(StringView(text).substring(from, to - from), contentLogicalLeft);
- if (tabWidth)
- run.setTabSize(true, tabWidth);
- width = font.width(run);
-
if (measureWithEndSpace)
width -= (font.spaceWidth() + font.wordSpacing());
@@ -70,7 +74,7 @@
return std::max<LayoutUnit>(0, width);
}
-LayoutUnit TextUtil::fixedPitchWidth(String text, const RenderStyle& style, unsigned from, unsigned to, LayoutUnit contentLogicalLeft)
+LayoutUnit TextUtil::fixedPitchWidth(const StringView& text, const RenderStyle& style, unsigned from, unsigned to, LayoutUnit contentLogicalLeft)
{
auto& font = style.fontCascade();
auto monospaceCharacterWidth = font.spaceWidth();
Modified: trunk/Source/WebCore/layout/inlineformatting/text/TextUtil.h (252685 => 252686)
--- trunk/Source/WebCore/layout/inlineformatting/text/TextUtil.h 2019-11-20 07:23:17 UTC (rev 252685)
+++ trunk/Source/WebCore/layout/inlineformatting/text/TextUtil.h 2019-11-20 15:18:55 UTC (rev 252686)
@@ -44,7 +44,7 @@
static SplitData split(const Box&, unsigned startPosition, unsigned length, LayoutUnit textWidth, LayoutUnit availableWidth, LayoutUnit contentLogicalLeft);
private:
- static LayoutUnit fixedPitchWidth(String, const RenderStyle&, unsigned from, unsigned to, LayoutUnit contentLogicalLeft);
+ static LayoutUnit fixedPitchWidth(const StringView&, const RenderStyle&, unsigned from, unsigned to, LayoutUnit contentLogicalLeft);
};
}
Modified: trunk/Source/WebCore/layout/layouttree/LayoutBox.cpp (252685 => 252686)
--- trunk/Source/WebCore/layout/layouttree/LayoutBox.cpp 2019-11-20 07:23:17 UTC (rev 252685)
+++ trunk/Source/WebCore/layout/layouttree/LayoutBox.cpp 2019-11-20 15:18:55 UTC (rev 252686)
@@ -54,10 +54,10 @@
{
}
-Box::Box(String textContent, RenderStyle&& style)
+Box::Box(TextContext&& textContext, RenderStyle&& style)
: Box({ }, WTFMove(style), BaseTypeFlag::BoxFlag)
{
- setTextContent(textContent);
+ setTextContext(WTFMove(textContext));
}
Box::~Box()
@@ -386,23 +386,23 @@
&& !isTableColumn();
}
-void Box::setTextContent(String textContent)
+void Box::setTextContext(TextContext&& textContext)
{
ASSERT(isInlineLevelBox());
- ensureRareData().textContent = textContent;
+ ensureRareData().textContext = WTFMove(textContext);
}
bool Box::hasTextContent() const
{
ASSERT(isInlineLevelBox());
- return hasRareData() && !rareData().textContent.isNull();
+ return hasRareData() && !rareData().textContext.content.isNull();
}
-String Box::textContent() const
+const TextContext& Box::textContext() const
{
ASSERT(hasRareData());
ASSERT(isInlineLevelBox());
- return rareData().textContent;
+ return rareData().textContext;
}
const Replaced* Box::replaced() const
Modified: trunk/Source/WebCore/layout/layouttree/LayoutBox.h (252685 => 252686)
--- trunk/Source/WebCore/layout/layouttree/LayoutBox.h 2019-11-20 07:23:17 UTC (rev 252685)
+++ trunk/Source/WebCore/layout/layouttree/LayoutBox.h 2019-11-20 15:18:55 UTC (rev 252686)
@@ -29,6 +29,7 @@
#include "LayoutReplaced.h"
#include "RenderStyle.h"
+#include "TextContext.h"
#include <wtf/IsoMalloc.h>
#include <wtf/WeakPtr.h>
@@ -63,7 +64,7 @@
typedef unsigned BaseTypeFlags;
Box(Optional<ElementAttributes>, RenderStyle&&);
- Box(String textContent, RenderStyle&&);
+ Box(TextContext&&, RenderStyle&&);
virtual ~Box();
bool establishesFormattingContext() const;
@@ -143,7 +144,7 @@
// FIXME: Temporary until after intrinsic size change is tracked by Replaced.
Replaced* replaced();
bool hasTextContent() const;
- String textContent() const;
+ const TextContext& textContext() const;
// FIXME: Find a better place for random DOM things.
void setRowSpan(unsigned);
@@ -165,7 +166,7 @@
Box(Optional<ElementAttributes>, RenderStyle&&, BaseTypeFlags);
private:
- void setTextContent(String);
+ void setTextContext(TextContext&&);
class BoxRareData {
WTF_MAKE_FAST_ALLOCATED;
@@ -172,7 +173,7 @@
public:
BoxRareData() = default;
- String textContent;
+ TextContext textContext;
std::unique_ptr<Replaced> replaced;
unsigned rowSpan { 1 };
unsigned columnSpan { 1 };
Modified: trunk/Source/WebCore/layout/layouttree/LayoutTreeBuilder.cpp (252685 => 252686)
--- trunk/Source/WebCore/layout/layouttree/LayoutTreeBuilder.cpp 2019-11-20 07:23:17 UTC (rev 252685)
+++ trunk/Source/WebCore/layout/layouttree/LayoutTreeBuilder.cpp 2019-11-20 15:18:55 UTC (rev 252686)
@@ -110,6 +110,21 @@
return text;
}
+static bool canUseSimplifiedTextMeasuring(const StringView& content, const FontCascade& font, bool whitespaceIsCollapsed)
+{
+ if (!content.is8Bit() && !content.isAllASCII() && FontCascade::characterRangeCodePath(content.characters16(), content.length()) != FontCascade::Simple)
+ return false;
+
+ if (font.wordSpacing() || font.letterSpacing())
+ return false;
+
+ for (unsigned i = 0; i < content.length(); ++i) {
+ if ((!whitespaceIsCollapsed && content[i] == '\t') || content[i] == noBreakSpace || content[i] >= HiraganaLetterSmallA)
+ return false;
+ }
+ return true;
+}
+
std::unique_ptr<Layout::LayoutTreeContent> TreeBuilder::buildLayoutTree(const RenderView& renderView)
{
PhaseScope scope(Phase::Type::TreeBuilding);
@@ -156,12 +171,13 @@
std::unique_ptr<Box> childLayoutBox;
if (is<RenderText>(childRenderer)) {
auto& textRenderer = downcast<RenderText>(childRenderer);
- auto textContent = applyTextTransform(textRenderer.originalText(), parentRenderer.style());
+ auto text = applyTextTransform(textRenderer.originalText(), parentRenderer.style());
// FIXME: Clearly there must be a helper function for this.
+ auto textContent = TextContext { text, canUseSimplifiedTextMeasuring(text, parentRenderer.style().fontCascade(), parentRenderer.style().collapseWhiteSpace()) };
if (parentRenderer.style().display() == DisplayType::Inline)
- childLayoutBox = makeUnique<Box>(textContent, RenderStyle::clone(parentRenderer.style()));
+ childLayoutBox = makeUnique<Box>(WTFMove(textContent), RenderStyle::clone(parentRenderer.style()));
else
- childLayoutBox = makeUnique<Box>(textContent, RenderStyle::createAnonymousStyleWithDisplay(parentRenderer.style(), DisplayType::Inline));
+ childLayoutBox = makeUnique<Box>(WTFMove(textContent), RenderStyle::createAnonymousStyleWithDisplay(parentRenderer.style(), DisplayType::Inline));
} else {
auto& renderer = downcast<RenderElement>(childRenderer);
auto displayType = renderer.style().display();
@@ -372,7 +388,7 @@
stream << " at (" << displayBox->left() << "," << displayBox->top() << ") size " << displayBox->width() << "x" << displayBox->height();
stream << " layout box->(" << &layoutBox << ")";
if (layoutBox.isInlineLevelBox() && layoutBox.isAnonymous())
- stream << " text content [\"" << layoutBox.textContent().utf8().data() << "\"]";
+ stream << " text content [\"" << layoutBox.textContext().content.utf8().data() << "\"]";
stream.nextLine();
}
Copied: trunk/Source/WebCore/layout/layouttree/TextContext.h (from rev 252685, trunk/Source/WebCore/layout/inlineformatting/text/TextUtil.h) (0 => 252686)
--- trunk/Source/WebCore/layout/layouttree/TextContext.h (rev 0)
+++ trunk/Source/WebCore/layout/layouttree/TextContext.h 2019-11-20 15:18:55 UTC (rev 252686)
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2019 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if ENABLE(LAYOUT_FORMATTING_CONTEXT)
+
+#include <wtf/text/StringView.h>
+
+namespace WebCore {
+namespace Layout {
+
+struct TextContext {
+ WTF_MAKE_FAST_ALLOCATED;
+public:
+ StringView content;
+ bool canUseSimplifiedContentMeasuring { false };
+};
+
+}
+}
+#endif