Remove convenience constructors for TextRun
https://bugs.webkit.org/show_bug.cgi?id=144752
Source/WebCore:
These convenience constructors are unnecessary. Moving the code that makes the StringView
back to the call site will also help us make things more elegant in future refactoring.
Reviewed by Darin Adler.
No new tests because there is no behavior change.
* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText): Remove ambiguous call.
* platform/graphics/StringTruncator.cpp:
(WebCore::stringWidth):
* platform/graphics/TextRun.h:
(WebCore::TextRun::TextRun):
* platform/mac/DragImageMac.mm:
(WebCore::widthWithFont):
(WebCore::drawAtPoint):
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseFor):
* rendering/SimpleLineLayoutTextFragmentIterator.cpp:
(WebCore::SimpleLineLayout::TextFragmentIterator::Style::Style):
(WebCore::SimpleLineLayout::TextFragmentIterator::runWidth):
* rendering/TextPainter.cpp:
(WebCore::TextPainter::paintText):
Source/WebKit/mac:
These convenience constructors are unnecessary. Moving the code that makes the StringView
back to the call site will also help us make things more elegant in future refactoring.
Reviewed by Darin Adler.
No new tests because there is no behavior change.
* Misc/WebKitNSStringExtras.mm:
(-[NSString _web_drawAtPoint:font:textColor:allowingFontSmoothing:]):
(-[NSString _web_widthWithFont:]):
Source/WTF:
Reviewed by Anders Carlsson.
No reason why StringView shouldn't have a StringImpl* constructor.
Test: StringView8Bit in TestWebKitAPI
* wtf/text/StringView.h: Add the constructor.
Tools:
Reviewed by Anders Carlsson.
Test the StringView which takes a StringImpl*.
* TestWebKitAPI/Tests/WTF/StringView.cpp:
(StringView8Bit): Testing is8Bit() on StringView
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@184037
268f45cc-cd09-0410-ab3c-
d52691b4dbfc