Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(271)

Unified Diff: third_party/WebKit/Source/web/WebViewImpl.cpp

Issue 1526093006: Fix paint code so that overlays and views paint their own layers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/web/WebViewImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebViewImpl.cpp b/third_party/WebKit/Source/web/WebViewImpl.cpp
index a5687517f2e0daa9c972ba5539308f73ae1df632..7cb058f8e2577d120a95bc3d5cc8ef1bdfd4d4fd 100644
--- a/third_party/WebKit/Source/web/WebViewImpl.cpp
+++ b/third_party/WebKit/Source/web/WebViewImpl.cpp
@@ -1998,20 +1998,25 @@ void WebViewImpl::updateAllLifecyclePhases()
if (!mainFrameImpl())
return;
- if (RuntimeEnabledFeatures::slimmingPaintSynchronizedPaintingEnabled())
- PageWidgetDelegate::updateLifecycleToCompositingCleanPlusScrolling(*m_page, *mainFrameImpl()->frame());
- else
- PageWidgetDelegate::updateAllLifecyclePhases(*m_page, *mainFrameImpl()->frame());
-
updateLayerTreeBackgroundColor();
- // TODO(wangxianzhu): Refactor overlay and link highlights updating and painting to make clearer
- // dependency between web/ and core/ in synchronized painting mode.
- if (InspectorOverlay* overlay = inspectorOverlay())
- overlay->layout();
for (size_t i = 0; i < m_linkHighlights.size(); ++i)
m_linkHighlights[i]->updateGeometry();
+ PageWidgetDelegate::updateAllLifecyclePhases(*m_page, *mainFrameImpl()->frame());
+
+ if (RuntimeEnabledFeatures::slimmingPaintSynchronizedPaintingEnabled()) {
wkorman 2015/12/16 23:29:54 Do things still work the old way with this flag of
Xianzhu 2015/12/16 23:45:39 There are still several regressions. Keeping the o
chrishtr 2015/12/16 23:51:32 I think so yes. I'll do some quick manual testing.
+ if (InspectorOverlay* overlay = inspectorOverlay()) {
+ overlay->updateAllLifecyclePhases();
+ // TODO(chrishtr): integrate paint into the overlay's lifecycle.
+ if (overlay->pageOverlay() && overlay->pageOverlay()->graphicsLayer())
+ overlay->pageOverlay()->graphicsLayer()->paint(nullptr);
+ }
+ if (m_pageColorOverlay)
+ m_pageColorOverlay->graphicsLayer()->paint(nullptr);
+
wkorman 2015/12/16 23:29:54 -1 blank
chrishtr 2015/12/16 23:51:33 Fixed.
+ }
+
if (FrameView* view = mainFrameImpl()->frameView()) {
LocalFrame* frame = mainFrameImpl()->frame();
@@ -2032,10 +2037,6 @@ void WebViewImpl::updateAllLifecyclePhases()
client()->didMeaningfulLayout(WebMeaningfulLayout::FinishedLoading);
}
}
-
- // TODO(wangxianzhu): Avoid traversing frame tree for phases (style, layout, etc.) that we are sure no need to update.
- if (RuntimeEnabledFeatures::slimmingPaintSynchronizedPaintingEnabled())
- PageWidgetDelegate::updateAllLifecyclePhases(*m_page, *mainFrameImpl()->frame());
}
void WebViewImpl::paint(WebCanvas* canvas, const WebRect& rect)

Powered by Google App Engine
This is Rietveld 408576698