summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ui/gfx/render_text.cc4
-rw-r--r--ui/gfx/render_text.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/ui/gfx/render_text.cc b/ui/gfx/render_text.cc
index 94bfd23..2badc05 100644
--- a/ui/gfx/render_text.cc
+++ b/ui/gfx/render_text.cc
@@ -42,7 +42,7 @@ void CheckStyleRanges(const gfx::StyleRanges& style_ranges, size_t length) {
#endif
void ApplyStyleRangeImpl(gfx::StyleRanges* style_ranges,
- gfx::StyleRange style_range) {
+ const gfx::StyleRange& style_range) {
const ui::Range& new_range = style_range.range;
// Follow StyleRanges invariant conditions: sorted and non-overlapping ranges.
gfx::StyleRanges::iterator i;
@@ -395,7 +395,7 @@ void RenderText::SetCompositionRange(const ui::Range& composition_range) {
UpdateLayout();
}
-void RenderText::ApplyStyleRange(StyleRange style_range) {
+void RenderText::ApplyStyleRange(const StyleRange& style_range) {
const ui::Range& new_range = style_range.range;
if (!new_range.IsValid() || new_range.is_empty())
return;
diff --git a/ui/gfx/render_text.h b/ui/gfx/render_text.h
index d59be09..260bee8 100644
--- a/ui/gfx/render_text.h
+++ b/ui/gfx/render_text.h
@@ -180,7 +180,7 @@ class UI_EXPORT RenderText {
void SetCompositionRange(const ui::Range& composition_range);
// Apply |style_range| to the internal style model.
- void ApplyStyleRange(StyleRange style_range);
+ void ApplyStyleRange(const StyleRange& style_range);
// Apply |default_style_| over the entire text range.
void ApplyDefaultStyle();