adding support for css3 line-break property to -webkit-line-break

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

adding support for css3 line-break property to -webkit-line-break

Glenn Adams-2
Bug 89235 [1] notes lack of support for the CSS3 Text module'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.

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.

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 'auto' or 'after-white-space' 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.

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.

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



webkit-dev mailing list
[hidden email]