| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/gfx/render_text_pango.h" | 5 #include "ui/gfx/render_text_pango.h" |
| 6 | 6 |
| 7 #include <pango/pangocairo.h> | 7 #include <pango/pangocairo.h> |
| 8 #include <algorithm> | 8 #include <algorithm> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 517 LayoutIndexToTextIndex(item->offset + item->length), CURSOR_BACKWARD); | 517 LayoutIndexToTextIndex(item->offset + item->length), CURSOR_BACKWARD); |
| 518 return SelectionModel(caret, CURSOR_FORWARD); | 518 return SelectionModel(caret, CURSOR_FORWARD); |
| 519 } | 519 } |
| 520 | 520 |
| 521 size_t RenderTextPango::GetGlyphTextIndex(PangoLayoutRun* run, | 521 size_t RenderTextPango::GetGlyphTextIndex(PangoLayoutRun* run, |
| 522 int glyph_index) const { | 522 int glyph_index) const { |
| 523 return LayoutIndexToTextIndex(run->item->offset + | 523 return LayoutIndexToTextIndex(run->item->offset + |
| 524 run->glyphs->log_clusters[glyph_index]); | 524 run->glyphs->log_clusters[glyph_index]); |
| 525 } | 525 } |
| 526 | 526 |
| 527 RenderText* RenderText::CreateInstance() { | 527 RenderText* RenderText::CreateNativeInstance() { |
| 528 return new RenderTextPango; | 528 return new RenderTextPango; |
| 529 } | 529 } |
| 530 | 530 |
| 531 } // namespace gfx | 531 } // namespace gfx |
| OLD | NEW |