[css-contain] Add support for text-align in SetText optimization
In the first version of this optimization r578233 we were skipping the cases when text-alignment was not the default one. This patch adds support for center and right/end text alignments, as we know for sure we're in left-to-right the operation is pretty simple. Justify alignment is still skipped as we need to layout the text anyway in that case. Thanks to this patch the optimization can be applied in more cases, the perftest is modified to include different text-align values. Probably there would be some changes on the number, but without this patch the results are much worse. BUG=805785 TEST=fast/css/containment/change-text-node-data-center.html TEST=fast/css/containment/change-text-node-data-right.html Change-Id: I71a87973b357fc492a7ddd9d238b8779d6152d8d Reviewed-on: https://chromium-review.googlesource.com/c/1318690Reviewed-by:Emil A Eklund <eae@chromium.org> Reviewed-by:
Kentaro Hara <haraken@chromium.org> Commit-Queue: Manuel Rego <rego@igalia.com> Cr-Commit-Position: refs/heads/master@{#605889}
Showing
Please register or sign in to comment