<div>Bug 89235 [1] notes lack of support for the CSS3 Text module&#39;s line-break property. I have prepared a patch to add support for the values expressed by this property to the existing -webkit-line-break property, as a preliminary step before the CSSWG agrees to unprefixed usage of CSS3 Text properties.</div>

<div><br></div><div>I have prepared two wiki pages [2][3] describing the approach I took in this patch, as well as discussing the current implementation of the property and the effects of supporting the new CSS3 keywords.</div>

<div><br></div><div>The basic approach taken by the patch is to make use of customized ICU rules in WebCore/platform/text/TextBreakIteratorICU.cpp, where the employed rule set is tailored according to the author supplied line break mode. If the author does not specify -webkit-line-break that is not &#39;auto&#39; or &#39;after-white-space&#39; or if the locale (i.e., @lang) is not a CJK language, then the new logic is bypassed so no performance impact or semantic change applies relative to current usage.</div>

<div><br></div><div>A number of new reftests (128) are provided in the patch to fully test this new functionality. At present. EWS reports passes on all platforms except cr-linux, which apparently uses a modified copy of ICU. I have added 27 IMAGE results to LayoutTests/platform/chromium/TestExpectations as a temporary work around until a fix is put in place.</div>

<div><br></div><div>The only significant backwards compatibility issue in accepting this patch is that -webkit-line-break will use &#39;auto&#39; as its initial (default) value, rather than the prior &#39;normal&#39; value, which has slightly different semantics in CSS3 Text. This change could affect pages that expect getComputedStyle(&#39;-webkit-line-break&#39;) to return &#39;normal&#39; in the absence of an explicit property. See the discussion in [4] for further info.</div>

<div><br></div><div>Comments?</div><div><br></div><div>Regards,</div><div>Glenn</div><div><br></div><div>[1] <a href="https://bugs.webkit.org/show_bug.cgi?id=89235">https://bugs.webkit.org/show_bug.cgi?id=89235</a></div>
<div>
[2] <a href="https://trac.webkit.org/wiki/LineBreaking">https://trac.webkit.org/wiki/LineBreaking</a></div><div>[3] <a href="https://trac.webkit.org/wiki/LineBreakingCSS3Mapping">https://trac.webkit.org/wiki/LineBreakingCSS3Mapping</a></div>

<div><div>[4] <a href="https://trac.webkit.org/wiki/LineBreaking#Theformer-webkit-line-breakproperty">https://trac.webkit.org/wiki/LineBreaking#Theformer-webkit-line-breakproperty</a></div></div><div><br></div>