Changeset 240539 in webkit
- Timestamp:
- Jan 25, 2019 7:38:57 PM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r240537 r240539 1 2019-01-25 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 Document::updateMainArticleElementAfterLayout() should be a no-op when no client depends on knowing the main article element 4 https://bugs.webkit.org/show_bug.cgi?id=193843 5 6 Reviewed by Zalan Bujtas. 7 8 * dom/Document.cpp: 9 (WebCore::Document::updateMainArticleElementAfterLayout): 10 11 This function currently does a bit of wasted work after every layout, on clients that don't listen to the 12 "significant rendered text" layout milestone and therefore don't need to guess the main article element. Simply 13 don't bother keeping the main article element up to date in this scenario by bailing from 14 FrameView::updateHasReachedSignificantRenderedTextThreshold if the client doesn't care about the significant 15 rendered text milestone. 16 17 * page/FrameView.cpp: 18 (WebCore::FrameView::updateHasReachedSignificantRenderedTextThreshold): 19 1 20 2019-01-25 Jer Noble <jer.noble@apple.com> 2 21 -
trunk/Source/WebCore/dom/Document.cpp
r240315 r240539 8374 8374 void Document::updateMainArticleElementAfterLayout() 8375 8375 { 8376 ASSERT(page() && page()->requestedLayoutMilestones().contains(DidRenderSignificantAmountOfText)); 8377 8376 8378 // If there are too many article elements on the page, don't consider any one of them to be "main content". 8377 8379 const unsigned maxNumberOfArticlesBeforeIgnoringMainContentArticle = 10; -
trunk/Source/WebCore/page/FrameView.cpp
r240519 r240539 4419 4419 return; 4420 4420 4421 auto* page = frame().page(); 4422 if (!page || !page->requestedLayoutMilestones().contains(DidRenderSignificantAmountOfText)) 4423 return; 4424 4421 4425 auto* document = frame().document(); 4422 4426 if (!document)
Note: See TracChangeset
for help on using the changeset viewer.