Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(769)

Unified Diff: ui/gfx/render_text_win.cc

Issue 9111042: Fix RTL and complex script title in print preview header/footer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use RenderText instead Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« chrome/renderer/print_web_view_helper.cc ('K') | « ui/gfx/platform_font_pango.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/render_text_win.cc
diff --git a/ui/gfx/render_text_win.cc b/ui/gfx/render_text_win.cc
index 182c9adab1f15f18ed3d67d7bcdaf98b3a002c6b..b12b563c752ae5acaba91a00103fac3850503a8f 100644
--- a/ui/gfx/render_text_win.cc
+++ b/ui/gfx/render_text_win.cc
@@ -117,18 +117,23 @@ RenderTextWin::RenderTextWin()
string_width_(0),
needs_layout_(false) {
// Omitting default constructors for script_* would leave POD uninitialized.
- HRESULT hr = 0;
+ HRESULT hr = S_OK;
// 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));
+ if (FAILED(hr)) {
+ LOG(WARNING) << "ScriptRecordDigitSubstitution failed " << hr
vandebo (ex-Chrome) 2012/02/03 18:36:45 Is it because of the sandbox? Does that mean this
+ << ", possibly because of sandbox.";
+ }
- hr = ScriptApplyDigitSubstitution(&digit_substitute_,
- &script_control_,
- &script_state_);
- DCHECK(SUCCEEDED(hr));
- script_control_.fMergeNeutralItems = true;
+ if (SUCCEEDED(hr)) {
+ hr = ScriptApplyDigitSubstitution(&digit_substitute_,
vandebo (ex-Chrome) 2012/02/03 18:36:45 Why is is ok to not so this in the sandbox?
+ &script_control_,
+ &script_state_);
+ DCHECK(SUCCEEDED(hr));
+ script_control_.fMergeNeutralItems = true;
+ }
MoveCursorTo(EdgeSelectionModel(CURSOR_LEFT));
}
« chrome/renderer/print_web_view_helper.cc ('K') | « ui/gfx/platform_font_pango.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698