| Index: third_party/WebKit/Source/core/frame/FrameView.cpp
|
| diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp
|
| index 6556ad47ace0066df479fab61b784c305194355b..4372e4a3c42254acddaa7fbbbc83dfcffe800744 100644
|
| --- a/third_party/WebKit/Source/core/frame/FrameView.cpp
|
| +++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
|
| @@ -196,6 +196,7 @@ FrameView::FrameView(LocalFrame& frame)
|
| m_needsScrollbarsUpdate(false),
|
| m_suppressAdjustViewSize(false),
|
| m_allowsLayoutInvalidationAfterLayoutClean(true),
|
| + m_needsOpaquenessUpdate(false),
|
| m_mainThreadScrollingReasons(0),
|
| m_mainThreadScrollingReasonsCounter(
|
| MainThreadScrollingReason::kMainThreadScrollingReasonCount,
|
| @@ -2308,6 +2309,16 @@ Color FrameView::baseBackgroundColor() const {
|
|
|
| void FrameView::setBaseBackgroundColor(const Color& backgroundColor) {
|
| m_baseBackgroundColor = backgroundColor;
|
| + m_needsOpaquenessUpdate = true;
|
| + recalculateScrollbarOverlayColorTheme(documentBackgroundColor());
|
| +
|
| + if (!shouldThrottleRendering())
|
| + page()->animator().scheduleVisualUpdate(m_frame.get());
|
| +}
|
| +
|
| +void FrameView::updateOpaquenessIfNeeded() {
|
| + if (!m_needsOpaquenessUpdate)
|
| + return;
|
|
|
| if (!layoutViewItem().isNull() &&
|
| layoutViewItem().layer()->hasCompositedLayerMapping()) {
|
| @@ -2317,10 +2328,7 @@ void FrameView::setBaseBackgroundColor(const Color& backgroundColor) {
|
| if (compositedLayerMapping->mainGraphicsLayer())
|
| compositedLayerMapping->mainGraphicsLayer()->setNeedsDisplay();
|
| }
|
| - recalculateScrollbarOverlayColorTheme(documentBackgroundColor());
|
| -
|
| - if (!shouldThrottleRendering())
|
| - page()->animator().scheduleVisualUpdate(m_frame.get());
|
| + m_needsOpaquenessUpdate = false;
|
| }
|
|
|
| void FrameView::updateBackgroundRecursively(const Color& backgroundColor,
|
| @@ -2957,6 +2965,8 @@ void FrameView::updateLifecyclePhasesInternal(
|
| });
|
| }
|
|
|
| + updateOpaquenessIfNeeded();
|
| +
|
| scrollContentsIfNeededRecursive();
|
| DCHECK(RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled() ||
|
| lifecycle().state() >= DocumentLifecycle::CompositingClean);
|
|
|