summaryrefslogtreecommitdiff
path: root/layout/generic/nsTextFrame.cpp
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2020-10-03 14:52:47 +0000
committerMoonchild <moonchild@palemoon.org>2020-10-03 14:52:47 +0000
commitdadef50bdc3c6b546aad9e3231943e41ad3ccb97 (patch)
tree80c79b8882e002803573c8a74a66f275d0601477 /layout/generic/nsTextFrame.cpp
parent8e18743ab871bed1e1858ed2714a81f017433a2d (diff)
downloaduxp-dadef50bdc3c6b546aad9e3231943e41ad3ccb97.tar.gz
Issue #1666 - Implement overflow-wrap: anywhere
This aligns with the current spec regarding overflow-wrap: break-word and overflow-wrap: anywhere in if it affects intrinsic sized due to considering soft-wrap opportunities or not. See CSS Text Module Level 3, Editor’s Draft, 1 October 2020, Section 5.5
Diffstat (limited to 'layout/generic/nsTextFrame.cpp')
-rw-r--r--layout/generic/nsTextFrame.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/layout/generic/nsTextFrame.cpp b/layout/generic/nsTextFrame.cpp
index 9cf152873f..fcce7f3f65 100644
--- a/layout/generic/nsTextFrame.cpp
+++ b/layout/generic/nsTextFrame.cpp
@@ -8243,8 +8243,9 @@ nsTextFrame::AddInlineMinISizeForFlow(nsRenderingContext *aRenderingContext,
return;
}
- // If overflow-wrap is break-word, we can wrap everywhere.
- if (textStyle->WordCanWrap(this)) {
+ // 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));