summaryrefslogtreecommitdiffstats
path: root/ui/gfx/render_text_linux.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ui/gfx/render_text_linux.cc')
-rw-r--r--ui/gfx/render_text_linux.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/ui/gfx/render_text_linux.cc b/ui/gfx/render_text_linux.cc
index 11bc487..acb9f90b 100644
--- a/ui/gfx/render_text_linux.cc
+++ b/ui/gfx/render_text_linux.cc
@@ -42,7 +42,7 @@ bool IsForwardMotion(VisualCursorDirection direction, const PangoItem* item) {
// Checks whether |range| contains |index|. This is not the same as calling
// |range.Contains(gfx::Range(index))| - as that would return true when
// |index| == |range.end()|.
-bool IndexInRange(const gfx::Range& range, size_t index) {
+bool IndexInRange(const Range& range, size_t index) {
return index >= range.start() && index < range.end();
}
@@ -137,7 +137,7 @@ std::vector<RenderText::FontSpan> RenderTextLinux::GetFontSpansForTesting() {
PangoItem* item = reinterpret_cast<PangoLayoutRun*>(it->data)->item;
const int start = LayoutIndexToTextIndex(item->offset);
const int end = LayoutIndexToTextIndex(item->offset + item->length);
- const gfx::Range range(start, end);
+ const Range range(start, end);
ScopedPangoFontDescription desc(pango_font_describe(item->analysis.font));
spans.push_back(RenderText::FontSpan(Font(desc.get()), range));
@@ -214,14 +214,14 @@ SelectionModel RenderTextLinux::AdjacentWordSelectionModel(
return cur;
}
-gfx::Range RenderTextLinux::GetGlyphBounds(size_t index) {
+Range RenderTextLinux::GetGlyphBounds(size_t index) {
PangoRectangle pos;
pango_layout_index_to_pos(layout_, TextIndexToLayoutIndex(index), &pos);
// TODO(derat): Support fractional ranges for subpixel positioning?
- return gfx::Range(PANGO_PIXELS(pos.x), PANGO_PIXELS(pos.x + pos.width));
+ return Range(PANGO_PIXELS(pos.x), PANGO_PIXELS(pos.x + pos.width));
}
-std::vector<Rect> RenderTextLinux::GetSubstringBounds(const gfx::Range& range) {
+std::vector<Rect> RenderTextLinux::GetSubstringBounds(const Range& range) {
DCHECK_LE(range.GetMax(), text().length());
if (range.is_empty())
return std::vector<Rect>();
@@ -428,7 +428,7 @@ void RenderTextLinux::DrawVisualText(Canvas* canvas) {
// Track the current style and its text (not layout) index range.
style.UpdatePosition(GetGlyphTextIndex(run, style_start_glyph_index));
- gfx::Range style_range = style.GetRange();
+ Range style_range = style.GetRange();
do {
const PangoGlyphInfo& glyph = run->glyphs->glyphs[glyph_index];
@@ -478,7 +478,7 @@ GSList* RenderTextLinux::GetRunContainingCaret(
GSList* run = current_line_->runs;
while (run) {
PangoItem* item = reinterpret_cast<PangoLayoutRun*>(run->data)->item;
- gfx::Range item_range(item->offset, item->offset + item->length);
+ Range item_range(item->offset, item->offset + item->length);
if (RangeContainsCaret(item_range, position, affinity))
return run;
run = run->next;