Make fontToUse() a member function of InlineTextBox
authordbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Sep 2017 23:05:29 +0000 (23:05 +0000)
committerdbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Sep 2017 23:05:29 +0000 (23:05 +0000)
commit2e1a7bc1c86dc4b7de4333cd54a81bf4393edbd6
tree738a55b606314e1b962002777a73df18b4a7a3cb
parentb8d93334ad08d63e3d61a8592b503f5fc82cd3ab
Make fontToUse() a member function of InlineTextBox
https://bugs.webkit.org/show_bug.cgi?id=177495

Reviewed by Myles C. Maxfield.

Following bug #177493 we can write fontToUse() in terms of InlineTextBox::combinedText().

No functionality changed. So, no new tests.

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::lineFont const): Added; extracted from fontToUse().
(WebCore::InlineTextBox::combinedText const): Mark inline to give a hint to the compiler
that this function is small and seems reasonable to inline.
(WebCore::InlineTextBox::localSelectionRect const): Modified to call lineFont().
(WebCore::InlineTextBox::paint): Ditto.
(WebCore::InlineTextBox::offsetForPosition const): Ditto.
(WebCore::InlineTextBox::positionForOffset const): Ditto. Remove an extraneous
if-statement while I am here.
(WebCore::fontToUse): Deleted; moved logic to InlineTextBox::lineFont().
* rendering/InlineTextBox.h:

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