Bug 124206 - Support overflow-wrap:break-word on simple line path
Summary: Support overflow-wrap:break-word on simple line path
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-12 08:11 PST by Antti Koivisto
Modified: 2013-11-13 05:23 PST (History)
6 users (show)

See Also:


Attachments
patch (30.27 KB, patch)
2013-11-12 08:36 PST, Antti Koivisto
buildbot: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from webkit-ews-10 for mac-mountainlion-wk2 (578.05 KB, application/zip)
2013-11-12 09:36 PST, Build Bot
no flags Details
Archive of layout-test-results from webkit-ews-07 for mac-mountainlion (715.62 KB, application/zip)
2013-11-12 10:35 PST, Build Bot
no flags Details
patch 2 (32.38 KB, patch)
2013-11-13 04:00 PST, Antti Koivisto
kling: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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