Changeset 252530 in webkit
- Timestamp:
- Nov 17, 2019 12:01:33 PM (4 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r252528 r252530 1 2019-11-17 Zalan Bujtas <zalan@apple.com> 2 3 [LFC][IFC] Optimize Line::isVisuallyEmpty for the most common inline content. 4 https://bugs.webkit.org/show_bug.cgi?id=204259 5 <rdar://problem/57243610> 6 7 Reviewed by Antti Koivisto. 8 9 Move the check on text content to the front. 10 11 * layout/inlineformatting/InlineLine.cpp: 12 (WebCore::Layout::Line::isVisuallyEmpty const): 13 1 14 2019-11-16 Wenson Hsieh <wenson_hsieh@apple.com> 2 15 -
trunk/Source/WebCore/layout/inlineformatting/InlineLine.cpp
r252322 r252530 51 51 bool isContainerStart() const { return m_inlineItem.isContainerStart(); } 52 52 bool isContainerEnd() const { return m_inlineItem.isContainerEnd(); } 53 bool isForcedLineBreak() const { return m_inlineItem.isForcedLineBreak(); } 53 54 InlineItem::Type type() const { return m_inlineItem.type(); } 54 55 … … 194 195 auto& formattingContext = this->formattingContext(); 195 196 for (auto& run : m_inlineItemRuns) { 197 if (run->isText()) { 198 if (!run->isCollapsedToZeroAdvanceWidth()) 199 return false; 200 continue; 201 } 196 202 if (run->isContainerStart()) { 197 203 if (!isInlineContainerConsideredEmpty(formattingContext, run->layoutBox())) … … 201 207 if (run->isContainerEnd()) 202 208 continue; 203 if (run->layoutBox().establishesFormattingContext()) { 209 if (run->isBox()) { 210 if (!run->layoutBox().establishesFormattingContext()) 211 return false; 204 212 ASSERT(run->layoutBox().isInlineBlockBox()); 205 213 auto& boxGeometry = formattingContext.geometryForBox(run->layoutBox()); … … 210 218 continue; 211 219 } 212 if ( !run->isText() || !run->isCollapsedToZeroAdvanceWidth())220 if (run->isForcedLineBreak()) 213 221 return false; 214 222 }
Note: See TracChangeset
for help on using the changeset viewer.