Remove length argument from TextPainter::paint()
authordbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Oct 2017 19:23:38 +0000 (19:23 +0000)
committerdbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Oct 2017 19:23:38 +0000 (19:23 +0000)
commit75fe4bb28724c9d98d038ee40ab05e722cd2d757
treeb4a09eebb4eed0ea6d5b71c2786ddde56c347ed1
parent38dd2b1ab7b06fef3304828053cbdaa97ab674ba
Remove length argument from TextPainter::paint()
https://bugs.webkit.org/show_bug.cgi?id=177758

Reviewed by Alex Christensen.

Have TextPainter.paint() use the length of the specified TextRun as opposed to
taking an explicit argument for the length of the TextRun.

Following r222670 InlineTextBox creates a TextRun with respect to the truncated
line. Prior to r222670 InlineTextBox did not do this and hence it had to pass both
the TextRun and truncated length to TextPainter.paint() to have the line painted.
Code that needs to paint a substring of a TextRun can still do so by using TextPainter.paintRange().

No functionality changed. So, no new tests.

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paint):
* rendering/SimpleLineLayoutFunctions.cpp:
(WebCore::SimpleLineLayout::paintFlow):
* rendering/TextPainter.cpp:
(WebCore::TextPainter::paint):
* rendering/TextPainter.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@222732 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/rendering/InlineTextBox.cpp
Source/WebCore/rendering/SimpleLineLayoutFunctions.cpp
Source/WebCore/rendering/TextPainter.cpp
Source/WebCore/rendering/TextPainter.h