| 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, 2011 Apple Inc. All rights reserved. | 5 * Copyright (C) 2003, 2006, 2007, 2011 Apple Inc. All rights reserved. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 m_directionalOverride = override; | 251 m_directionalOverride = override; |
| 252 } | 252 } |
| 253 | 253 |
| 254 void setTextJustify(TextJustify textJustify) { | 254 void setTextJustify(TextJustify textJustify) { |
| 255 m_textJustify = static_cast<unsigned>(textJustify); | 255 m_textJustify = static_cast<unsigned>(textJustify); |
| 256 } | 256 } |
| 257 TextJustify getTextJustify() const { | 257 TextJustify getTextJustify() const { |
| 258 return static_cast<TextJustify>(m_textJustify); | 258 return static_cast<TextJustify>(m_textJustify); |
| 259 } | 259 } |
| 260 | 260 |
| 261 // Up-converts to UTF-16 as needed and normalizes spaces and Unicode control |
| 262 // characters as per the CSS Text Module Level 3 specification. |
| 263 // https://drafts.csswg.org/css-text-3/#white-space-processing |
| 264 std::unique_ptr<UChar[]> normalizedUTF16(unsigned* resultLength) const; |
| 265 |
| 261 private: | 266 private: |
| 262 union { | 267 union { |
| 263 const LChar* characters8; | 268 const LChar* characters8; |
| 264 const UChar* characters16; | 269 const UChar* characters16; |
| 265 } m_data; | 270 } m_data; |
| 266 // Marks the end of the characters buffer. Default equals to m_len. | 271 // Marks the end of the characters buffer. Default equals to m_len. |
| 267 unsigned m_charactersLength; | 272 unsigned m_charactersLength; |
| 268 unsigned m_len; | 273 unsigned m_len; |
| 269 | 274 |
| 270 // m_xpos is the x position relative to the left start of the text line, not | 275 // m_xpos is the x position relative to the left start of the text line, not |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 | 307 |
| 303 const TextRun& run; | 308 const TextRun& run; |
| 304 unsigned from; | 309 unsigned from; |
| 305 unsigned to; | 310 unsigned to; |
| 306 FloatRect bounds; | 311 FloatRect bounds; |
| 307 sk_sp<SkTextBlob>* cachedTextBlob; | 312 sk_sp<SkTextBlob>* cachedTextBlob; |
| 308 }; | 313 }; |
| 309 | 314 |
| 310 } // namespace blink | 315 } // namespace blink |
| 311 #endif | 316 #endif |
| OLD | NEW |