Changeset 158012 in webkit
- Timestamp:
- Oct 25, 2013, 8:58:24 AM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r158011 r158012 1 2013-10-25 Antti Koivisto <antti@apple.com> 2 3 Faster way for simple line layout to check if text has fallback fonts 4 https://bugs.webkit.org/show_bug.cgi?id=123342 5 6 Reviewed by Andreas Kling. 7 8 Don't use RenderText::knownToHaveNoOverflowAndNoFallbackFonts as it is slow. 9 10 Simple text code path test already guarantees there is no overflow. Test for fallback 11 fonts explicitly. 12 13 * platform/graphics/SimpleFontData.h: 14 15 Make FINAL. 16 17 * rendering/RenderText.cpp: 18 * rendering/RenderText.h: 19 20 Remove knownToHaveNoOverflowAndNoFallbackFonts() as it has no clients. 21 22 * rendering/SimpleLineLayout.cpp: 23 (WebCore::SimpleLineLayout::canUseFor): 24 25 Check if all characters can be found from the primary font. 26 1 27 2013-10-25 Andreas Kling <akling@apple.com> 2 28 -
trunk/Source/WebCore/platform/graphics/SimpleFontData.h
r157653 r158012 66 66 enum Pitch { UnknownPitch, FixedPitch, VariablePitch }; 67 67 68 class SimpleFontData : public FontData {68 class SimpleFontData FINAL : public FontData { 69 69 public: 70 70 class AdditionalFontData { -
trunk/Source/WebCore/rendering/RenderText.cpp
r157985 r158012 511 511 } 512 512 513 bool RenderText::knownToHaveNoOverflowAndNoFallbackFonts() const514 {515 if (preferredLogicalWidthsDirty())516 const_cast<RenderText*>(this)->computePreferredLogicalWidths(0);517 518 return m_knownToHaveNoOverflowAndNoFallbackFonts;519 }520 521 513 void RenderText::computePreferredLogicalWidths(float leadWidth) 522 514 { -
trunk/Source/WebCore/rendering/RenderText.h
r157950 r158012 141 141 142 142 bool canUseSimpleFontCodePath() const { return m_canUseSimpleFontCodePath; } 143 bool knownToHaveNoOverflowAndNoFallbackFonts() const;144 143 145 144 void removeAndDestroyTextBoxes(); -
trunk/Source/WebCore/rendering/SimpleLineLayout.cpp
r158007 r158012 149 149 if (style.font().codePath(TextRun(textRenderer.text())) != Font::Simple) 150 150 return false; 151 if (!textRenderer.knownToHaveNoOverflowAndNoFallbackFonts()) 152 return false;151 152 auto primaryFontData = style.font().primaryFont(); 153 153 154 154 unsigned length = textRenderer.textLength(); … … 179 179 return false; 180 180 } 181 if (!primaryFontData->glyphForCharacter(character)) 182 return false; 181 183 } 182 184 return true;
Note:
See TracChangeset
for help on using the changeset viewer.