Changeset 252776 in webkit
- Timestamp:
- Nov 22, 2019, 8:37:12 AM (7 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
layout/inlineformatting/InlineLine.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r252768 r252776 1 2019-11-22 Zalan Bujtas <zalan@apple.com> 2 3 [LFC][IFC] Line::inlineItemContentHeight should only call FormattingContext::geometryForBox when needed 4 https://bugs.webkit.org/show_bug.cgi?id=204516 5 <rdar://problem/57429153> 6 7 Reviewed by Antti Koivisto. 8 9 Line::inlineItemContentHeight is hot and geometryForBox() is a hash lookup. Let's not call it unless we need to. 10 11 * layout/inlineformatting/InlineLine.cpp: 12 (WebCore::Layout::Line::inlineItemContentHeight const): 13 1 14 2019-11-22 Carlos Garcia Campos <cgarcia@igalia.com> 2 15 -
trunk/Source/WebCore/layout/inlineformatting/InlineLine.cpp
r252750 r252776 693 693 return fontMetrics.height(); 694 694 695 if (inlineItem.isContainerStart() || inlineItem.isContainerEnd()) 696 return fontMetrics.height(); 697 695 698 auto& layoutBox = inlineItem.layoutBox(); 696 699 auto& boxGeometry = formattingContext().geometryForBox(layoutBox); 697 698 700 if (layoutBox.replaced() || layoutBox.isFloatingPositioned()) 699 701 return boxGeometry.contentBoxHeight(); 700 701 if (inlineItem.isContainerStart() || inlineItem.isContainerEnd())702 return fontMetrics.height();703 702 704 703 // Non-replaced inline box (e.g. inline-block). It looks a bit misleading but their margin box is considered the content height here.
Note:
See TracChangeset
for help on using the changeset viewer.