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

Unified Diff: third_party/WebKit/Source/core/frame/FrameView.cpp

Issue 2692233004: Invalidate FrameView paint properties on frame rect change only when necessary (Closed)
Patch Set: - Created 3 years, 10 months 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 49b8405a80234f1ff2ac828e0c81de937bfd7fbf..41e16c7cfde3ebf7889c1b946735501223db3863 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -542,6 +542,13 @@ void FrameView::setFrameRect(const IntRect& newRect) {
updateParentScrollableAreaSet();
+ if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled() &&
+ !RuntimeEnabledFeatures::rootLayerScrollingEnabled()) {
+ // The overflow clip property depends on the frame size and the pre
+ // translation property depends on the frame location.
+ setNeedsPaintPropertyUpdate();
+ }
+
if (frameSizeChanged) {
viewportSizeChanged(newRect.width() != oldRect.width(),
newRect.height() != oldRect.height());
@@ -3776,11 +3783,6 @@ void FrameView::frameRectsChanged() {
if (layoutSizeFixedToFrameSize())
setLayoutSizeInternal(frameRect().size());
- if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) {
- // The overflow clip property depends on the frame rect.
- setNeedsPaintPropertyUpdate();
- }
-
for (const auto& child : m_children)
child->frameRectsChanged();
}
@@ -4281,6 +4283,12 @@ void FrameView::scrollContents(const IntSize& scrollDelta) {
if (!scrollContentsFastPath(-scrollDelta))
scrollContentsSlowPath();
+ if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled() &&
+ !RuntimeEnabledFeatures::rootLayerScrollingEnabled()) {
+ // Need to update scroll translation property.
+ setNeedsPaintPropertyUpdate();
+ }
+
// This call will move children with native widgets (plugins) and invalidate
// them as well.
frameRectsChanged();
@@ -4633,7 +4641,8 @@ void FrameView::show() {
scrollingCoordinator->frameViewVisibilityDidChange();
setNeedsCompositingUpdate(layoutViewItem(), CompositingUpdateRebuildTree);
updateParentScrollableAreaSet();
- if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) {
+ if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled() &&
+ !RuntimeEnabledFeatures::rootLayerScrollingEnabled()) {
// The existance of scrolling properties depends on visibility through
// isScrollable() so ensure properties are updated if visibility changes.
setNeedsPaintPropertyUpdate();
@@ -4659,7 +4668,8 @@ void FrameView::hide() {
scrollingCoordinator->frameViewVisibilityDidChange();
setNeedsCompositingUpdate(layoutViewItem(), CompositingUpdateRebuildTree);
updateParentScrollableAreaSet();
- if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) {
+ if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled() &&
+ !RuntimeEnabledFeatures::rootLayerScrollingEnabled()) {
// The existance of scrolling properties depends on visibility through
// isScrollable() so ensure properties are updated if visibility changes.
setNeedsPaintPropertyUpdate();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698