| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 | 33 |
| 34 #include "platform/fonts/FontCache.h" | 34 #include "platform/fonts/FontCache.h" |
| 35 #include "platform/fonts/FontDescription.h" | 35 #include "platform/fonts/FontDescription.h" |
| 36 #include "platform/graphics/GraphicsContext.h" | 36 #include "platform/graphics/GraphicsContext.h" |
| 37 #include "platform/text/TextRun.h" | 37 #include "platform/text/TextRun.h" |
| 38 #include "public/platform/WebFloatPoint.h" | 38 #include "public/platform/WebFloatPoint.h" |
| 39 #include "public/platform/WebFloatRect.h" | 39 #include "public/platform/WebFloatRect.h" |
| 40 #include "public/platform/WebRect.h" | 40 #include "public/platform/WebRect.h" |
| 41 #include "public/web/WebFontDescription.h" | 41 #include "public/web/WebFontDescription.h" |
| 42 #include "public/web/WebTextRun.h" | 42 #include "public/web/WebTextRun.h" |
| 43 #include <skia/ext/platform_canvas.h> | 43 #include "skia/ext/platform_canvas.h" |
| 44 | 44 |
| 45 namespace blink { | 45 namespace blink { |
| 46 | 46 |
| 47 WebFont* WebFont::create(const WebFontDescription& desc) | 47 WebFont* WebFont::create(const WebFontDescription& desc) |
| 48 { | 48 { |
| 49 return new WebFontImpl(desc); | 49 return new WebFontImpl(desc); |
| 50 } | 50 } |
| 51 | 51 |
| 52 WebFontImpl::WebFontImpl(const FontDescription& desc) | 52 WebFontImpl::WebFontImpl(const FontDescription& desc) |
| 53 : m_font(desc) | 53 : m_font(desc) |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 return m_font.offsetForPosition(run, position, true); | 118 return m_font.offsetForPosition(run, position, true); |
| 119 } | 119 } |
| 120 | 120 |
| 121 WebFloatRect WebFontImpl::selectionRectForText(const WebTextRun& run, const WebF
loatPoint& leftBaseline, int height, int from, int to) const | 121 WebFloatRect WebFontImpl::selectionRectForText(const WebTextRun& run, const WebF
loatPoint& leftBaseline, int height, int from, int to) const |
| 122 { | 122 { |
| 123 FontCachePurgePreventer fontCachePurgePreventer; | 123 FontCachePurgePreventer fontCachePurgePreventer; |
| 124 return m_font.selectionRectForText(run, leftBaseline, height, from, to); | 124 return m_font.selectionRectForText(run, leftBaseline, height, from, to); |
| 125 } | 125 } |
| 126 | 126 |
| 127 } // namespace blink | 127 } // namespace blink |
| OLD | NEW |