| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) |
| 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) | 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
| 5 * Copyright (C) 2003, 2006, 2007, 2010, 2011 Apple Inc. All rights reserved. | 5 * Copyright (C) 2003, 2006, 2007, 2010, 2011 Apple Inc. All rights reserved. |
| 6 * Copyright (C) 2008 Holger Hans Peter Freyther | 6 * Copyright (C) 2008 Holger Hans Peter Freyther |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 // Metrics that we query the FontFallbackList for. | 165 // Metrics that we query the FontFallbackList for. |
| 166 float SpaceWidth() const { | 166 float SpaceWidth() const { |
| 167 DCHECK(PrimaryFont()); | 167 DCHECK(PrimaryFont()); |
| 168 return (PrimaryFont() ? PrimaryFont()->SpaceWidth() : 0) + | 168 return (PrimaryFont() ? PrimaryFont()->SpaceWidth() : 0) + |
| 169 GetFontDescription().LetterSpacing(); | 169 GetFontDescription().LetterSpacing(); |
| 170 } | 170 } |
| 171 float TabWidth(const SimpleFontData*, const TabSize&, float position) const; | 171 float TabWidth(const SimpleFontData*, const TabSize&, float position) const; |
| 172 float TabWidth(const TabSize& tab_size, float position) const { | 172 float TabWidth(const TabSize& tab_size, float position) const { |
| 173 return TabWidth(PrimaryFont(), tab_size, position); | 173 return TabWidth(PrimaryFont(), tab_size, position); |
| 174 } | 174 } |
| 175 LayoutUnit TabWidth(const TabSize&, LayoutUnit position) const; |
| 175 | 176 |
| 176 int EmphasisMarkAscent(const AtomicString&) const; | 177 int EmphasisMarkAscent(const AtomicString&) const; |
| 177 int EmphasisMarkDescent(const AtomicString&) const; | 178 int EmphasisMarkDescent(const AtomicString&) const; |
| 178 int EmphasisMarkHeight(const AtomicString&) const; | 179 int EmphasisMarkHeight(const AtomicString&) const; |
| 179 | 180 |
| 180 // This may fail and return a nullptr in case the last resort font cannot be | 181 // This may fail and return a nullptr in case the last resort font cannot be |
| 181 // loaded. This *should* not happen but in reality it does ever now and then | 182 // loaded. This *should* not happen but in reality it does ever now and then |
| 182 // when, for whatever reason, the last resort font cannot be loaded. | 183 // when, for whatever reason, the last resort font cannot be loaded. |
| 183 const SimpleFontData* PrimaryFont() const; | 184 const SimpleFontData* PrimaryFont() const; |
| 184 const FontData* FontDataAt(unsigned) const; | 185 const FontData* FontDataAt(unsigned) const; |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 // advance an additional tab stop. | 262 // advance an additional tab stop. |
| 262 if (distance_to_tab_stop < font_data->SpaceWidth() / 2) | 263 if (distance_to_tab_stop < font_data->SpaceWidth() / 2) |
| 263 distance_to_tab_stop += base_tab_width; | 264 distance_to_tab_stop += base_tab_width; |
| 264 | 265 |
| 265 return distance_to_tab_stop; | 266 return distance_to_tab_stop; |
| 266 } | 267 } |
| 267 | 268 |
| 268 } // namespace blink | 269 } // namespace blink |
| 269 | 270 |
| 270 #endif | 271 #endif |
| OLD | NEW |