OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "public/platform/WebFont.h" | 5 #include "public/platform/WebFont.h" |
6 | 6 |
7 #include "platform/fonts/Font.h" | 7 #include "platform/fonts/Font.h" |
8 #include "platform/fonts/FontCache.h" | 8 #include "platform/fonts/FontCache.h" |
9 #include "platform/fonts/FontDescription.h" | 9 #include "platform/fonts/FontDescription.h" |
10 #include "platform/graphics/GraphicsContext.h" | 10 #include "platform/graphics/GraphicsContext.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 | 35 |
36 const Font& getFont() const { return m_font; } | 36 const Font& getFont() const { return m_font; } |
37 String debugName() const final { return "WebFont::Impl"; } | 37 String debugName() const final { return "WebFont::Impl"; } |
38 LayoutRect visualRect() const final | 38 LayoutRect visualRect() const final |
39 { | 39 { |
40 // TODO(chrishtr): fix this. | 40 // TODO(chrishtr): fix this. |
41 return LayoutRect(); | 41 return LayoutRect(); |
42 } | 42 } |
43 | 43 |
44 private: | 44 private: |
| 45 DISPLAY_ITEM_CACHE_STATUS_UNCACHEABLE_IMPLEMENTATION |
| 46 |
45 Font m_font; | 47 Font m_font; |
46 }; | 48 }; |
47 | 49 |
48 WebFont::WebFont(const WebFontDescription& description) | 50 WebFont::WebFont(const WebFontDescription& description) |
49 : m_private(new Impl(description)) | 51 : m_private(new Impl(description)) |
50 { | 52 { |
51 } | 53 } |
52 | 54 |
53 WebFont::~WebFont() | 55 WebFont::~WebFont() |
54 { | 56 { |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 { | 122 { |
121 return m_private->getFont().offsetForPosition(run, position, true); | 123 return m_private->getFont().offsetForPosition(run, position, true); |
122 } | 124 } |
123 | 125 |
124 WebFloatRect WebFont::selectionRectForText(const WebTextRun& run, const WebFloat
Point& leftBaseline, int height, int from, int to) const | 126 WebFloatRect WebFont::selectionRectForText(const WebTextRun& run, const WebFloat
Point& leftBaseline, int height, int from, int to) const |
125 { | 127 { |
126 return m_private->getFont().selectionRectForText(run, leftBaseline, height,
from, to); | 128 return m_private->getFont().selectionRectForText(run, leftBaseline, height,
from, to); |
127 } | 129 } |
128 | 130 |
129 } // namespace blink | 131 } // namespace blink |
OLD | NEW |