Changeset 254568 in webkit
- Timestamp:
- Jan 15, 2020, 7:46:09 AM (7 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
-
ChangeLog (modified) (1 diff)
-
layout/integration/LayoutIntegrationLineLayout.cpp (modified) (2 diffs)
-
layout/integration/LayoutIntegrationLineLayout.h (modified) (1 diff)
-
rendering/RenderBlockFlow.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r254567 r254568 1 2020-01-15 Antti Koivisto <antti@apple.com> 2 3 [LFC][Integration] Call SimpleLineLayout::canUseFor only once 4 https://bugs.webkit.org/show_bug.cgi?id=206281 5 6 Reviewed by Sam Weinig. 7 8 It can be somewhat costly. 9 10 * layout/integration/LayoutIntegrationLineLayout.cpp: 11 (WebCore::LayoutIntegration::LineLayout::canUseFor): 12 * layout/integration/LayoutIntegrationLineLayout.h: 13 (WebCore::LayoutIntegration::LineLayout::canUseFor): 14 * rendering/RenderBlockFlow.cpp: 15 (WebCore::RenderBlockFlow::layoutInlineChildren): 16 1 17 2020-01-15 Carlos Alberto Lopez Perez <clopez@igalia.com> 2 18 -
trunk/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.cpp
r254378 r254568 59 59 LineLayout::~LineLayout() = default; 60 60 61 bool LineLayout::canUseFor(const RenderBlockFlow& flow )61 bool LineLayout::canUseFor(const RenderBlockFlow& flow, Optional<bool> couldUseSimpleLineLayout) 62 62 { 63 63 if (!RuntimeEnabledFeatures::sharedFeatures().layoutFormattingContextIntegrationEnabled()) … … 65 65 66 66 // Initially only a subset of SLL features is supported. 67 if (!SimpleLineLayout::canUseFor(flow)) 67 auto passesSimpleLineLayoutTest = valueOrCompute(couldUseSimpleLineLayout, [&] { 68 return SimpleLineLayout::canUseFor(flow); 69 }); 70 71 if (!passesSimpleLineLayoutTest) 68 72 return false; 69 73 -
trunk/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.h
r254378 r254568 59 59 ~LineLayout(); 60 60 61 static bool canUseFor(const RenderBlockFlow& );61 static bool canUseFor(const RenderBlockFlow&, Optional<bool> couldUseSimpleLineLayout = { }); 62 62 63 63 void updateStyle(); -
trunk/Source/WebCore/rendering/RenderBlockFlow.cpp
r254378 r254568 670 670 { 671 671 auto computeLineLayoutPath = [&] { 672 bool canUseSimpleLines = SimpleLineLayout::canUseFor(*this); 672 673 #if ENABLE(LAYOUT_FORMATTING_CONTEXT) 673 if (LayoutIntegration::LineLayout::canUseFor(*this ))674 if (LayoutIntegration::LineLayout::canUseFor(*this, canUseSimpleLines)) 674 675 return LayoutFormattingContextPath; 675 676 #endif 676 if ( SimpleLineLayout::canUseFor(*this))677 if (canUseSimpleLines) 677 678 return SimpleLinesPath; 679 678 680 return LineBoxesPath; 679 681 };
Note:
See TracChangeset
for help on using the changeset viewer.