summaryrefslogtreecommitdiffstats
path: root/layout/generic
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2020-10-06 09:32:46 +0000
committerMoonchild <moonchild@palemoon.org>2020-10-06 09:32:46 +0000
commita98d06380fe706e3b1b602411c597b9882516b3e (patch)
tree60452c5f39b8dc60a8e97454d4103baf2cd194ae /layout/generic
parent63a0006985036b062eed7e9e83324581d8ab247c (diff)
parent1e8d07cac205a5db3d7d416d7f414a213fd892ff (diff)
downloadUXP-a98d06380fe706e3b1b602411c597b9882516b3e.tar
UXP-a98d06380fe706e3b1b602411c597b9882516b3e.tar.gz
UXP-a98d06380fe706e3b1b602411c597b9882516b3e.tar.lz
UXP-a98d06380fe706e3b1b602411c597b9882516b3e.tar.xz
UXP-a98d06380fe706e3b1b602411c597b9882516b3e.zip
Merge branch 'redwood' into release
Diffstat (limited to 'layout/generic')
-rw-r--r--layout/generic/nsTextFrame.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/layout/generic/nsTextFrame.cpp b/layout/generic/nsTextFrame.cpp
index 4bc542626..a47b87e38 100644
--- a/layout/generic/nsTextFrame.cpp
+++ b/layout/generic/nsTextFrame.cpp
@@ -8245,6 +8245,17 @@ nsTextFrame::AddInlineMinISizeForFlow(nsRenderingContext *aRenderingContext,
return;
}
+ // If overflow-wrap is 'anywhere', we can wrap everywhere.
+ if (textStyle->mOverflowWrap == NS_STYLE_OVERFLOWWRAP_ANYWHERE &&
+ textStyle->WordCanWrap(this)) {
+ aData->OptionallyBreak();
+ aData->mCurrentLine +=
+ textRun->GetMinAdvanceWidth(Range(start, flowEndInTextRun));
+ aData->mTrailingWhitespace = 0;
+ aData->OptionallyBreak();
+ return;
+ }
+
AutoTArray<bool,BIG_TEXT_NODE_SIZE> hyphBuffer;
bool *hyphBreakBefore = nullptr;
if (hyphenating) {