summaryrefslogtreecommitdiffstats
path: root/layout/generic/nsTextFrame.cpp
diff options
context:
space:
mode:
authorathenian200 <athenian200@outlook.com>2020-10-18 10:45:55 -0500
committerathenian200 <athenian200@outlook.com>2020-10-18 10:45:55 -0500
commit95b4e5084b7fbe62609cfe9680eed5db135a57c8 (patch)
treeeb7ca4ae3da96bf3049c3da41fc511ff3154515e /layout/generic/nsTextFrame.cpp
parent1fc996152b7a1b0f61287c85ddc1698013ea63c0 (diff)
parent87c4c77ad79f346d9104d9586c9928f30a500632 (diff)
downloadUXP-95b4e5084b7fbe62609cfe9680eed5db135a57c8.tar
UXP-95b4e5084b7fbe62609cfe9680eed5db135a57c8.tar.gz
UXP-95b4e5084b7fbe62609cfe9680eed5db135a57c8.tar.lz
UXP-95b4e5084b7fbe62609cfe9680eed5db135a57c8.tar.xz
UXP-95b4e5084b7fbe62609cfe9680eed5db135a57c8.zip
Merge branch 'master' of https://github.com/MoonchildProductions/UXP into caret_color
Diffstat (limited to 'layout/generic/nsTextFrame.cpp')
-rw-r--r--layout/generic/nsTextFrame.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/layout/generic/nsTextFrame.cpp b/layout/generic/nsTextFrame.cpp
index e2a629a07..fcce7f3f6 100644
--- a/layout/generic/nsTextFrame.cpp
+++ b/layout/generic/nsTextFrame.cpp
@@ -1,5 +1,4 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -8244,6 +8243,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) {