summaryrefslogtreecommitdiffstats
path: root/ui/gfx/render_text_win.cc
diff options
context:
space:
mode:
authorasvitkine@chromium.org <asvitkine@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-09 00:06:12 +0000
committerasvitkine@chromium.org <asvitkine@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-09 00:06:12 +0000
commita9d3b0f618bd98b432b9741aeba36c76e0b17999 (patch)
tree534162adeb50a0d0767c3e2ed6ad28d37fcda103 /ui/gfx/render_text_win.cc
parentee9bdfce0a8f58d136bf2df3b4a6e4542f5b6c1f (diff)
downloadchromium_src-a9d3b0f618bd98b432b9741aeba36c76e0b17999.zip
chromium_src-a9d3b0f618bd98b432b9741aeba36c76e0b17999.tar.gz
chromium_src-a9d3b0f618bd98b432b9741aeba36c76e0b17999.tar.bz2
Remove digit substitution code from RenderTextWin.
This has a non-trivial performance penalty for canvas_skia_skia.cc and possibly undesirable behavior. Also, explicitly memset the POD data - as the default constructors for POD structs don't actually 0-out the values. BUG=90426, 105550 TEST=existing unit tests Review URL: http://codereview.chromium.org/9348020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121107 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx/render_text_win.cc')
-rw-r--r--ui/gfx/render_text_win.cc16
1 files changed, 2 insertions, 14 deletions
diff --git a/ui/gfx/render_text_win.cc b/ui/gfx/render_text_win.cc
index b29c90c..30037a9 100644
--- a/ui/gfx/render_text_win.cc
+++ b/ui/gfx/render_text_win.cc
@@ -109,22 +109,10 @@ TextRun::~TextRun() {
RenderTextWin::RenderTextWin()
: RenderText(),
- script_control_(),
- script_state_(),
string_width_(0),
needs_layout_(false) {
- // Omitting default constructors for script_* would leave POD uninitialized.
- HRESULT hr = 0;
-
- // TODO(msw): Call ScriptRecordDigitSubstitution on WM_SETTINGCHANGE message.
- // TODO(msw): Use Chrome/profile locale/language settings?
- hr = ScriptRecordDigitSubstitution(LOCALE_USER_DEFAULT, &digit_substitute_);
- DCHECK(SUCCEEDED(hr));
-
- hr = ScriptApplyDigitSubstitution(&digit_substitute_,
- &script_control_,
- &script_state_);
- DCHECK(SUCCEEDED(hr));
+ memset(&script_control_, 0, sizeof(script_control_));
+ memset(&script_state_, 0, sizeof(script_state_));
script_control_.fMergeNeutralItems = true;
MoveCursorTo(EdgeSelectionModel(CURSOR_LEFT));