Width of last of consecutive tabs may be incorrect with "white-space: pre-wrap"
authorgraouts@apple.com <graouts@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 13 Apr 2013 16:38:41 +0000 (16:38 +0000)
committergraouts@apple.com <graouts@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 13 Apr 2013 16:38:41 +0000 (16:38 +0000)
commit9b4176a4324e200270970475755826604819b58d
tree33f3d99c1b5d1b394812d2b6e5e6262e19db0c9d
parentfdd59e1f4d756f925b10c421dedb59336b6c27a6
Width of last of consecutive tabs may be incorrect with "white-space: pre-wrap"
https://bugs.webkit.org/show_bug.cgi?id=114562

Reviewed by Dan Bernstein.

Source/WebCore:

When we measure the last word of a RenderText, make sure we use the correct x
position taking into account the current accumulated word measurements up to
this character. This is of particular importance in the case of tabs where the
measured width would differ based on the x position.

Test: fast/text/tab-last-word-in-renderer-pre-wrap.html

* rendering/RenderBlockLineLayout.cpp:
(WebCore::setLogicalWidthForTextRun):

LayoutTests:

* fast/text/tab-last-word-in-renderer-pre-wrap-expected.html: Added.
* fast/text/tab-last-word-in-renderer-pre-wrap.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@148358 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/text/tab-last-word-in-renderer-pre-wrap-expected.html [new file with mode: 0644]
LayoutTests/fast/text/tab-last-word-in-renderer-pre-wrap.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderBlockLineLayout.cpp