| Index: Source/core/layout/LayoutTextControlMultiLine.cpp
|
| diff --git a/Source/core/layout/LayoutTextControlMultiLine.cpp b/Source/core/layout/LayoutTextControlMultiLine.cpp
|
| index 6a67ae7fad0722e19b98b330ec44dd9dfd7ae5bd..b48e0b00ec98de5acff36df47a38347f05fb6ef7 100644
|
| --- a/Source/core/layout/LayoutTextControlMultiLine.cpp
|
| +++ b/Source/core/layout/LayoutTextControlMultiLine.cpp
|
| @@ -24,6 +24,7 @@
|
|
|
| #include "core/html/HTMLTextAreaElement.h"
|
| #include "core/layout/HitTestResult.h"
|
| +#include "core/layout/LayoutTheme.h"
|
|
|
| namespace blink {
|
|
|
| @@ -50,10 +51,11 @@ bool LayoutTextControlMultiLine::nodeAtPoint(HitTestResult& result, const HitTes
|
|
|
| float LayoutTextControlMultiLine::getAvgCharWidth(const AtomicString& family) const
|
| {
|
| - // Since Lucida Grande is the default font, we want this to match the width
|
| - // of Courier New, the default font for textareas in IE, Firefox and Safari Win.
|
| - // 1229 is the avgCharWidth value in the OS/2 table for Courier New.
|
| - if (family == "Lucida Grande")
|
| + // Match the default system font to the width of MS Shell Dlg, the default
|
| + // font for textareas in Firefox, Safari Win and IE for some encodings (in
|
| + // IE, the default font is encoding specific). 1229 is the avgCharWidth
|
| + // value in the OS/2 table for Courier New.
|
| + if (LayoutTheme::theme().needsHackForTextControlWithFontFamily(family))
|
| return scaleEmToUnits(1229);
|
|
|
| return LayoutTextControl::getAvgCharWidth(family);
|
|
|