[LCF][IFC] Add support for hyphenation.
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 23 Jul 2018 20:30:35 +0000 (20:30 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 23 Jul 2018 20:30:35 +0000 (20:30 +0000)
commit3f4185478182d11f2e15cb86ab19ab355e82c094
tree54ba9909f61b39932c3d8c8bb98f076407991941
parentbe4db3948aaff53486da9f47a3750879d6582a4f
[LCF][IFC] Add support for hyphenation.
https://bugs.webkit.org/show_bug.cgi?id=187913

Reviewed by Antti Koivisto.

Move the hyphenation logic over from SimpleLineLayout::TextFragmentIterator.

* layout/inlineformatting/textlayout/Runs.h:
(WebCore::Layout::TextRun::hasHyphen const):
(WebCore::Layout::LayoutRun::setHasHyphen):
(WebCore::Layout::LayoutRun::hasHyphen const):
(WebCore::Layout::LayoutRun::LayoutRun):
(WebCore::Layout::TextRun::createNonWhitespaceRunWithHyphen):
(WebCore::Layout::TextRun::TextRun):
* layout/inlineformatting/textlayout/TextContentProvider.cpp:
(WebCore::Layout::TextContentProvider::findTextItemSlow const):
(WebCore::Layout::TextContentProvider::width const):
(WebCore::Layout::TextContentProvider::hyphenPositionBefore const):
* layout/inlineformatting/textlayout/TextContentProvider.h:
* layout/inlineformatting/textlayout/simple/SimpleLineBreaker.cpp:
(WebCore::Layout::SimpleLineBreaker::Line::setTextAlign):
(WebCore::Layout::SimpleLineBreaker::Line::justifyRuns):
(WebCore::Layout::SimpleLineBreaker::Line::adjustRunsForTextAlign):
(WebCore::Layout::SimpleLineBreaker::Line::collectExpansionOpportunities):
(WebCore::Layout::SimpleLineBreaker::Line::closeLastRun):
(WebCore::Layout::SimpleLineBreaker::Line::append):
(WebCore::Layout::SimpleLineBreaker::Line::reset):
(WebCore::Layout::SimpleLineBreaker::Style::Style):
(WebCore::Layout::SimpleLineBreaker::handleLineEnd):
(WebCore::Layout::SimpleLineBreaker::createRunsForLine):
(WebCore::Layout::SimpleLineBreaker::hyphenPositionBefore const):
(WebCore::Layout::SimpleLineBreaker::adjustSplitPositionWithHyphenation const):
(WebCore::Layout::SimpleLineBreaker::split const):
* layout/inlineformatting/textlayout/simple/SimpleLineBreaker.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@234110 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/layout/inlineformatting/textlayout/Runs.h
Source/WebCore/layout/inlineformatting/textlayout/TextContentProvider.cpp
Source/WebCore/layout/inlineformatting/textlayout/TextContentProvider.h
Source/WebCore/layout/inlineformatting/textlayout/simple/SimpleLineBreaker.cpp
Source/WebCore/layout/inlineformatting/textlayout/simple/SimpleLineBreaker.h