Index: Source/core/rendering/RenderText.cpp |
diff --git a/Source/core/rendering/RenderText.cpp b/Source/core/rendering/RenderText.cpp |
old mode 100644 |
new mode 100755 |
index b89ddc756ba895becf08f1e0450384710bd4f2af..7d84cbe34c102b97007e559896cb6d0b1656b1c7 |
--- a/Source/core/rendering/RenderText.cpp |
+++ b/Source/core/rendering/RenderText.cpp |
@@ -56,6 +56,7 @@ struct SameSizeAsRenderText : public RenderObject { |
float widths[4]; |
String text; |
void* pointers[2]; |
+ CodePath someCodePath; |
eseidel
2013/12/27 04:36:45
nit: I would have called this "codePath".
|
}; |
COMPILE_ASSERT(sizeof(RenderText) == sizeof(SameSizeAsRenderText), RenderText_should_stay_small); |
@@ -767,6 +768,7 @@ ALWAYS_INLINE float RenderText::widthFromCache(const Font& f, int start, int len |
run.setCharacterScanForCodePath(!canUseSimpleFontCodePath()); |
run.setTabSize(!style()->collapseWhiteSpace(), style()->tabSize()); |
run.setXPos(xPos); |
+ |
return f.width(run, fallbackFonts, glyphOverflow); |
} |
@@ -1805,11 +1807,13 @@ int RenderText::nextOffset(int current) const |
return result; |
} |
-bool RenderText::computeCanUseSimpleFontCodePath() const |
+bool RenderText::computeCanUseSimpleFontCodePath() |
eseidel
2013/12/27 04:36:45
We could also just have made codepath mutable. Unc
|
{ |
eae
2013/12/30 19:29:14
This method didn't use to have a side effect and n
h.joshi
2013/12/31 06:07:43
This method is always called when RenderText is cr
|
+ m_textCodePath = AutoPath; |
if (isAllASCII() || m_text.is8Bit()) |
return true; |
- return Font::characterRangeCodePath(characters16(), length()) == Font::Simple; |
+ m_textCodePath = Font::characterRangeCodePath(characters16(), length()); |
+ return (m_textCodePath == SimplePath); |
} |
#ifndef NDEBUG |