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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutObject.cpp

Issue 2271883002: Fix paint invalidation and painting for composited-scrolling input elements. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: none Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2009 Google Inc. All rights reserved. 7 * Copyright (C) 2009 Google Inc. All rights reserved.
8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 1100 matching lines...) Expand 10 before | Expand all | Expand 10 after
1111 // Non-composited scrolling should be included in the bounds of scrolled ite ms. Since mapToVisualRectInAncestorSpace does not include 1111 // Non-composited scrolling should be included in the bounds of scrolled ite ms. Since mapToVisualRectInAncestorSpace does not include
1112 // scrolling of the ancestor, we need to add it back in after. 1112 // scrolling of the ancestor, we need to add it back in after.
1113 if (paintInvalidationContainer.isBox() && !paintInvalidationContainer.usesCo mpositedScrolling() && this != &paintInvalidationContainer) { 1113 if (paintInvalidationContainer.isBox() && !paintInvalidationContainer.usesCo mpositedScrolling() && this != &paintInvalidationContainer) {
1114 const LayoutBox* box = toLayoutBox(&paintInvalidationContainer); 1114 const LayoutBox* box = toLayoutBox(&paintInvalidationContainer);
1115 if (box->hasOverflowClip()) 1115 if (box->hasOverflowClip())
1116 return -box->scrolledContentOffset(); 1116 return -box->scrolledContentOffset();
1117 } 1117 }
1118 return IntSize(); 1118 return IntSize();
1119 } 1119 }
1120 1120
1121 void LayoutObject::invalidatePaintRectangle(const LayoutRect& dirtyRect) const 1121 void LayoutObject::invalidatePaintRectangle(const LayoutRect& dirtyRect, Display ItemClient* displayItemClient) const
1122 { 1122 {
1123 ObjectPaintInvalidator(*this).invalidatePaintRectangle(dirtyRect); 1123 ObjectPaintInvalidator(*this).invalidatePaintRectangle(dirtyRect, displayIte mClient);
1124 } 1124 }
1125 1125
1126 void LayoutObject::invalidateTreeIfNeeded(const PaintInvalidationState& paintInv alidationState) 1126 void LayoutObject::invalidateTreeIfNeeded(const PaintInvalidationState& paintInv alidationState)
1127 { 1127 {
1128 ensureIsReadyForPaintInvalidation(); 1128 ensureIsReadyForPaintInvalidation();
1129 1129
1130 // If we didn't need paint invalidation then our children don't need as well . 1130 // If we didn't need paint invalidation then our children don't need as well .
1131 // Skip walking down the tree as everything should be fine below us. 1131 // Skip walking down the tree as everything should be fine below us.
1132 if (!shouldCheckForPaintInvalidation(paintInvalidationState)) 1132 if (!shouldCheckForPaintInvalidation(paintInvalidationState))
1133 return; 1133 return;
(...skipping 2097 matching lines...) Expand 10 before | Expand all | Expand 10 after
3231 const blink::LayoutObject* root = object1; 3231 const blink::LayoutObject* root = object1;
3232 while (root->parent()) 3232 while (root->parent())
3233 root = root->parent(); 3233 root = root->parent();
3234 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); 3234 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0);
3235 } else { 3235 } else {
3236 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); 3236 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)");
3237 } 3237 }
3238 } 3238 }
3239 3239
3240 #endif 3240 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutObject.h ('k') | third_party/WebKit/Source/core/paint/BlockPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698