WebKit Bugzilla
Attachment 368447 Details for
Bug 197278
: line should not be broken before the first space after a word
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-197278-20190429124208.patch (text/plain), 52.27 KB, created by
Javier Fernandez
on 2019-04-29 03:42:10 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Javier Fernandez
Created:
2019-04-29 03:42:10 PDT
Size:
52.27 KB
patch
obsolete
>Subversion Revision: 244730 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index dd3fde6d04d7790cafbfff481d79c607f2b9be5e..0ef39d6b618ac1cb9075d6b2f6bef5c7973650f5 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,54 @@ >+2019-04-26 Javier Fernandez <jfernandez@igalia.com> >+ >+ line should not be broken before the first space after a word >+ https://bugs.webkit.org/show_bug.cgi?id=197278 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ The 'white-space: break-spaces' only adds breaking opportunities after >+ a white space character. However, it's possible to break before the >+ first space after a word when the feature is used in combination with >+ other properties, like overflow-wrap. >+ >+ However, breaking before the first space should not be allowed if >+ there are previous opportunities. We wrongly assumed that we had to >+ consider these previous breaking opportunities if the proper combination >+ of line breaking properties is being used, so that breaking before the >+ first space after a word is allowed. >+ >+ This wrong assumption caused several issues, like the one described in >+ the bug, that lead to incorrectly break before the first space even >+ though there are previous opportunities, either white spaces or between >+ letters. >+ >+ Theses issues have been analyzed [1] by the CSS WG and finally agreed on a >+ expected behavior, represented in the Web Platform tests added in this >+ patch. >+ >+ For the later case, of considering previous opportunities between >+ letters, we have a seperated issue #952254, so the tests covering such >+ cases will be added to the TestExpecations as Failure entries. >+ >+ [1] https://github.com/w3c/csswg-drafts/issues/3701 >+ >+ Tests: imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-001.html >+ imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-002.html >+ imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-003.html >+ imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-004.html >+ imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-005.html >+ imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-006.html >+ imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-007.html >+ imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-008.html >+ imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-009.html >+ imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-010.html >+ imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-011.html >+ imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-012.html >+ imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-013.html >+ >+ * rendering/line/BreakingContext.h: >+ (WebCore::BreakingContext::handleText): >+ (WebCore::BreakingContext::trailingSpacesHang): >+ > 2019-04-28 Andy Estes <aestes@apple.com> > > [Apple Pay] Increment the API version from 6 to 7 >diff --git a/Source/WebCore/rendering/line/BreakingContext.h b/Source/WebCore/rendering/line/BreakingContext.h >index f355a2baf0bda02edffca7ea8bd80e54e849a671..24010f665643062eb148de4444afac445914d57e 100644 >--- a/Source/WebCore/rendering/line/BreakingContext.h >+++ b/Source/WebCore/rendering/line/BreakingContext.h >@@ -755,7 +755,7 @@ inline bool BreakingContext::handleText(WordMeasurements& wordMeasurements, bool > // A single preserved leading white-space doesn't fulfill the 'betweenWords' condition, however it's indeed a > // soft-breaking opportunty so we may want to avoid breaking in the middle of the word. > if (m_atStart && m_currentCharacterIsSpace && !previousCharacterIsSpace) { >- m_hasFormerOpportunity = canBreakMidWord; >+ m_hasFormerOpportunity = true; > breakWords = false; > canBreakMidWord = breakAll; > } >@@ -953,7 +953,7 @@ inline bool BreakingContext::handleText(WordMeasurements& wordMeasurements, bool > wrapW = wrapWidthOffset; > // Auto-wrapping text should not wrap in the middle of a word once it has had an > // opportunity to break after a word. >- m_hasFormerOpportunity = canBreakMidWord; >+ m_hasFormerOpportunity = true; > breakWords = false; > canBreakMidWord = breakAll; > } >@@ -1091,7 +1091,7 @@ inline void BreakingContext::trailingSpacesHang(InlineIterator& lineBreak, Rende > ASSERT(m_currWS == WhiteSpace::BreakSpaces); > // Avoid breaking before the first white-space after a word if there is a > // breaking opportunity before. >- if (m_hasFormerOpportunity) >+ if (m_hasFormerOpportunity && !previousCharacterIsSpace) > return; > > lineBreak.moveTo(renderObject, m_current.offset(), m_current.nextBreakablePosition()); >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 218f6d5781da168399c2ff4f488a0ee304b303ed..7f30e23e95bfcf65cd81b103c50cd2a11d5b453b 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,15 @@ >+2019-04-26 Javier Fernandez <jfernandez@igalia.com> >+ >+ line should not be broken before the first space after a word >+ https://bugs.webkit.org/show_bug.cgi?id=197278 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Added a few Skip (due to unimplemented features) and Failure (break-all related >+ issues) entries for some of the tests added by this patch. >+ >+ * TestExpectations: >+ > 2019-04-29 Javier Fernandez <jfernandez@igalia.com> > > Update the CSS Text WPT test suite >diff --git a/LayoutTests/imported/w3c/ChangeLog b/LayoutTests/imported/w3c/ChangeLog >index c03dff3ed1bef6bdc353647eb59de5fcf8d5ec92..dee4069fd86225cdd4540e02218a101f50da1374 100644 >--- a/LayoutTests/imported/w3c/ChangeLog >+++ b/LayoutTests/imported/w3c/ChangeLog >@@ -1,3 +1,41 @@ >+2019-04-26 Javier Fernandez <jfernandez@igalia.com> >+ >+ line should not be broken before the first space after a word >+ https://bugs.webkit.org/show_bug.cgi?id=197278 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Added new Web Platform Tests to cover the cases discussed [1] with the CSS WG. >+ >+ [1] https://github.com/w3c/csswg-drafts/issues/3701 >+ >+ * web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-001-expected.html: Added. >+ * web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-001.html: Added. >+ * web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-002-expected.html: Added. >+ * web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-002.html: Added. >+ * web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-003-expected.html: Added. >+ * web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-003.html: Added. >+ * web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-004-expected.html: Added. >+ * web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-004.html: Added. >+ * web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-005-expected.html: Added. >+ * web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-005.html: Added. >+ * web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-006-expected.html: Added. >+ * web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-006.html: Added. >+ * web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-007-expected.html: Added. >+ * web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-007.html: Added. >+ * web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-008-expected.html: Added. >+ * web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-008.html: Added. >+ * web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-009-expected.html: Added. >+ * web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-009.html: Added. >+ * web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-010-expected.html: Added. >+ * web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-010.html: Added. >+ * web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-011-expected.html: Added. >+ * web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-011.html: Added. >+ * web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-012-expected.html: Added. >+ * web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-012.html: Added. >+ * web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-013-expected.html: Added. >+ * web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-013.html: Added. >+ > 2019-04-29 Javier Fernandez <jfernandez@igalia.com> > > Update the CSS Text WPT test suite >diff --git a/LayoutTests/TestExpectations b/LayoutTests/TestExpectations >index d4ce8c4ee8810e3139ce75ed0653ea5b9e4e5bf0..d802d4fc3e224aea35f52dc323b5b24e5a68b944 100644 >--- a/LayoutTests/TestExpectations >+++ b/LayoutTests/TestExpectations >@@ -1801,8 +1801,6 @@ http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-css-i > webkit.org/b/183258 imported/w3c/web-platform-tests/css/css-text/hanging-punctuation/hanging-punctuation-first-001.xht [ ImageOnlyFailure ] > webkit.org/b/183258 imported/w3c/web-platform-tests/css/css-text/hanging-punctuation/hanging-punctuation-force-end-001.xht [ ImageOnlyFailure ] > webkit.org/b/183258 imported/w3c/web-platform-tests/css/css-text/hanging-punctuation/hanging-punctuation-last-001.xht [ ImageOnlyFailure ] >-webkit.org/b/183258 imported/w3c/web-platform-tests/css/css-text/line-break/line-break-anywhere-001.html [ ImageOnlyFailure ] >-webkit.org/b/183258 imported/w3c/web-platform-tests/css/css-text/line-break/line-break-anywhere-002.html [ ImageOnlyFailure ] > webkit.org/b/183258 imported/w3c/web-platform-tests/css/css-text/line-break/line-break-strict-011.xht [ ImageOnlyFailure ] > webkit.org/b/183258 imported/w3c/web-platform-tests/css/css-text/line-break/line-break-strict-012.xht [ ImageOnlyFailure ] > webkit.org/b/183258 imported/w3c/web-platform-tests/css/css-text/line-breaking/line-breaking-002.html [ ImageOnlyFailure ] >@@ -1956,6 +1954,15 @@ webkit.org/b/186045 imported/w3c/web-platform-tests/css/css-animations/animation > webkit.org/b/186045 imported/w3c/web-platform-tests/css/css-animations/animation-delay-009.html [ ImageOnlyFailure Pass ] > webkit.org/b/186045 imported/w3c/web-platform-tests/css/css-animations/animation-delay-010.html [ ImageOnlyFailure ] > >+# The 'line-break: anywhere' feature is not implemented yet >+webkit.org/b/181169 imported/w3c/web-platform-tests/css/css-text/line-break/line-break-anywhere-001.html [ Skip ] >+webkit.org/b/181169 imported/w3c/web-platform-tests/css/css-text/line-break/line-break-anywhere-002.html [ Skip ] >+webkit.org/b/181169 imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-007.html [ Skip ] >+webkit.org/b/181169 imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-008.html [ Skip ] >+webkit.org/b/181169 imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-009.html [ Skip ] >+webkit.org/b/181169 imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-010.html [ Skip ] >+webkit.org/b/181169 imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-011.html [ Skip ] >+ > # overflow-wrap:anywhere feature is not implemented yet. > webkit.org/b/195345 imported/w3c/web-platform-tests/css/css-text/overflow-wrap/overflow-wrap-anywhere-001.html [ Skip ] > webkit.org/b/195345 imported/w3c/web-platform-tests/css/css-text/overflow-wrap/overflow-wrap-anywhere-002.html [ Skip ] >@@ -1970,9 +1977,13 @@ webkit.org/b/195345 imported/w3c/web-platform-tests/css/css-text/overflow-wrap/o > webkit.org/b/195345 imported/w3c/web-platform-tests/css/css-text/overflow-wrap/overflow-wrap-min-content-size-003.html [ Skip ] > webkit.org/b/195345 imported/w3c/web-platform-tests/css/css-text/overflow-wrap/overflow-wrap-min-content-size-004.html [ Skip ] > webkit.org/b/195345 imported/w3c/web-platform-tests/css/css-text/word-break/word-break-break-word-overflow-wrap-interactions.html [ Skip ] >+webkit.org/b/195345 imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-003.html [ Skip ] >+webkit.org/b/195345 imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-006.html [ Skip ] >+webkit.org/b/195345 imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-013.html [ Skip ] > > webkit.org/b/197277 imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-008.html [ ImageOnlyFailure ] >- >+webkit.org/b/197277 imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-004.html [ ImageOnlyFailure ] >+webkit.org/b/197277 imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-005.html [ ImageOnlyFailure ] > > ######################################## > ### START OF display: contents failures >diff --git a/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-001-expected.html b/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-001-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..dece5f7394470d5bbc393c4318fa412ea25f9b4e >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-001-expected.html >@@ -0,0 +1,15 @@ >+<!DOCTYPE html> >+<meta charset="utf-8"> >+<title>CSS Text Reference File</title> >+<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" /> >+<style> >+div { >+ width: 100px; >+ height: 100px; >+ background: green; >+} >+</style> >+<body> >+ <p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p> >+ <div></div> >+</body> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-001.html b/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-001.html >new file mode 100644 >index 0000000000000000000000000000000000000000..e5221e15501064f216337a358a80058720cd7dad >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-001.html >@@ -0,0 +1,32 @@ >+<!DOCTYPE html> >+<meta charset="utf-8"> >+<title>CSS Text Test: white-space - break-spaces</title> >+<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" /> >+<link rel="help" title="3. White Space and Wrapping: the white-space property" href="https://drafts.csswg.org/css-text-3/#white-space-property"> >+<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-white-space-break-spaces"> >+<link rel="match" href="reference/white-space-break-spaces-005-ref.html"> >+<meta name="flags" content="ahem"> >+<meta name="assert" content="A breaking opportunity exists only after a preserved white space character."> >+<style> >+div { >+ font: 25px/1 Ahem; >+} >+.fail { >+ position: absolute; >+ color: red; >+ z-index: -1; >+} >+span { color: green; } >+.test { >+ color: green; >+ width: 4ch; >+ >+ white-space: break-spaces; >+} >+ >+</style> >+<body> >+ <p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p> >+ <div class="fail">X<span>XXX<br></span>XX<span>X</span>X<br><span>XXXX<br></span><span>XXXX<br></span></div> >+ <div class="test">X XX X</div> >+</body> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-002-expected.html b/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-002-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..dece5f7394470d5bbc393c4318fa412ea25f9b4e >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-002-expected.html >@@ -0,0 +1,15 @@ >+<!DOCTYPE html> >+<meta charset="utf-8"> >+<title>CSS Text Reference File</title> >+<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" /> >+<style> >+div { >+ width: 100px; >+ height: 100px; >+ background: green; >+} >+</style> >+<body> >+ <p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p> >+ <div></div> >+</body> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-002.html b/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-002.html >new file mode 100644 >index 0000000000000000000000000000000000000000..c7c36889ce81292a4fb52cae4f26214fd7eb458c >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-002.html >@@ -0,0 +1,35 @@ >+<!DOCTYPE html> >+<meta charset="utf-8"> >+<title>CSS Text Test: white-space - break-spaces</title> >+<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" /> >+<link rel="help" title="3. White Space and Wrapping: the white-space property" href="https://drafts.csswg.org/css-text-3/#white-space-property"> >+<link rel="help" title="5.5. Overflow Wrapping: the overflow-wrap/word-wrap property " href="https://drafts.csswg.org/css-text-3/#overflow-wrap-property"> >+<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-white-space-break-spaces"> >+<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-overflow-wrap-break-word"> >+<link rel="match" href="reference/white-space-break-spaces-005-ref.html"> >+<meta name="flags" content="ahem"> >+<meta name="assert" content="A breaking opportunity exists before the first character of a sequence of preserved white spaces to avoid the line overflow, honoring the overflow-wrap property, except when there are previous breaking opportunities."> >+<style> >+div { >+ font: 25px/1 Ahem; >+} >+.fail { >+ position: absolute; >+ color: red; >+ z-index: -1; >+} >+span { color: green; } >+.test { >+ color: green; >+ width: 4ch; >+ >+ white-space: break-spaces; >+ overflow-wrap: break-word; >+} >+ >+</style> >+<body> >+ <p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p> >+ <div class="fail">X<span>XXX<br></span>XX<span>X</span>X<br><span>XXXX<br></span><span>XXXX<br></span></div> >+ <div class="test">X XX X</div> >+</body> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-003-expected.html b/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-003-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..dece5f7394470d5bbc393c4318fa412ea25f9b4e >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-003-expected.html >@@ -0,0 +1,15 @@ >+<!DOCTYPE html> >+<meta charset="utf-8"> >+<title>CSS Text Reference File</title> >+<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" /> >+<style> >+div { >+ width: 100px; >+ height: 100px; >+ background: green; >+} >+</style> >+<body> >+ <p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p> >+ <div></div> >+</body> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-003.html b/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-003.html >new file mode 100644 >index 0000000000000000000000000000000000000000..5848f4e72a4357b3d400bf10f4b944de283a1a40 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-003.html >@@ -0,0 +1,35 @@ >+<!DOCTYPE html> >+<meta charset="utf-8"> >+<title>CSS Text Test: white-space - break-spaces</title> >+<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" /> >+<link rel="help" title="3. White Space and Wrapping: the white-space property" href="https://drafts.csswg.org/css-text-3/#white-space-property"> >+<link rel="help" title="5.5. Overflow Wrapping: the overflow-wrap/word-wrap property " href="https://drafts.csswg.org/css-text-3/#overflow-wrap-property"> >+<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-white-space-break-spaces"> >+<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-overflow-wrap-anywhere"> >+<link rel="match" href="reference/white-space-break-spaces-005-ref.html"> >+<meta name="flags" content="ahem"> >+<meta name="assert" content="A breaking opportunity exists before the first character of a sequence of preserved white spaces to avoid the line overflow, honoring the overflow-wrap property, except when there are previous breaking opportunities."> >+<style> >+div { >+ font: 25px/1 Ahem; >+} >+.fail { >+ position: absolute; >+ color: red; >+ z-index: -1; >+} >+span { color: green; } >+.test { >+ color: green; >+ width: 4ch; >+ >+ white-space: break-spaces; >+ overflow-wrap: anywhere; >+} >+ >+</style> >+<body> >+ <p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p> >+ <div class="fail">X<span>XXX<br></span>XX<span>X</span>X<br><span>XXXX<br></span><span>XXXX<br></span></div> >+ <div class="test">X XX X</div> >+</body> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-004-expected.html b/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-004-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..dece5f7394470d5bbc393c4318fa412ea25f9b4e >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-004-expected.html >@@ -0,0 +1,15 @@ >+<!DOCTYPE html> >+<meta charset="utf-8"> >+<title>CSS Text Reference File</title> >+<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" /> >+<style> >+div { >+ width: 100px; >+ height: 100px; >+ background: green; >+} >+</style> >+<body> >+ <p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p> >+ <div></div> >+</body> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-004.html b/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-004.html >new file mode 100644 >index 0000000000000000000000000000000000000000..c14f5c15ea72d7a2cec2626b3f7c302fda2ddb08 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-004.html >@@ -0,0 +1,35 @@ >+<!DOCTYPE html> >+<meta charset="utf-8"> >+<title>CSS Text Test: white-space - break-spaces</title> >+<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" /> >+<link rel="help" title="3. White Space and Wrapping: the white-space property" href="https://drafts.csswg.org/css-text-3/#white-space-property"> >+<link rel="help" title="5.2. Breaking Rules for Letters: the word-break property " href="https://drafts.csswg.org/css-text-3/#word-break-property"> >+<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-white-space-break-spaces"> >+<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-word-break-break-all"> >+<link rel="match" href="reference/white-space-break-spaces-005-ref.html"> >+<meta name="flags" content="ahem"> >+<meta name="assert" content="A breaking opportunity exists only after a preserved white space character, but it's possible to avoid the overflow honoring the 'word-break' property."> >+<style> >+div { >+ font: 25px/1 Ahem; >+} >+.fail { >+ position: absolute; >+ color: red; >+ z-index: -1; >+} >+span { color: green; } >+.test { >+ color: green; >+ width: 4ch; >+ >+ white-space: break-spaces; >+ word-break: break-all; >+} >+ >+</style> >+<body> >+ <p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p> >+ <div class="fail">X<span>X</span>X<span>X<br></span>X<span>X</span>X<span>X<br></span><span>XXXX<br></span><span>XXXX<br></span></div> >+ <div class="test">X XX X</div> >+</body> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-005-expected.html b/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-005-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..dece5f7394470d5bbc393c4318fa412ea25f9b4e >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-005-expected.html >@@ -0,0 +1,15 @@ >+<!DOCTYPE html> >+<meta charset="utf-8"> >+<title>CSS Text Reference File</title> >+<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" /> >+<style> >+div { >+ width: 100px; >+ height: 100px; >+ background: green; >+} >+</style> >+<body> >+ <p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p> >+ <div></div> >+</body> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-005.html b/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-005.html >new file mode 100644 >index 0000000000000000000000000000000000000000..2759c936901b0a1be6c31828b69b450d2a6922f4 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-005.html >@@ -0,0 +1,38 @@ >+<!DOCTYPE html> >+<meta charset="utf-8"> >+<title>CSS Text Test: white-space - break-spaces</title> >+<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" /> >+<link rel="help" title="3. White Space and Wrapping: the white-space property" href="https://drafts.csswg.org/css-text-3/#white-space-property"> >+<link rel="help" title="5.2. Breaking Rules for Letters: the word-break property " href="https://drafts.csswg.org/css-text-3/#word-break-property"> >+<link rel="help" title="5.5. Overflow Wrapping: the overflow-wrap/word-wrap property " href="https://drafts.csswg.org/css-text-3/#overflow-wrap-property"> >+<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-white-space-break-spaces"> >+<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-word-break-break-all"> >+<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-overflow-wrap-break-word"> >+<link rel="match" href="reference/white-space-break-spaces-005-ref.html"> >+<meta name="flags" content="ahem"> >+<meta name="assert" content="A breaking opportunity exists only after a preserved white space character, but it's possible to avoid the overflow honoring the 'word-break' property, hence the overflow-wrap property is not applied."> >+<style> >+div { >+ font: 25px/1 Ahem; >+} >+.fail { >+ position: absolute; >+ color: red; >+ z-index: -1; >+} >+span { color: green; } >+.test { >+ color: green; >+ width: 4ch; >+ >+ white-space: break-spaces; >+ overflow-wrap: break-word; >+ word-break: break-all; >+} >+ >+</style> >+<body> >+ <p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p> >+ <div class="fail">X<span>X</span>X<span>X<br></span>X<span>X</span>X<span>X<br></span><span>XXXX<br></span><span>XXXX<br></span></div> >+ <div class="test">X XX X</div> >+</body> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-006-expected.html b/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-006-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..dece5f7394470d5bbc393c4318fa412ea25f9b4e >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-006-expected.html >@@ -0,0 +1,15 @@ >+<!DOCTYPE html> >+<meta charset="utf-8"> >+<title>CSS Text Reference File</title> >+<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" /> >+<style> >+div { >+ width: 100px; >+ height: 100px; >+ background: green; >+} >+</style> >+<body> >+ <p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p> >+ <div></div> >+</body> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-006.html b/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-006.html >new file mode 100644 >index 0000000000000000000000000000000000000000..aabc3baff9b20a1a87a57ac88f0d5f1b971e8bf9 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-006.html >@@ -0,0 +1,38 @@ >+<!DOCTYPE html> >+<meta charset="utf-8"> >+<title>CSS Text Test: white-space - break-spaces</title> >+<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" /> >+<link rel="help" title="3. White Space and Wrapping: the white-space property" href="https://drafts.csswg.org/css-text-3/#white-space-property"> >+<link rel="help" title="5.2. Breaking Rules for Letters: the word-break property " href="https://drafts.csswg.org/css-text-3/#word-break-property"> >+<link rel="help" title="5.5. Overflow Wrapping: the overflow-wrap/word-wrap property " href="https://drafts.csswg.org/css-text-3/#overflow-wrap-property"> >+<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-white-space-break-spaces"> >+<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-word-break-break-all"> >+<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-overflow-wrap-anywhere"> >+<link rel="match" href="reference/white-space-break-spaces-005-ref.html"> >+<meta name="flags" content="ahem"> >+<meta name="assert" content="A breaking opportunity exists only after a preserved white space character, but it's possible to avoid the overflow honoring the 'word-break' property, hence the overflow-wrap property is not applied."> >+<style> >+div { >+ font: 25px/1 Ahem; >+} >+.fail { >+ position: absolute; >+ color: red; >+ z-index: -1; >+} >+span { color: green; } >+.test { >+ color: green; >+ width: 4ch; >+ >+ white-space: break-spaces; >+ overflow-wrap: anywhere; >+ word-break: break-all; >+} >+ >+</style> >+<body> >+ <p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p> >+ <div class="fail">X<span>X</span>X<span>X<br></span>X<span>X</span>X<span>X<br></span><span>XXXX<br></span><span>XXXX<br></span></div> >+ <div class="test">X XX X</div> >+</body> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-007-expected.html b/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-007-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..dece5f7394470d5bbc393c4318fa412ea25f9b4e >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-007-expected.html >@@ -0,0 +1,15 @@ >+<!DOCTYPE html> >+<meta charset="utf-8"> >+<title>CSS Text Reference File</title> >+<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" /> >+<style> >+div { >+ width: 100px; >+ height: 100px; >+ background: green; >+} >+</style> >+<body> >+ <p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p> >+ <div></div> >+</body> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-007.html b/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-007.html >new file mode 100644 >index 0000000000000000000000000000000000000000..0336fd47992a2de94f892caa8a8aad488cdb5027 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-007.html >@@ -0,0 +1,35 @@ >+<!DOCTYPE html> >+<meta charset="utf-8"> >+<title>CSS Text Test: white-space - break-spaces</title> >+<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" /> >+<link rel="help" title="3. White Space and Wrapping: the white-space property" href="https://drafts.csswg.org/css-text-3/#white-space-property"> >+<link rel="help" title="5.3. Line Breaking Strictness: the line-break property" href="https://drafts.csswg.org/css-text-3/#propdef-line-break"> >+<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-white-space-break-spaces"> >+<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-line-break-anywhere"> >+<link rel="match" href="reference/white-space-break-spaces-005-ref.html"> >+<meta name="flags" content="ahem"> >+<meta name="assert" content="A breaking opportunity exists before the first character of a sequence of preserved white spaces to avoid the line overflow, honoring the 'line-break' property."> >+<style> >+div { >+ font: 25px/1 Ahem; >+} >+.fail { >+ position: absolute; >+ color: red; >+ z-index: -1; >+} >+span { color: green; } >+.test { >+ color: green; >+ width: 4ch; >+ >+ white-space: break-spaces; >+ line-break: anywhere; >+} >+ >+</style> >+<body> >+ <p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p> >+ <div class="fail">X<span>X</span>XX<br><span>X</span>X<span>XX<br></span><span>XXXX<br></span><span>XXXX<br></span></div> >+ <div class="test">X XX X</div> >+</body> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-008-expected.html b/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-008-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..dece5f7394470d5bbc393c4318fa412ea25f9b4e >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-008-expected.html >@@ -0,0 +1,15 @@ >+<!DOCTYPE html> >+<meta charset="utf-8"> >+<title>CSS Text Reference File</title> >+<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" /> >+<style> >+div { >+ width: 100px; >+ height: 100px; >+ background: green; >+} >+</style> >+<body> >+ <p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p> >+ <div></div> >+</body> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-008.html b/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-008.html >new file mode 100644 >index 0000000000000000000000000000000000000000..d93a56fb75bba5105f64382130f9924e0dd01e18 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-008.html >@@ -0,0 +1,38 @@ >+<!DOCTYPE html> >+<meta charset="utf-8"> >+<title>CSS Text Test: white-space - break-spaces</title> >+<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" /> >+<link rel="help" title="3. White Space and Wrapping: the white-space property" href="https://drafts.csswg.org/css-text-3/#white-space-property"> >+<link rel="help" title="5.3. Line Breaking Strictness: the line-break property" href="https://drafts.csswg.org/css-text-3/#propdef-line-break"> >+<link rel="help" title="5.5. Overflow Wrapping: the overflow-wrap/word-wrap property " href="https://drafts.csswg.org/css-text-3/#overflow-wrap-property"> >+<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-white-space-break-spaces"> >+<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-line-break-anywhere"> >+<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-overflow-wrap-break-word"> >+<link rel="match" href="reference/white-space-break-spaces-005-ref.html"> >+<meta name="flags" content="ahem"> >+<meta name="assert" content="A breaking opportunity exists before the first character of a sequence of preserved white spaces to avoid the line overflow, honoring the 'line-break' property, ignoring previous breaking opportunities."> >+<style> >+div { >+ font: 25px/1 Ahem; >+} >+.fail { >+ position: absolute; >+ color: red; >+ z-index: -1; >+} >+span { color: green; } >+.test { >+ color: green; >+ width: 4ch; >+ >+ white-space: break-spaces; >+ line-break: anywhere; >+ overflow-wrap: break-word; >+} >+ >+</style> >+<body> >+ <p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p> >+ <div class="fail">X<span>X</span>XX<br><span>X</span>X<span>XX<br></span><span>XXXX<br></span><span>XXXX<br></span></div> >+ <div class="test">X XX X</div> >+</body> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-009-expected.html b/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-009-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..dece5f7394470d5bbc393c4318fa412ea25f9b4e >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-009-expected.html >@@ -0,0 +1,15 @@ >+<!DOCTYPE html> >+<meta charset="utf-8"> >+<title>CSS Text Reference File</title> >+<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" /> >+<style> >+div { >+ width: 100px; >+ height: 100px; >+ background: green; >+} >+</style> >+<body> >+ <p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p> >+ <div></div> >+</body> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-009.html b/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-009.html >new file mode 100644 >index 0000000000000000000000000000000000000000..11b623e7161da15d2f61eaaa667f22d47b4c2719 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-009.html >@@ -0,0 +1,38 @@ >+<!DOCTYPE html> >+<meta charset="utf-8"> >+<title>CSS Text Test: white-space - break-spaces</title> >+<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" /> >+<link rel="help" title="3. White Space and Wrapping: the white-space property" href="https://drafts.csswg.org/css-text-3/#white-space-property"> >+<link rel="help" title="5.3. Line Breaking Strictness: the line-break property" href="https://drafts.csswg.org/css-text-3/#propdef-line-break"> >+<link rel="help" title="5.5. Overflow Wrapping: the overflow-wrap/word-wrap property " href="https://drafts.csswg.org/css-text-3/#overflow-wrap-property"> >+<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-white-space-break-spaces"> >+<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-line-break-anywhere"> >+<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-overflow-wrap-anywhere"> >+<link rel="match" href="reference/white-space-break-spaces-005-ref.html"> >+<meta name="flags" content="ahem"> >+<meta name="assert" content="A breaking opportunity exists before the first character of a sequence of preserved white spaces to avoid the line overflow, honoring the 'line-break' property, ignoring previous breaking opportunities."> >+<style> >+div { >+ font: 25px/1 Ahem; >+} >+.fail { >+ position: absolute; >+ color: red; >+ z-index: -1; >+} >+span { color: green; } >+.test { >+ color: green; >+ width: 4ch; >+ >+ white-space: break-spaces; >+ line-break: anywhere; >+ overflow-wrap: anywhere; >+} >+ >+</style> >+<body> >+ <p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p> >+ <div class="fail">X<span>X</span>XX<br><span>X</span>X<span>XX<br></span><span>XXXX<br></span><span>XXXX<br></span></div> >+ <div class="test">X XX X</div> >+</body> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-010-expected.html b/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-010-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..dece5f7394470d5bbc393c4318fa412ea25f9b4e >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-010-expected.html >@@ -0,0 +1,15 @@ >+<!DOCTYPE html> >+<meta charset="utf-8"> >+<title>CSS Text Reference File</title> >+<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" /> >+<style> >+div { >+ width: 100px; >+ height: 100px; >+ background: green; >+} >+</style> >+<body> >+ <p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p> >+ <div></div> >+</body> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-010.html b/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-010.html >new file mode 100644 >index 0000000000000000000000000000000000000000..5012e98af002cd01f23b16efd822b67619cca491 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-010.html >@@ -0,0 +1,38 @@ >+<!DOCTYPE html> >+<meta charset="utf-8"> >+<title>CSS Text Test: white-space - break-spaces</title> >+<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" /> >+<link rel="help" title="3. White Space and Wrapping: the white-space property" href="https://drafts.csswg.org/css-text-3/#white-space-property"> >+<link rel="help" title="5.2. Breaking Rules for Letters: the word-break property " href="https://drafts.csswg.org/css-text-3/#word-break-property"> >+<link rel="help" title="5.3. Line Breaking Strictness: the line-break property" href="https://drafts.csswg.org/css-text-3/#propdef-line-break"> >+<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-white-space-break-spaces"> >+<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-line-break-anywhere"> >+<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-word-break-break-all"> >+<link rel="match" href="reference/white-space-break-spaces-005-ref.html"> >+<meta name="flags" content="ahem"> >+<meta name="assert" content="A breaking opportunity exists before the first character of a sequence of preserved white spaces to avoid the line overflow, honoring the 'line-break' property, ignoring previous breaking opportunities."> >+<style> >+div { >+ font: 25px/1 Ahem; >+} >+.fail { >+ position: absolute; >+ color: red; >+ z-index: -1; >+} >+span { color: green; } >+.test { >+ color: green; >+ width: 4ch; >+ >+ white-space: break-spaces; >+ line-break: anywhere; >+ word-break: break-all; >+} >+ >+</style> >+<body> >+ <p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p> >+ <div class="fail">X<span>X</span>XX<br><span>X</span>X<span>XX<br></span><span>XXXX<br></span><span>XXXX<br></span></div> >+ <div class="test">X XX X</div> >+</body> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-011-expected.html b/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-011-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..dece5f7394470d5bbc393c4318fa412ea25f9b4e >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-011-expected.html >@@ -0,0 +1,15 @@ >+<!DOCTYPE html> >+<meta charset="utf-8"> >+<title>CSS Text Reference File</title> >+<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" /> >+<style> >+div { >+ width: 100px; >+ height: 100px; >+ background: green; >+} >+</style> >+<body> >+ <p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p> >+ <div></div> >+</body> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-011.html b/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-011.html >new file mode 100644 >index 0000000000000000000000000000000000000000..3134b0364ad2e59b6163fd46e59a6b06a1c2e621 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-011.html >@@ -0,0 +1,41 @@ >+<!DOCTYPE html> >+<meta charset="utf-8"> >+<title>CSS Text Test: white-space - break-spaces</title> >+<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" /> >+<link rel="help" title="3. White Space and Wrapping: the white-space property" href="https://drafts.csswg.org/css-text-3/#white-space-property"> >+<link rel="help" title="5.2. Breaking Rules for Letters: the word-break property " href="https://drafts.csswg.org/css-text-3/#word-break-property"> >+<link rel="help" title="5.3. Line Breaking Strictness: the line-break property" href="https://drafts.csswg.org/css-text-3/#propdef-line-break"> >+<link rel="help" title="5.5. Overflow Wrapping: the overflow-wrap/word-wrap property " href="https://drafts.csswg.org/css-text-3/#overflow-wrap-property"> >+<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-white-space-break-spaces"> >+<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-line-break-anywhere"> >+<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-word-break-break-all"> >+<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-overflow-wrap-anywhere"> >+<link rel="match" href="reference/white-space-break-spaces-005-ref.html"> >+<meta name="flags" content="ahem"> >+<meta name="assert" content="A breaking opportunity exists before the first character of a sequence of preserved white spaces to avoid the line overflow, honoring the 'line-break' property, ignoring previous breaking opportunities."> >+<style> >+div { >+ font: 25px/1 Ahem; >+} >+.fail { >+ position: absolute; >+ color: red; >+ z-index: -1; >+} >+span { color: green; } >+.test { >+ color: green; >+ width: 4ch; >+ >+ white-space: break-spaces; >+ line-break: anywhere; >+ word-break: break-all; >+ overflow-wrap: break-word; >+} >+ >+</style> >+<body> >+ <p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p> >+ <div class="fail">X<span>X</span>XX<br><span>X</span>X<span>XX<br></span><span>XXXX<br></span><span>XXXX<br></span></div> >+ <div class="test">X XX X</div> >+</body> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-012-expected.html b/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-012-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..dece5f7394470d5bbc393c4318fa412ea25f9b4e >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-012-expected.html >@@ -0,0 +1,15 @@ >+<!DOCTYPE html> >+<meta charset="utf-8"> >+<title>CSS Text Reference File</title> >+<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" /> >+<style> >+div { >+ width: 100px; >+ height: 100px; >+ background: green; >+} >+</style> >+<body> >+ <p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p> >+ <div></div> >+</body> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-012.html b/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-012.html >new file mode 100644 >index 0000000000000000000000000000000000000000..e811053b9a8b8c16047667099c734089df637db8 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-012.html >@@ -0,0 +1,35 @@ >+<!DOCTYPE html> >+<meta charset="utf-8"> >+<title>CSS Text Test: white-space - break-spaces</title> >+<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" /> >+<link rel="help" title="3. White Space and Wrapping: the white-space property" href="https://drafts.csswg.org/css-text-3/#white-space-property"> >+<link rel="help" title="5.5. Overflow Wrapping: the overflow-wrap/word-wrap property " href="https://drafts.csswg.org/css-text-3/#overflow-wrap-property"> >+<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-white-space-break-spaces"> >+<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-overflow-wrap-break-word"> >+<link rel="match" href="reference/white-space-break-spaces-005-ref.html"> >+<meta name="flags" content="ahem"> >+<meta name="assert" content="A breaking opportunity exists before the first character of a sequence of preserved white spaces to avoid the line overflow, honoring the overflow-wrap property."> >+<style> >+div { >+ font: 25px/1 Ahem; >+} >+.fail { >+ position: absolute; >+ color: red; >+ z-index: -1; >+} >+span { color: green; } >+.test { >+ color: green; >+ width: 4ch; >+ >+ white-space: break-spaces; >+ overflow-wrap: break-word; >+} >+ >+</style> >+<body> >+ <p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p> >+ <div class="fail">XXXX<br><span>X</span>XX<span>X<br></span><span>XXXX<br></span><span>XXXX<br></span></div> >+ <div class="test">XXXX XX</div> >+</body> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-013-expected.html b/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-013-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..dece5f7394470d5bbc393c4318fa412ea25f9b4e >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-013-expected.html >@@ -0,0 +1,15 @@ >+<!DOCTYPE html> >+<meta charset="utf-8"> >+<title>CSS Text Reference File</title> >+<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" /> >+<style> >+div { >+ width: 100px; >+ height: 100px; >+ background: green; >+} >+</style> >+<body> >+ <p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p> >+ <div></div> >+</body> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-013.html b/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-013.html >new file mode 100644 >index 0000000000000000000000000000000000000000..0d6e398c0a83b779413fd03f73998be4d8b658f0 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-before-first-char-013.html >@@ -0,0 +1,35 @@ >+<!DOCTYPE html> >+<meta charset="utf-8"> >+<title>CSS Text Test: white-space - break-spaces</title> >+<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" /> >+<link rel="help" title="3. White Space and Wrapping: the white-space property" href="https://drafts.csswg.org/css-text-3/#white-space-property"> >+<link rel="help" title="5.5. Overflow Wrapping: the overflow-wrap/word-wrap property " href="https://drafts.csswg.org/css-text-3/#overflow-wrap-property"> >+<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-white-space-break-spaces"> >+<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-overflow-wrap-anywhere"> >+<link rel="match" href="reference/white-space-break-spaces-005-ref.html"> >+<meta name="flags" content="ahem"> >+<meta name="assert" content="A breaking opportunity exists before the first character of a sequence of preserved white spaces to avoid the line overflow, honoring the overflow-wrap property."> >+<style> >+div { >+ font: 25px/1 Ahem; >+} >+.fail { >+ position: absolute; >+ color: red; >+ z-index: -1; >+} >+span { color: green; } >+.test { >+ color: green; >+ width: 4ch; >+ >+ white-space: break-spaces; >+ overflow-wrap: anywhere; >+} >+ >+</style> >+<body> >+ <p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p> >+ <div class="fail">XXXX<br><span>X</span>XX<span>X<br></span><span>XXXX<br></span><span>XXXX<br></span></div> >+ <div class="test">XXXX XX</div> >+</body>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 197278
:
368228
|
368230
|
368231
|
368323
|
368336
|
368337
|
368340
|
368341
|
368447
|
368448
|
368449