- Revision
- 130082
- Author
- schen...@chromium.org
- Date
- 2012-10-01 15:18:28 -0700 (Mon, 01 Oct 2012)
Log Message
Rename Font::m_fontList to avoid confusion
https://bugs.webkit.org/show_bug.cgi?id=95867
Reviewed by Eric Seidel.
Renames Font::m_fontList to Font::m_fontFallbackList to avoid confusion
with FontFallbackList::m_fontList.
No new tests as behavior is absolutely not different.
* platform/graphics/Font.cpp:
(WebCore::Font::Font):
(WebCore::Font::operator=):
(WebCore::Font::operator==):
(WebCore::Font::update):
* platform/graphics/Font.h:
(WebCore::Font::fontList):
(WebCore::Font::loadingCustomFonts):
(Font):
(WebCore::Font::primaryFont):
(WebCore::Font::fontDataAt):
(WebCore::Font::isFixedPitch):
(WebCore::Font::fontSelector):
* platform/graphics/FontFastPath.cpp:
(WebCore::Font::glyphDataAndPageForCharacter):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (130081 => 130082)
--- trunk/Source/WebCore/ChangeLog 2012-10-01 22:04:56 UTC (rev 130081)
+++ trunk/Source/WebCore/ChangeLog 2012-10-01 22:18:28 UTC (rev 130082)
@@ -1,3 +1,31 @@
+2012-10-01 Stephen Chenney <schen...@chromium.org>
+
+ Rename Font::m_fontList to avoid confusion
+ https://bugs.webkit.org/show_bug.cgi?id=95867
+
+ Reviewed by Eric Seidel.
+
+ Renames Font::m_fontList to Font::m_fontFallbackList to avoid confusion
+ with FontFallbackList::m_fontList.
+
+ No new tests as behavior is absolutely not different.
+
+ * platform/graphics/Font.cpp:
+ (WebCore::Font::Font):
+ (WebCore::Font::operator=):
+ (WebCore::Font::operator==):
+ (WebCore::Font::update):
+ * platform/graphics/Font.h:
+ (WebCore::Font::fontList):
+ (WebCore::Font::loadingCustomFonts):
+ (Font):
+ (WebCore::Font::primaryFont):
+ (WebCore::Font::fontDataAt):
+ (WebCore::Font::isFixedPitch):
+ (WebCore::Font::fontSelector):
+ * platform/graphics/FontFastPath.cpp:
+ (WebCore::Font::glyphDataAndPageForCharacter):
+
2012-10-01 Florin Malita <fmal...@chromium.org>
Refactor layer-related logic out of RenderBoxModelObject
Modified: trunk/Source/WebCore/platform/graphics/Font.cpp (130081 => 130082)
--- trunk/Source/WebCore/platform/graphics/Font.cpp 2012-10-01 22:04:56 UTC (rev 130081)
+++ trunk/Source/WebCore/platform/graphics/Font.cpp 2012-10-01 22:18:28 UTC (rev 130082)
@@ -86,7 +86,7 @@
}
Font::Font(const FontPlatformData& fontData, bool isPrinterFont, FontSmoothingMode fontSmoothingMode)
- : m_fontList(FontFallbackList::create())
+ : m_fontFallbackList(FontFallbackList::create())
, m_letterSpacing(0)
, m_wordSpacing(0)
, m_isPlatformFont(true)
@@ -94,12 +94,12 @@
m_fontDescription.setUsePrinterFont(isPrinterFont);
m_fontDescription.setFontSmoothing(fontSmoothingMode);
m_needsTranscoding = fontTranscoder().needsTranscoding(fontDescription());
- m_fontList->setPlatformFont(fontData);
+ m_fontFallbackList->setPlatformFont(fontData);
}
Font::Font(const Font& other)
: m_fontDescription(other.m_fontDescription)
- , m_fontList(other.m_fontList)
+ , m_fontFallbackList(other.m_fontFallbackList)
, m_letterSpacing(other.m_letterSpacing)
, m_wordSpacing(other.m_wordSpacing)
, m_isPlatformFont(other.m_isPlatformFont)
@@ -110,7 +110,7 @@
Font& Font::operator=(const Font& other)
{
m_fontDescription = other.m_fontDescription;
- m_fontList = other.m_fontList;
+ m_fontFallbackList = other.m_fontFallbackList;
m_letterSpacing = other.m_letterSpacing;
m_wordSpacing = other.m_wordSpacing;
m_isPlatformFont = other.m_isPlatformFont;
@@ -125,15 +125,15 @@
if (loadingCustomFonts() || other.loadingCustomFonts())
return false;
- FontSelector* first = m_fontList ? m_fontList->fontSelector() : 0;
- FontSelector* second = other.m_fontList ? other.m_fontList->fontSelector() : 0;
+ FontSelector* first = m_fontFallbackList ? m_fontFallbackList->fontSelector() : 0;
+ FontSelector* second = other.m_fontFallbackList ? other.m_fontFallbackList->fontSelector() : 0;
return first == second
- && m_fontDescription == other.m_fontDescription
- && m_letterSpacing == other.m_letterSpacing
- && m_wordSpacing == other.m_wordSpacing
- && (m_fontList ? m_fontList->fontSelectorVersion() : 0) == (other.m_fontList ? other.m_fontList->fontSelectorVersion() : 0)
- && (m_fontList ? m_fontList->generation() : 0) == (other.m_fontList ? other.m_fontList->generation() : 0);
+ && m_fontDescription == other.m_fontDescription
+ && m_letterSpacing == other.m_letterSpacing
+ && m_wordSpacing == other.m_wordSpacing
+ && (m_fontFallbackList ? m_fontFallbackList->fontSelectorVersion() : 0) == (other.m_fontFallbackList ? other.m_fontFallbackList->fontSelectorVersion() : 0)
+ && (m_fontFallbackList ? m_fontFallbackList->generation() : 0) == (other.m_fontFallbackList ? other.m_fontFallbackList->generation() : 0);
}
void Font::update(PassRefPtr<FontSelector> fontSelector) const
@@ -143,9 +143,9 @@
// style anyway. Other copies are transient, e.g., the state in the GraphicsContext, and
// won't stick around long enough to get you in trouble). Still, this is pretty disgusting,
// and could eventually be rectified by using RefPtrs for Fonts themselves.
- if (!m_fontList)
- m_fontList = FontFallbackList::create();
- m_fontList->invalidate(fontSelector);
+ if (!m_fontFallbackList)
+ m_fontFallbackList = FontFallbackList::create();
+ m_fontFallbackList->invalidate(fontSelector);
}
void Font::drawText(GraphicsContext* context, const TextRun& run, const FloatPoint& point, int from, int to) const
Modified: trunk/Source/WebCore/platform/graphics/Font.h (130081 => 130082)
--- trunk/Source/WebCore/platform/graphics/Font.h 2012-10-01 22:04:56 UTC (rev 130081)
+++ trunk/Source/WebCore/platform/graphics/Font.h 2012-10-01 22:18:28 UTC (rev 130082)
@@ -261,12 +261,12 @@
static String normalizeSpaces(const UChar*, unsigned length);
bool needsTranscoding() const { return m_needsTranscoding; }
- FontFallbackList* fontList() const { return m_fontList.get(); }
+ FontFallbackList* fontList() const { return m_fontFallbackList.get(); }
private:
bool loadingCustomFonts() const
{
- return m_fontList && m_fontList->loadingCustomFonts();
+ return m_fontFallbackList && m_fontFallbackList->loadingCustomFonts();
}
#if PLATFORM(QT)
@@ -274,7 +274,7 @@
#endif
FontDescription m_fontDescription;
- mutable RefPtr<FontFallbackList> m_fontList;
+ mutable RefPtr<FontFallbackList> m_fontFallbackList;
short m_letterSpacing;
short m_wordSpacing;
bool m_isPlatformFont;
@@ -287,25 +287,25 @@
inline const SimpleFontData* Font::primaryFont() const
{
- ASSERT(m_fontList);
- return m_fontList->primarySimpleFontData(this);
+ ASSERT(m_fontFallbackList);
+ return m_fontFallbackList->primarySimpleFontData(this);
}
inline const FontData* Font::fontDataAt(unsigned index) const
{
- ASSERT(m_fontList);
- return m_fontList->fontDataAt(this, index);
+ ASSERT(m_fontFallbackList);
+ return m_fontFallbackList->fontDataAt(this, index);
}
inline bool Font::isFixedPitch() const
{
- ASSERT(m_fontList);
- return m_fontList->isFixedPitch(this);
+ ASSERT(m_fontFallbackList);
+ return m_fontFallbackList->isFixedPitch(this);
}
inline FontSelector* Font::fontSelector() const
{
- return m_fontList ? m_fontList->fontSelector() : 0;
+ return m_fontFallbackList ? m_fontFallbackList->fontSelector() : 0;
}
inline float Font::tabWidth(const SimpleFontData& fontData, unsigned tabSize, float position) const
Modified: trunk/Source/WebCore/platform/graphics/FontFastPath.cpp (130081 => 130082)
--- trunk/Source/WebCore/platform/graphics/FontFastPath.cpp 2012-10-01 22:04:56 UTC (rev 130081)
+++ trunk/Source/WebCore/platform/graphics/FontFastPath.cpp 2012-10-01 22:18:28 UTC (rev 130082)
@@ -68,13 +68,13 @@
unsigned pageNumber = (c / GlyphPage::size);
- GlyphPageTreeNode* node = pageNumber ? m_fontList->m_pages.get(pageNumber) : m_fontList->m_pageZero;
+ GlyphPageTreeNode* node = pageNumber ? m_fontFallbackList->m_pages.get(pageNumber) : m_fontFallbackList->m_pageZero;
if (!node) {
node = GlyphPageTreeNode::getRootChild(fontDataAt(0), pageNumber);
if (pageNumber)
- m_fontList->m_pages.set(pageNumber, node);
+ m_fontFallbackList->m_pages.set(pageNumber, node);
else
- m_fontList->m_pageZero = node;
+ m_fontFallbackList->m_pageZero = node;
}
GlyphPage* page = 0;
@@ -139,9 +139,9 @@
// Proceed with the fallback list.
node = node->getChild(fontDataAt(node->level()), pageNumber);
if (pageNumber)
- m_fontList->m_pages.set(pageNumber, node);
+ m_fontFallbackList->m_pages.set(pageNumber, node);
else
- m_fontList->m_pageZero = node;
+ m_fontFallbackList->m_pageZero = node;
}
}
if (variant != NormalVariant) {
@@ -176,9 +176,9 @@
// Proceed with the fallback list.
node = node->getChild(fontDataAt(node->level()), pageNumber);
if (pageNumber)
- m_fontList->m_pages.set(pageNumber, node);
+ m_fontFallbackList->m_pages.set(pageNumber, node);
else
- m_fontList->m_pageZero = node;
+ m_fontFallbackList->m_pageZero = node;
}
}