Changeset 255071 in webkit
- Timestamp:
- Jan 24, 2020 7:26:24 AM (4 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r255070 r255071 1 2020-01-24 Antti Koivisto <antti@apple.com> 2 3 [LFC][Integration] Clear inline item caches on low memory notification 4 https://bugs.webkit.org/show_bug.cgi?id=206740 5 <rdar://problem/58773905> 6 7 Reviewed by Zalan Bujtas. 8 9 Clear inline item caches on low memory notification. 10 11 * layout/inlineformatting/InlineFormattingState.h: 12 * layout/integration/LayoutIntegrationLineLayout.cpp: 13 (WebCore::LayoutIntegration::LineLayout::releaseCaches): 14 (WebCore::LayoutIntegration::LineLayout::releaseInlineItemCache): 15 * layout/integration/LayoutIntegrationLineLayout.h: 16 17 Remove inline capacity. It is rarely optimal and we can afford the heap allocation. 18 19 * page/MemoryRelease.cpp: 20 (WebCore::releaseNoncriticalMemory): 21 1 22 2020-01-24 Adrian Perez de Castro <aperez@igalia.com> 2 23 -
trunk/Source/WebCore/layout/inlineformatting/InlineFormattingState.h
r254808 r255071 36 36 namespace Layout { 37 37 38 using InlineItems = Vector<InlineItem , 30>;38 using InlineItems = Vector<InlineItem>; 39 39 40 40 // InlineFormattingState holds the state for a particular inline formatting context tree. -
trunk/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.cpp
r255068 r255071 42 42 #include "RenderBlockFlow.h" 43 43 #include "RenderChildIterator.h" 44 #include "RenderDescendantIterator.h" 44 45 #include "RenderLineBreak.h" 46 #include "RenderView.h" 45 47 #include "RuntimeEnabledFeatures.h" 46 48 #include "Settings.h" … … 330 332 } 331 333 334 void LineLayout::releaseCaches(RenderView& view) 335 { 336 if (!RuntimeEnabledFeatures::sharedFeatures().layoutFormattingContextIntegrationEnabled()) 337 return; 338 339 for (auto& renderer : descendantsOfType<RenderBlockFlow>(view)) { 340 if (auto* lineLayout = renderer.layoutFormattingContextLineLayout()) 341 lineLayout->releaseInlineItemCache(); 342 } 343 } 344 345 void LineLayout::releaseInlineItemCache() 346 { 347 m_inlineFormattingState.inlineItems().clear(); 348 } 349 350 332 351 } 333 352 } -
trunk/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.h
r254853 r255071 81 81 LineLayoutTraversal::ElementBoxIterator elementBoxFor(const RenderLineBreak&) const; 82 82 83 static void releaseCaches(RenderView&); 84 83 85 private: 84 86 const Layout::Container& rootLayoutBox() const; 85 87 Layout::Container& rootLayoutBox(); 86 88 ShadowData* debugTextShadow(); 89 void releaseInlineItemCache(); 87 90 88 91 const RenderBlockFlow& m_flow; -
trunk/Source/WebCore/page/MemoryRelease.cpp
r251220 r255071 41 41 #include "InlineStyleSheetOwner.h" 42 42 #include "InspectorInstrumentation.h" 43 #include "LayoutIntegrationLineLayout.h" 43 44 #include "Logging.h" 44 45 #include "MemoryCache.h" … … 69 70 TextPainter::clearGlyphDisplayLists(); 70 71 71 for (auto* document : Document::allDocuments()) 72 for (auto* document : Document::allDocuments()) { 72 73 document->clearSelectorQueryCache(); 74 75 #if ENABLE(LAYOUT_FORMATTING_CONTEXT) 76 if (auto* renderView = document->renderView()) 77 LayoutIntegration::LineLayout::releaseCaches(*renderView); 78 #endif 79 } 73 80 74 81 if (maintainMemoryCache == MaintainMemoryCache::No)
Note: See TracChangeset
for help on using the changeset viewer.