diff options
author | Moonchild <moonchild@palemoon.org> | 2020-10-03 14:52:47 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2020-10-06 09:31:51 +0000 |
commit | 17b4d049f487c412ed319e81de6d49a7d07d0f44 (patch) | |
tree | 7320ebee8b132eecc73644021aa8e6b09c6ab5ef /layout/generic | |
parent | abf1d5a099ea8c3fbd6912ff7b199791994cb932 (diff) | |
download | UXP-17b4d049f487c412ed319e81de6d49a7d07d0f44.tar UXP-17b4d049f487c412ed319e81de6d49a7d07d0f44.tar.gz UXP-17b4d049f487c412ed319e81de6d49a7d07d0f44.tar.lz UXP-17b4d049f487c412ed319e81de6d49a7d07d0f44.tar.xz UXP-17b4d049f487c412ed319e81de6d49a7d07d0f44.zip |
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')
-rw-r--r-- | layout/generic/nsTextFrame.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/layout/generic/nsTextFrame.cpp b/layout/generic/nsTextFrame.cpp index a9ed168fb..a47b87e38 100644 --- a/layout/generic/nsTextFrame.cpp +++ b/layout/generic/nsTextFrame.cpp @@ -8245,8 +8245,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)); |