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

Unified Diff: content/common/mac/attributed_string_coder.mm

Issue 24012002: Move Range code to gfx. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: d Created 7 years, 3 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
Index: content/common/mac/attributed_string_coder.mm
diff --git a/content/common/mac/attributed_string_coder.mm b/content/common/mac/attributed_string_coder.mm
index 2f32ec30e8fb2cbc50d3c5f035f6414714e70438..ba6eca535c19cf956acbc42792d6fdf89e29bf5e 100644
--- a/content/common/mac/attributed_string_coder.mm
+++ b/content/common/mac/attributed_string_coder.mm
@@ -29,7 +29,7 @@ const AttributedStringCoder::EncodedString* AttributedStringCoder::Encode(
NSDictionary* ns_attributes = [str attributesAtIndex:i
effectiveRange:&effective_range];
// Convert the attributes to IPC-friendly types.
- FontAttribute attrs(ns_attributes, ui::Range(effective_range));
+ FontAttribute attrs(ns_attributes, gfx::Range(effective_range));
// Only encode the attributes if the filtered set contains font information.
if (attrs.ShouldEncode()) {
encoded_string->attributes()->push_back(attrs);
@@ -52,7 +52,7 @@ NSAttributedString* AttributedStringCoder::Decode(
for (std::vector<FontAttribute>::const_iterator it = attributes.begin();
it != attributes.end(); ++it) {
// Protect against ranges that are outside the range of the string.
- const ui::Range& range = it->effective_range();
+ const gfx::Range& range = it->effective_range();
if (range.GetMin() > [plain_text length] ||
range.GetMax() > [plain_text length]) {
continue;
@@ -77,7 +77,7 @@ AttributedStringCoder::EncodedString::~EncodedString() {
}
AttributedStringCoder::FontAttribute::FontAttribute(NSDictionary* dict,
- ui::Range effective_range)
+ gfx::Range effective_range)
: font_descriptor_(),
effective_range_(effective_range) {
NSFont* font = [dict objectForKey:NSFontAttributeName];
@@ -87,7 +87,7 @@ AttributedStringCoder::FontAttribute::FontAttribute(NSDictionary* dict,
}
AttributedStringCoder::FontAttribute::FontAttribute(FontDescriptor font,
- ui::Range range)
+ gfx::Range range)
: font_descriptor_(font),
effective_range_(range) {
}
@@ -155,7 +155,7 @@ bool ParamTraits<AttributedStringCoder::FontAttribute>::Read(
FontDescriptor font;
success &= ReadParam(m, iter, &font);
- ui::Range range;
+ gfx::Range range;
success &= ReadParam(m, iter, &range);
if (success) {
« no previous file with comments | « content/common/mac/attributed_string_coder.h ('k') | content/common/mac/attributed_string_coder_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698