OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 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, 2010, 2011 Apple Inc. All rights reserved. | 5 * Copyright (C) 2003, 2006, 2010, 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 | 113 |
114 bool Font::operator==(const Font& other) const | 114 bool Font::operator==(const Font& other) const |
115 { | 115 { |
116 // Our FontData don't have to be checked, since checking the font descriptio
n will be fine. | 116 // Our FontData don't have to be checked, since checking the font descriptio
n will be fine. |
117 // FIXME: This does not work if the font was made with the FontPlatformData
constructor. | 117 // FIXME: This does not work if the font was made with the FontPlatformData
constructor. |
118 if (loadingCustomFonts() || other.loadingCustomFonts()) | 118 if (loadingCustomFonts() || other.loadingCustomFonts()) |
119 return false; | 119 return false; |
120 | 120 |
121 FontSelector* first = m_fontList ? m_fontList->fontSelector() : 0; | 121 FontSelector* first = m_fontList ? m_fontList->fontSelector() : 0; |
122 FontSelector* second = other.m_fontList ? other.m_fontList->fontSelector() :
0; | 122 FontSelector* second = other.m_fontList ? other.m_fontList->fontSelector() :
0; |
123 | 123 |
124 return first == second | 124 return first == second |
125 && m_fontDescription == other.m_fontDescription | 125 && m_fontDescription == other.m_fontDescription |
126 && m_letterSpacing == other.m_letterSpacing | 126 && m_letterSpacing == other.m_letterSpacing |
127 && m_wordSpacing == other.m_wordSpacing | 127 && m_wordSpacing == other.m_wordSpacing |
| 128 && (m_fontList ? m_fontList->fontSelectorVersion() : 0) == (other.m_f
ontList ? other.m_fontList->fontSelectorVersion() : 0) |
128 && (m_fontList ? m_fontList->generation() : 0) == (other.m_fontList ?
other.m_fontList->generation() : 0); | 129 && (m_fontList ? m_fontList->generation() : 0) == (other.m_fontList ?
other.m_fontList->generation() : 0); |
129 } | 130 } |
130 | 131 |
131 void Font::update(PassRefPtr<FontSelector> fontSelector) const | 132 void Font::update(PassRefPtr<FontSelector> fontSelector) const |
132 { | 133 { |
133 // FIXME: It is pretty crazy that we are willing to just poke into a RefPtr,
but it ends up | 134 // FIXME: It is pretty crazy that we are willing to just poke into a RefPtr,
but it ends up |
134 // being reasonably safe (because inherited fonts in the render tree pick up
the new | 135 // being reasonably safe (because inherited fonts in the render tree pick up
the new |
135 // style anyway. Other copies are transient, e.g., the state in the Graphics
Context, and | 136 // style anyway. Other copies are transient, e.g., the state in the Graphics
Context, and |
136 // won't stick around long enough to get you in trouble). Still, this is pre
tty disgusting, | 137 // won't stick around long enough to get you in trouble). Still, this is pre
tty disgusting, |
137 // and could eventually be rectified by using RefPtrs for Fonts themselves. | 138 // and could eventually be rectified by using RefPtrs for Fonts themselves. |
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
592 | 593 |
593 // Additional word-separator characters listed in CSS Text Level 3 Editor's
Draft 3 November 2010. | 594 // Additional word-separator characters listed in CSS Text Level 3 Editor's
Draft 3 November 2010. |
594 if (c == ethiopicWordspace || c == aegeanWordSeparatorLine || c == aegeanWor
dSeparatorDot | 595 if (c == ethiopicWordspace || c == aegeanWordSeparatorLine || c == aegeanWor
dSeparatorDot |
595 || c == ugariticWordDivider || c == tibetanMarkIntersyllabicTsheg || c =
= tibetanMarkDelimiterTshegBstar) | 596 || c == ugariticWordDivider || c == tibetanMarkIntersyllabicTsheg || c =
= tibetanMarkDelimiterTshegBstar) |
596 return false; | 597 return false; |
597 | 598 |
598 return true; | 599 return true; |
599 } | 600 } |
600 | 601 |
601 } | 602 } |
OLD | NEW |