Title: [252776] trunk/Source/WebCore
- Revision
- 252776
- Author
- [email protected]
- Date
- 2019-11-22 08:37:12 -0800 (Fri, 22 Nov 2019)
Log Message
[LFC][IFC] Line::inlineItemContentHeight should only call FormattingContext::geometryForBox when needed
https://bugs.webkit.org/show_bug.cgi?id=204516
<rdar://problem/57429153>
Reviewed by Antti Koivisto.
Line::inlineItemContentHeight is hot and geometryForBox() is a hash lookup. Let's not call it unless we need to.
* layout/inlineformatting/InlineLine.cpp:
(WebCore::Layout::Line::inlineItemContentHeight const):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (252775 => 252776)
--- trunk/Source/WebCore/ChangeLog 2019-11-22 15:28:21 UTC (rev 252775)
+++ trunk/Source/WebCore/ChangeLog 2019-11-22 16:37:12 UTC (rev 252776)
@@ -1,3 +1,16 @@
+2019-11-22 Zalan Bujtas <[email protected]>
+
+ [LFC][IFC] Line::inlineItemContentHeight should only call FormattingContext::geometryForBox when needed
+ https://bugs.webkit.org/show_bug.cgi?id=204516
+ <rdar://problem/57429153>
+
+ Reviewed by Antti Koivisto.
+
+ Line::inlineItemContentHeight is hot and geometryForBox() is a hash lookup. Let's not call it unless we need to.
+
+ * layout/inlineformatting/InlineLine.cpp:
+ (WebCore::Layout::Line::inlineItemContentHeight const):
+
2019-11-22 Carlos Garcia Campos <[email protected]>
File input should fire an 'input' event before the 'change' event
Modified: trunk/Source/WebCore/layout/inlineformatting/InlineLine.cpp (252775 => 252776)
--- trunk/Source/WebCore/layout/inlineformatting/InlineLine.cpp 2019-11-22 15:28:21 UTC (rev 252775)
+++ trunk/Source/WebCore/layout/inlineformatting/InlineLine.cpp 2019-11-22 16:37:12 UTC (rev 252776)
@@ -692,15 +692,14 @@
if (inlineItem.isForcedLineBreak() || is<InlineTextItem>(inlineItem))
return fontMetrics.height();
+ if (inlineItem.isContainerStart() || inlineItem.isContainerEnd())
+ return fontMetrics.height();
+
auto& layoutBox = inlineItem.layoutBox();
auto& boxGeometry = formattingContext().geometryForBox(layoutBox);
-
if (layoutBox.replaced() || layoutBox.isFloatingPositioned())
return boxGeometry.contentBoxHeight();
- if (inlineItem.isContainerStart() || inlineItem.isContainerEnd())
- return fontMetrics.height();
-
// Non-replaced inline box (e.g. inline-block). It looks a bit misleading but their margin box is considered the content height here.
return boxGeometry.marginBoxHeight();
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes