| Index: Source/core/layout/LayoutText.h
|
| diff --git a/Source/core/layout/LayoutText.h b/Source/core/layout/LayoutText.h
|
| index de8cf9e86383f7e96f49d284af6b3a9f51a8bef3..6e66fbb7c34d5e891056005d93761413cc2fd056 100644
|
| --- a/Source/core/layout/LayoutText.h
|
| +++ b/Source/core/layout/LayoutText.h
|
| @@ -26,6 +26,7 @@
|
| #include "core/CoreExport.h"
|
| #include "core/dom/Text.h"
|
| #include "core/layout/LayoutObject.h"
|
| +#include "core/layout/TextRunConstructor.h"
|
| #include "platform/LengthFunctions.h"
|
| #include "platform/text/TextPath.h"
|
| #include "wtf/Forward.h"
|
| @@ -141,6 +142,8 @@ public:
|
|
|
| PassRefPtr<AbstractInlineTextBox> firstAbstractInlineTextBox();
|
|
|
| + float hyphenWidth(const Font&, TextDirection);
|
| +
|
| protected:
|
| virtual void willBeDestroyed() override;
|
|
|
| @@ -224,6 +227,12 @@ inline UChar LayoutText::characterAt(unsigned i) const
|
| return uncheckedCharacterAt(i);
|
| }
|
|
|
| +inline float LayoutText::hyphenWidth(const Font& font, TextDirection direction)
|
| +{
|
| + const ComputedStyle& style = styleRef();
|
| + return font.width(constructTextRun(this, font, style.hyphenString().string(), style, direction));
|
| +}
|
| +
|
| DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutText, isText());
|
|
|
| #if !ENABLE(ASSERT)
|
|
|