Clean up TextRun-related code
authormmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 1 Sep 2016 07:37:19 +0000 (07:37 +0000)
committermmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 1 Sep 2016 07:37:19 +0000 (07:37 +0000)
commita2e064a60abeefd6c9ece6069555df6aac4bd034
tree66b55cae3ace9ad17e5199f3f48c1d880b56466f
parente8c4dd145bbde535e199340a47777239fdf1566e
Clean up TextRun-related code
https://bugs.webkit.org/show_bug.cgi?id=161473

Reviewed by Simon Fraser.

Source/WebCore:

Some assorted cleanup, including:
- Renaming "AllowTrailingExpansion | ForbidLeadingExpansion" to "DefaultExpansion"
- Migrating from pointers to references
- Migrating from ints to unsigneds
- Using proper character names from CharacterNames.h
- Simplifying CoreTextSPI.h

No new tests because there is no behavior change.

* platform/graphics/TextRun.h:
(WebCore::TextRun::TextRun):
* platform/graphics/mac/ComplexTextController.cpp:
(WebCore::TextLayout::isNeeded):
(WebCore::TextLayout::constructTextRun):
* platform/spi/cocoa/CoreTextSPI.h:
* platform/text/TextFlags.h:
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::constructTextRun):
* rendering/RenderBlock.h:
* rendering/RenderListMarker.cpp:
(WebCore::RenderListMarker::computePreferredLogicalWidths):
(WebCore::RenderListMarker::getRelativeMarkerRect):
* rendering/RenderMenuList.cpp:
(RenderMenuList::updateOptionsWidth):
* rendering/RenderText.cpp:
(WebCore::RenderText::widthFromCache):
(WebCore::RenderText::trimmedPrefWidths):
(WebCore::hyphenWidth):
(WebCore::maxWordFragmentWidth):
(WebCore::RenderText::computePreferredLogicalWidths):
(WebCore::RenderText::width):
* rendering/RenderText.h:
* rendering/RenderThemeIOS.mm:
* rendering/line/BreakingContext.h:
(WebCore::textWidth):
(WebCore::tryHyphenating):
* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::offsetForPositionInFragment):
(WebCore::SVGInlineTextBox::selectionRectForTextFragment):
(WebCore::SVGInlineTextBox::localSelectionRect):
(WebCore::SVGInlineTextBox::paintSelectionBackground):
(WebCore::SVGInlineTextBox::paint):
(WebCore::SVGInlineTextBox::acquirePaintingResource):
(WebCore::SVGInlineTextBox::prepareGraphicsContextForTextPainting):
(WebCore::SVGInlineTextBox::constructTextRun):
(WebCore::SVGInlineTextBox::paintDecorationWithStyle):
(WebCore::SVGInlineTextBox::paintTextWithShadows):
(WebCore::SVGInlineTextBox::paintText):
* rendering/svg/SVGInlineTextBox.h:

Source/WebKit/mac:

Remove unused #includes.

* WebCoreSupport/WebDragClient.mm:
* WebView/WebView.mm:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@205282 268f45cc-cd09-0410-ab3c-d52691b4dbfc
18 files changed:
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/TextRun.h
Source/WebCore/platform/graphics/mac/ComplexTextController.cpp
Source/WebCore/platform/spi/cocoa/CoreTextSPI.h
Source/WebCore/platform/text/TextFlags.h
Source/WebCore/rendering/RenderBlock.cpp
Source/WebCore/rendering/RenderBlock.h
Source/WebCore/rendering/RenderListMarker.cpp
Source/WebCore/rendering/RenderMenuList.cpp
Source/WebCore/rendering/RenderText.cpp
Source/WebCore/rendering/RenderText.h
Source/WebCore/rendering/RenderThemeIOS.mm
Source/WebCore/rendering/line/BreakingContext.h
Source/WebCore/rendering/svg/SVGInlineTextBox.cpp
Source/WebCore/rendering/svg/SVGInlineTextBox.h
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebCoreSupport/WebDragClient.mm
Source/WebKit/mac/WebView/WebView.mm