haikuwebkit/LayoutTests/fast/text/break-word-pre-wrap-expecte...

11 lines
211 B
HTML
Raw Permalink Normal View History

End of line whitespace should collapse with white-space:pre-wrap; overflow-wrap:break-word in all cases https://bugs.webkit.org/show_bug.cgi?id=124158 Source/WebCore: Reviewed by Dave Hyatt. If a word just fits the line but the following space overflows we fail to collapse whitespaces at the end of the line. This happens because with break-word we end up taking word breaking code path that does not have pre-wrap whitespace handling. This patch makes the behavior consistent and also matches Firefox. Test: fast/text/break-word-pre-wrap.html * rendering/RenderBlockLineLayout.cpp: (WebCore::BreakingContext::handleText): Don't take the word break code path if we are pre-wrap and the current character is space. Instead proceed to break the line normally as this is a valid break position. LayoutTests: Reviewed by Dave Hyatt. Added a specific test and updates the test results of some complex tests that demonstrate the same issue. * fast/text/break-word-pre-wrap-expected.html: Added. * fast/text/break-word-pre-wrap.html: Added. * platform/mac/fast/forms/basic-textareas-expected.png: * platform/mac/fast/forms/basic-textareas-expected.txt: * platform/mac/fast/forms/basic-textareas-quirks-expected.png: * platform/mac/fast/forms/basic-textareas-quirks-expected.txt: * platform/mac-mountainlion/fast/forms/basic-textareas-expected.txt: * platform/mac-mountainlion/fast/forms/basic-textareas-quirks-expected.txt: Canonical link: https://commits.webkit.org/142361@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@159071 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-11-11 22:39:40 +00:00
<style>
div { position:relative; white-space:pre; border:1px solid blue; font-family:ahem; }
</style>
<div style="width:4ex">xxx
x
x</div>
<div style="width:5ex">xxxx
x</div>
<div style="width:6ex">xxxx
x</div>