Changeset 257126 in webkit
- Timestamp:
- Feb 20, 2020 7:40:37 PM (4 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r257125 r257126 1 2020-02-20 Zalan Bujtas <zalan@apple.com> 2 3 [First paint] Let optional style recalcs go through while in visually-non-empty state. 4 https://bugs.webkit.org/show_bug.cgi?id=208020 5 <rdar://problem/59636549> 6 7 Reviewed by Simon Fraser. 8 9 This is the final step to ensure we don't end up delaying the qualifiesAsVisuallyNonEmpty check when 10 the page happens to not trigger synchronous style recalcs. 11 12 Here is the optimized flow: 13 Optional style realc -> FrameView::styleAndRenderTreeDidChange -> qualifiesAsVisuallyNonEmpty -> Document::shouldScheduleLayout true. 14 15 This could be a slight regression in certain cases because now we let the optional style recalcs through and 16 only delay the redundant layouts (as opposed to delay both). 17 18 * dom/Document.cpp: 19 (WebCore::Document::scheduleStyleRecalc): 20 (WebCore::Document::shouldScheduleLayout): 21 1 22 2020-02-20 Eric Carlson <eric.carlson@apple.com> 2 23 -
trunk/Source/WebCore/dom/Document.cpp
r256911 r257126 1873 1873 1874 1874 ASSERT(childNeedsStyleRecalc() || m_needsFullStyleRebuild); 1875 auto shouldThrottleStyleRecalc = [&] { 1876 if (!view() || !view()->isVisuallyNonEmpty()) 1877 return false; 1878 if (!page() || !page()->chrome().client().renderingUpdateThrottlingIsActive()) 1879 return false; 1880 return true; 1881 }; 1882 1883 if (shouldThrottleStyleRecalc()) 1884 return; 1875 if (page() && page()->chrome().client().renderingUpdateThrottlingIsActive()) { 1876 // Do not run optional style recalcs while we throttle painting. 1877 return; 1878 } 1885 1879 1886 1880 m_styleRecalcTimer.startOneShot(0_s); … … 3136 3130 if (styleScope().hasPendingSheetsBeforeBody()) 3137 3131 return false; 3138 if (page() && page()->chrome().client().renderingUpdateThrottlingIsActive() && view() && view()->isVisuallyNonEmpty())3132 if (page() && page()->chrome().client().renderingUpdateThrottlingIsActive()) 3139 3133 return false; 3140 3134 if (view() && !view()->isVisuallyNonEmpty()) 3135 return false; 3141 3136 return true; 3142 3137 }
Note: See TracChangeset
for help on using the changeset viewer.