| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "webkit/glue/plugins/pepper_font.h" | 5 #include "webkit/glue/plugins/pepper_font.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
| 9 #include "third_party/ppapi/c/dev/ppb_font_dev.h" | 9 #include "ppapi/c/dev/ppb_font_dev.h" |
| 10 #include "third_party/ppapi/c/pp_rect.h" | 10 #include "ppapi/c/pp_rect.h" |
| 11 #include "third_party/WebKit/WebKit/chromium/public/WebFont.h" | 11 #include "third_party/WebKit/WebKit/chromium/public/WebFont.h" |
| 12 #include "third_party/WebKit/WebKit/chromium/public/WebFontDescription.h" | 12 #include "third_party/WebKit/WebKit/chromium/public/WebFontDescription.h" |
| 13 #include "third_party/WebKit/WebKit/chromium/public/WebRect.h" | 13 #include "third_party/WebKit/WebKit/chromium/public/WebRect.h" |
| 14 #include "third_party/WebKit/WebKit/chromium/public/WebFloatPoint.h" | 14 #include "third_party/WebKit/WebKit/chromium/public/WebFloatPoint.h" |
| 15 #include "third_party/WebKit/WebKit/chromium/public/WebFloatRect.h" | 15 #include "third_party/WebKit/WebKit/chromium/public/WebFloatRect.h" |
| 16 #include "third_party/WebKit/WebKit/chromium/public/WebTextRun.h" | 16 #include "third_party/WebKit/WebKit/chromium/public/WebTextRun.h" |
| 17 #include "webkit/glue/plugins/pepper_image_data.h" | 17 #include "webkit/glue/plugins/pepper_image_data.h" |
| 18 #include "webkit/glue/plugins/pepper_plugin_module.h" | 18 #include "webkit/glue/plugins/pepper_plugin_module.h" |
| 19 #include "webkit/glue/plugins/pepper_string.h" | 19 #include "webkit/glue/plugins/pepper_string.h" |
| 20 #include "webkit/glue/plugins/pepper_var.h" | 20 #include "webkit/glue/plugins/pepper_var.h" |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 return -1; | 283 return -1; |
| 284 if (char_offset >= run.text.length()) | 284 if (char_offset >= run.text.length()) |
| 285 return -1; | 285 return -1; |
| 286 | 286 |
| 287 WebFloatRect rect = font_->selectionRectForText( | 287 WebFloatRect rect = font_->selectionRectForText( |
| 288 run, WebFloatPoint(0.0f, 0.0f), font_->height(), 0, char_offset); | 288 run, WebFloatPoint(0.0f, 0.0f), font_->height(), 0, char_offset); |
| 289 return static_cast<int>(rect.width); | 289 return static_cast<int>(rect.width); |
| 290 } | 290 } |
| 291 | 291 |
| 292 } // namespace pepper | 292 } // namespace pepper |
| OLD | NEW |