| 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 * Copyright (c) 2007, 2008, 2010 Google Inc. All rights reserved. | 6 * Copyright (c) 2007, 2008, 2010 Google Inc. All rights reserved. |
| 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 { | 88 { |
| 89 FontSelector* first = m_fontFallbackList ? m_fontFallbackList->getFontSelect
or() : 0; | 89 FontSelector* first = m_fontFallbackList ? m_fontFallbackList->getFontSelect
or() : 0; |
| 90 FontSelector* second = other.m_fontFallbackList ? other.m_fontFallbackList->
getFontSelector() : 0; | 90 FontSelector* second = other.m_fontFallbackList ? other.m_fontFallbackList->
getFontSelector() : 0; |
| 91 | 91 |
| 92 return first == second | 92 return first == second |
| 93 && m_fontDescription == other.m_fontDescription | 93 && m_fontDescription == other.m_fontDescription |
| 94 && (m_fontFallbackList ? m_fontFallbackList->fontSelectorVersion() : 0)
== (other.m_fontFallbackList ? other.m_fontFallbackList->fontSelectorVersion() :
0) | 94 && (m_fontFallbackList ? m_fontFallbackList->fontSelectorVersion() : 0)
== (other.m_fontFallbackList ? other.m_fontFallbackList->fontSelectorVersion() :
0) |
| 95 && (m_fontFallbackList ? m_fontFallbackList->generation() : 0) == (other
.m_fontFallbackList ? other.m_fontFallbackList->generation() : 0); | 95 && (m_fontFallbackList ? m_fontFallbackList->generation() : 0) == (other
.m_fontFallbackList ? other.m_fontFallbackList->generation() : 0); |
| 96 } | 96 } |
| 97 | 97 |
| 98 void Font::update(RawPtr<FontSelector> fontSelector) const | 98 void Font::update(FontSelector* fontSelector) const |
| 99 { | 99 { |
| 100 // FIXME: It is pretty crazy that we are willing to just poke into a RefPtr,
but it ends up | 100 // FIXME: It is pretty crazy that we are willing to just poke into a RefPtr,
but it ends up |
| 101 // being reasonably safe (because inherited fonts in the render tree pick up
the new | 101 // being reasonably safe (because inherited fonts in the render tree pick up
the new |
| 102 // style anyway. Other copies are transient, e.g., the state in the Graphics
Context, and | 102 // style anyway. Other copies are transient, e.g., the state in the Graphics
Context, and |
| 103 // won't stick around long enough to get you in trouble). Still, this is pre
tty disgusting, | 103 // won't stick around long enough to get you in trouble). Still, this is pre
tty disgusting, |
| 104 // and could eventually be rectified by using RefPtrs for Fonts themselves. | 104 // and could eventually be rectified by using RefPtrs for Fonts themselves. |
| 105 if (!m_fontFallbackList) | 105 if (!m_fontFallbackList) |
| 106 m_fontFallbackList = FontFallbackList::create(); | 106 m_fontFallbackList = FontFallbackList::create(); |
| 107 m_fontFallbackList->invalidate(fontSelector); | 107 m_fontFallbackList->invalidate(fontSelector); |
| 108 } | 108 } |
| (...skipping 731 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 840 { | 840 { |
| 841 return m_fontFallbackList && m_fontFallbackList->loadingCustomFonts(); | 841 return m_fontFallbackList && m_fontFallbackList->loadingCustomFonts(); |
| 842 } | 842 } |
| 843 | 843 |
| 844 bool Font::isFallbackValid() const | 844 bool Font::isFallbackValid() const |
| 845 { | 845 { |
| 846 return !m_fontFallbackList || m_fontFallbackList->isValid(); | 846 return !m_fontFallbackList || m_fontFallbackList->isValid(); |
| 847 } | 847 } |
| 848 | 848 |
| 849 } // namespace blink | 849 } // namespace blink |
| OLD | NEW |