| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2013 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2013 Apple Inc. All rights reserved. |
| 3 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 3 * Copyright (C) Research In Motion Limited 2011. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 struct GlyphData { | 49 struct GlyphData { |
| 50 GlyphData(Glyph g = 0, const SimpleFontData* f = 0) | 50 GlyphData(Glyph g = 0, const SimpleFontData* f = 0) |
| 51 : glyph(g) | 51 : glyph(g) |
| 52 , fontData(f) | 52 , fontData(f) |
| 53 { | 53 { |
| 54 } | 54 } |
| 55 Glyph glyph; | 55 Glyph glyph; |
| 56 const SimpleFontData* fontData; | 56 const SimpleFontData* fontData; |
| 57 }; | 57 }; |
| 58 | 58 |
| 59 #if COMPILER(MSVC) |
| 60 #pragma warning(push) |
| 61 #pragma warning(disable: 4200) // Disable "zero-sized array in struct/union" war
ning |
| 62 #endif |
| 63 |
| 59 // A GlyphPage contains a fixed-size set of GlyphData mappings for a contiguous | 64 // A GlyphPage contains a fixed-size set of GlyphData mappings for a contiguous |
| 60 // range of characters in the Unicode code space. GlyphPages are indexed | 65 // range of characters in the Unicode code space. GlyphPages are indexed |
| 61 // starting from 0 and incrementing for each 256 glyphs. | 66 // starting from 0 and incrementing for each 256 glyphs. |
| 62 // | 67 // |
| 63 // One page may actually include glyphs from other fonts if the characters are | 68 // One page may actually include glyphs from other fonts if the characters are |
| 64 // missing in the primary font. It is owned by exactly one GlyphPageTreeNode, | 69 // missing in the primary font. It is owned by exactly one GlyphPageTreeNode, |
| 65 // although multiple nodes may reference it as their "page" if they are supposed | 70 // although multiple nodes may reference it as their "page" if they are supposed |
| 66 // to be overriding the parent's node, but provide no additional information. | 71 // to be overriding the parent's node, but provide no additional information. |
| 67 class PLATFORM_EXPORT GlyphPage : public RefCounted<GlyphPage> { | 72 class PLATFORM_EXPORT GlyphPage : public RefCounted<GlyphPage> { |
| 68 public: | 73 public: |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 | 211 |
| 207 const SimpleFontData* m_fontDataForAllGlyphs; | 212 const SimpleFontData* m_fontDataForAllGlyphs; |
| 208 GlyphPageTreeNode* m_owner; | 213 GlyphPageTreeNode* m_owner; |
| 209 RefPtr<CustomDataPage> m_customFontToLoad; | 214 RefPtr<CustomDataPage> m_customFontToLoad; |
| 210 Glyph m_glyphs[size]; | 215 Glyph m_glyphs[size]; |
| 211 | 216 |
| 212 // NOTE: This array has (GlyphPage::size) elements if m_fontDataForAllGlyphs
is null. | 217 // NOTE: This array has (GlyphPage::size) elements if m_fontDataForAllGlyphs
is null. |
| 213 const SimpleFontData* m_perGlyphFontData[0]; | 218 const SimpleFontData* m_perGlyphFontData[0]; |
| 214 }; | 219 }; |
| 215 | 220 |
| 221 #if COMPILER(MSVC) |
| 222 #pragma warning(pop) |
| 223 #endif |
| 224 |
| 216 } // namespace blink | 225 } // namespace blink |
| 217 | 226 |
| 218 #endif // GlyphPage_h | 227 #endif // GlyphPage_h |
| OLD | NEW |