Changeset 130082 in webkit
- Timestamp:
- Oct 1, 2012, 3:18:28 PM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r130081 r130082 1 2012-10-01 Stephen Chenney <schenney@chromium.org> 2 3 Rename Font::m_fontList to avoid confusion 4 https://bugs.webkit.org/show_bug.cgi?id=95867 5 6 Reviewed by Eric Seidel. 7 8 Renames Font::m_fontList to Font::m_fontFallbackList to avoid confusion 9 with FontFallbackList::m_fontList. 10 11 No new tests as behavior is absolutely not different. 12 13 * platform/graphics/Font.cpp: 14 (WebCore::Font::Font): 15 (WebCore::Font::operator=): 16 (WebCore::Font::operator==): 17 (WebCore::Font::update): 18 * platform/graphics/Font.h: 19 (WebCore::Font::fontList): 20 (WebCore::Font::loadingCustomFonts): 21 (Font): 22 (WebCore::Font::primaryFont): 23 (WebCore::Font::fontDataAt): 24 (WebCore::Font::isFixedPitch): 25 (WebCore::Font::fontSelector): 26 * platform/graphics/FontFastPath.cpp: 27 (WebCore::Font::glyphDataAndPageForCharacter): 28 1 29 2012-10-01 Florin Malita <fmalita@chromium.org> 2 30 -
trunk/Source/WebCore/platform/graphics/Font.cpp
r127801 r130082 87 87 88 88 Font::Font(const FontPlatformData& fontData, bool isPrinterFont, FontSmoothingMode fontSmoothingMode) 89 : m_font List(FontFallbackList::create())89 : m_fontFallbackList(FontFallbackList::create()) 90 90 , m_letterSpacing(0) 91 91 , m_wordSpacing(0) … … 95 95 m_fontDescription.setFontSmoothing(fontSmoothingMode); 96 96 m_needsTranscoding = fontTranscoder().needsTranscoding(fontDescription()); 97 m_font List->setPlatformFont(fontData);97 m_fontFallbackList->setPlatformFont(fontData); 98 98 } 99 99 100 100 Font::Font(const Font& other) 101 101 : m_fontDescription(other.m_fontDescription) 102 , m_font List(other.m_fontList)102 , m_fontFallbackList(other.m_fontFallbackList) 103 103 , m_letterSpacing(other.m_letterSpacing) 104 104 , m_wordSpacing(other.m_wordSpacing) … … 111 111 { 112 112 m_fontDescription = other.m_fontDescription; 113 m_font List = other.m_fontList;113 m_fontFallbackList = other.m_fontFallbackList; 114 114 m_letterSpacing = other.m_letterSpacing; 115 115 m_wordSpacing = other.m_wordSpacing; … … 126 126 return false; 127 127 128 FontSelector* first = m_font List ? m_fontList->fontSelector() : 0;129 FontSelector* second = other.m_font List ? other.m_fontList->fontSelector() : 0;128 FontSelector* first = m_fontFallbackList ? m_fontFallbackList->fontSelector() : 0; 129 FontSelector* second = other.m_fontFallbackList ? other.m_fontFallbackList->fontSelector() : 0; 130 130 131 131 return first == second 132 133 134 135 && (m_fontList ? m_fontList->fontSelectorVersion() : 0) == (other.m_fontList ? other.m_fontList->fontSelectorVersion() : 0)136 && (m_fontList ? m_fontList->generation() : 0) == (other.m_fontList ? other.m_fontList->generation() : 0);132 && m_fontDescription == other.m_fontDescription 133 && m_letterSpacing == other.m_letterSpacing 134 && m_wordSpacing == other.m_wordSpacing 135 && (m_fontFallbackList ? m_fontFallbackList->fontSelectorVersion() : 0) == (other.m_fontFallbackList ? other.m_fontFallbackList->fontSelectorVersion() : 0) 136 && (m_fontFallbackList ? m_fontFallbackList->generation() : 0) == (other.m_fontFallbackList ? other.m_fontFallbackList->generation() : 0); 137 137 } 138 138 … … 144 144 // won't stick around long enough to get you in trouble). Still, this is pretty disgusting, 145 145 // and could eventually be rectified by using RefPtrs for Fonts themselves. 146 if (!m_font List)147 m_font List = FontFallbackList::create();148 m_font List->invalidate(fontSelector);146 if (!m_fontFallbackList) 147 m_fontFallbackList = FontFallbackList::create(); 148 m_fontFallbackList->invalidate(fontSelector); 149 149 } 150 150 -
trunk/Source/WebCore/platform/graphics/Font.h
r130079 r130082 262 262 263 263 bool needsTranscoding() const { return m_needsTranscoding; } 264 FontFallbackList* fontList() const { return m_font List.get(); }264 FontFallbackList* fontList() const { return m_fontFallbackList.get(); } 265 265 266 266 private: 267 267 bool loadingCustomFonts() const 268 268 { 269 return m_font List && m_fontList->loadingCustomFonts();269 return m_fontFallbackList && m_fontFallbackList->loadingCustomFonts(); 270 270 } 271 271 … … 275 275 276 276 FontDescription m_fontDescription; 277 mutable RefPtr<FontFallbackList> m_font List;277 mutable RefPtr<FontFallbackList> m_fontFallbackList; 278 278 short m_letterSpacing; 279 279 short m_wordSpacing; … … 288 288 inline const SimpleFontData* Font::primaryFont() const 289 289 { 290 ASSERT(m_font List);291 return m_font List->primarySimpleFontData(this);290 ASSERT(m_fontFallbackList); 291 return m_fontFallbackList->primarySimpleFontData(this); 292 292 } 293 293 294 294 inline const FontData* Font::fontDataAt(unsigned index) const 295 295 { 296 ASSERT(m_font List);297 return m_font List->fontDataAt(this, index);296 ASSERT(m_fontFallbackList); 297 return m_fontFallbackList->fontDataAt(this, index); 298 298 } 299 299 300 300 inline bool Font::isFixedPitch() const 301 301 { 302 ASSERT(m_font List);303 return m_font List->isFixedPitch(this);302 ASSERT(m_fontFallbackList); 303 return m_fontFallbackList->isFixedPitch(this); 304 304 } 305 305 306 306 inline FontSelector* Font::fontSelector() const 307 307 { 308 return m_font List ? m_fontList->fontSelector() : 0;308 return m_fontFallbackList ? m_fontFallbackList->fontSelector() : 0; 309 309 } 310 310 -
trunk/Source/WebCore/platform/graphics/FontFastPath.cpp
r130079 r130082 69 69 unsigned pageNumber = (c / GlyphPage::size); 70 70 71 GlyphPageTreeNode* node = pageNumber ? m_font List->m_pages.get(pageNumber) : m_fontList->m_pageZero;71 GlyphPageTreeNode* node = pageNumber ? m_fontFallbackList->m_pages.get(pageNumber) : m_fontFallbackList->m_pageZero; 72 72 if (!node) { 73 73 node = GlyphPageTreeNode::getRootChild(fontDataAt(0), pageNumber); 74 74 if (pageNumber) 75 m_font List->m_pages.set(pageNumber, node);75 m_fontFallbackList->m_pages.set(pageNumber, node); 76 76 else 77 m_font List->m_pageZero = node;77 m_fontFallbackList->m_pageZero = node; 78 78 } 79 79 … … 140 140 node = node->getChild(fontDataAt(node->level()), pageNumber); 141 141 if (pageNumber) 142 m_font List->m_pages.set(pageNumber, node);142 m_fontFallbackList->m_pages.set(pageNumber, node); 143 143 else 144 m_font List->m_pageZero = node;144 m_fontFallbackList->m_pageZero = node; 145 145 } 146 146 } … … 177 177 node = node->getChild(fontDataAt(node->level()), pageNumber); 178 178 if (pageNumber) 179 m_font List->m_pages.set(pageNumber, node);179 m_fontFallbackList->m_pages.set(pageNumber, node); 180 180 else 181 m_font List->m_pageZero = node;181 m_fontFallbackList->m_pageZero = node; 182 182 } 183 183 }
Note:
See TracChangeset
for help on using the changeset viewer.