WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
155006
Simple line layout:: Add text-align: justify support.
https://bugs.webkit.org/show_bug.cgi?id=155006
Summary
Simple line layout:: Add text-align: justify support.
zalan
Reported
2016-03-03 20:08:16 PST
It is a common property on text content and we can extend simple line layout to support it without regressing performance.
Attachments
Patch
(17.87 KB, patch)
2016-03-10 11:19 PST
,
zalan
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews106 for mac-yosemite-wk2
(1.36 MB, application/zip)
2016-03-10 11:58 PST
,
Build Bot
no flags
Details
Archive of layout-test-results from ews100 for mac-yosemite
(892.17 KB, application/zip)
2016-03-10 12:09 PST
,
Build Bot
no flags
Details
Archive of layout-test-results from ews113 for mac-yosemite
(1.04 MB, application/zip)
2016-03-10 12:23 PST
,
Build Bot
no flags
Details
Patch
(17.93 KB, patch)
2016-03-10 14:46 PST
,
zalan
no flags
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
zalan
Comment 1
2016-03-10 11:19:17 PST
Created
attachment 273585
[details]
Patch
zalan
Comment 2
2016-03-10 11:21:43 PST
PerformanceTests/Layout/line-layout-simple.html before text-align: justify support -> mean: 86.20513022288704 runs/s after -> mean: 96.73972475626084 runs/s
Build Bot
Comment 3
2016-03-10 11:58:01 PST
Comment on
attachment 273585
[details]
Patch
Attachment 273585
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.webkit.org/results/955522
New failing tests: fast/regions/overflow/overflow-in-uniform-regions.html
Build Bot
Comment 4
2016-03-10 11:58:06 PST
Created
attachment 273592
[details]
Archive of layout-test-results from ews106 for mac-yosemite-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews106 Port: mac-yosemite-wk2 Platform: Mac OS X 10.10.5
Antti Koivisto
Comment 5
2016-03-10 12:06:09 PST
Comment on
attachment 273585
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=273585&action=review
> Source/WebCore/rendering/SimpleLineLayout.cpp:412 > + std::pair<unsigned, bool> expansionOpportunityCount(unsigned from, unsigned to) const
It looks like bool is true if and only if unsigned >0. Maybe you could just return unsigned and test if it is nonzero in client?
> Source/WebCore/rendering/SimpleLineLayout.cpp:414 > + unsigned expansionOportunityCount = 0;
Spelling "Oportunity"
> Source/WebCore/rendering/SimpleLineLayout.cpp:420 > + auto expansionOportunity = this->expansionOportunity(currentFragmentType, previousFragmentType);
Here too
> Source/WebCore/rendering/SimpleLineLayout.cpp:808 > + auto textAlign = style.textAlign; > + // Fallback to LEFT alignment both for non-collapsable content and for the last line. > + if (style.textAlign == JUSTIFY && (!style.collapseWhitespace || lastLine))
You could use the 'textAlign' local here.
> Source/WebCore/rendering/SimpleLineLayout.cpp:814 > + else { > + if (float lineLogicalLeft = computeLineLeft(textAlign, line.availableWidth(), line.width(), line.logicalLeftOffset())) {
Could maybe just say 'else if'
> Source/WebCore/rendering/SimpleLineLayout.h:63 > + // TODO: Move these optional items out of SimpleLineLayout::Run to a supplementary structure.
Yep.
Build Bot
Comment 6
2016-03-10 12:09:13 PST
Comment on
attachment 273585
[details]
Patch
Attachment 273585
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.webkit.org/results/955629
New failing tests: fast/regions/overflow/overflow-in-uniform-regions.html
Build Bot
Comment 7
2016-03-10 12:09:17 PST
Created
attachment 273594
[details]
Archive of layout-test-results from ews100 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews100 Port: mac-yosemite Platform: Mac OS X 10.10.5
Build Bot
Comment 8
2016-03-10 12:23:35 PST
Comment on
attachment 273585
[details]
Patch
Attachment 273585
[details]
did not pass mac-debug-ews (mac): Output:
http://webkit-queues.webkit.org/results/955577
New failing tests: editing/undo/orphaned-selection-crash-
bug32823
-2.html fast/regions/overflow/overflow-in-uniform-regions.html
Build Bot
Comment 9
2016-03-10 12:23:41 PST
Created
attachment 273596
[details]
Archive of layout-test-results from ews113 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews113 Port: mac-yosemite Platform: Mac OS X 10.10.5
zalan
Comment 10
2016-03-10 14:46:40 PST
Created
attachment 273623
[details]
Patch
WebKit Commit Bot
Comment 11
2016-03-10 20:03:21 PST
Comment on
attachment 273623
[details]
Patch Clearing flags on attachment: 273623 Committed
r197987
: <
http://trac.webkit.org/changeset/197987
>
WebKit Commit Bot
Comment 12
2016-03-10 20:03:30 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug