Bug 124206

Summary: Support overflow-wrap:break-word on simple line path
Product: WebKit Reporter: Antti Koivisto <koivisto>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: buildbot, commit-queue, esprehn+autocc, glenn, kondapallykalyan, rniwa
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch
buildbot: commit-queue-
Archive of layout-test-results from webkit-ews-10 for mac-mountainlion-wk2
none
Archive of layout-test-results from webkit-ews-07 for mac-mountainlion
none
patch 2 kling: review+

Description Antti Koivisto 2013-11-12 08:11:38 PST
This makes some pure text documents use simple line layout path.
Comment 1 Antti Koivisto 2013-11-12 08:36:20 PST
Created attachment 216677 [details]
patch
Comment 2 Build Bot 2013-11-12 09:36:32 PST
Comment on attachment 216677 [details]
patch

Attachment 216677 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/22888755

New failing tests:
fast/shapes/shape-inside/shape-inside-dynamic-nested.html
accessibility/aria-help.html
http/tests/misc/acid3.html
fast/parser/entity-comment-in-textarea.html
Comment 3 Build Bot 2013-11-12 09:36:34 PST
Created attachment 216688 [details]
Archive of layout-test-results from webkit-ews-10 for mac-mountainlion-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-10  Port: mac-mountainlion-wk2  Platform: Mac OS X 10.8.5
Comment 4 Build Bot 2013-11-12 10:35:42 PST
Comment on attachment 216677 [details]
patch

Attachment 216677 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/22888765

New failing tests:
fast/shapes/shape-inside/shape-inside-dynamic-nested.html
accessibility/aria-help.html
http/tests/misc/acid3.html
fast/parser/entity-comment-in-textarea.html
Comment 5 Build Bot 2013-11-12 10:35:44 PST
Created attachment 216693 [details]
Archive of layout-test-results from webkit-ews-07 for mac-mountainlion

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-07  Port: mac-mountainlion  Platform: Mac OS X 10.8.5
Comment 6 Andreas Kling 2013-11-13 00:01:33 PST
Comment on attachment 216677 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=216677&action=review

> Source/WebCore/rendering/SimpleLineLayout.cpp:388
> +                    for (unsigned breakEnd = lineStart + 1; breakEnd <= wordEnd; ++breakEnd) {
> +                        float splitWidth = measureWord(textRenderer, text, textLength, lineStart, breakEnd, 0, collapseWhitespace, font, tabWidth, spaceWidth);

I bet there's a more efficient way of doing this. The complexity:benefit ratio seems good as-is though.
Comment 7 Antti Koivisto 2013-11-13 04:00:31 PST
Created attachment 216792 [details]
patch 2

- measure character-by-character to avoid n^2. This is what line boxes do too.
- if break-word generates space-only line set its width to zero
- handle shapeInside style invalidation correctly
Comment 8 Andreas Kling 2013-11-13 04:06:19 PST
Comment on attachment 216792 [details]
patch 2

r=me!
Comment 9 Antti Koivisto 2013-11-13 05:23:59 PST
https://trac.webkit.org/r159192