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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutObject.cpp

Issue 2727843004: needsPaintInvalidation() should not return true for selection. (Closed)
Patch Set: Renaming. 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
Index: third_party/WebKit/Source/core/layout/LayoutObject.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.cpp b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
index 6e66dcecbf1827f0aa76ed281430a9a10e05164a..24d0131ae325d01d5b7145bbc8bd1cbb5600983c 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
@@ -1508,7 +1508,8 @@ StyleDifference LayoutObject::adjustStyleDifference(
// Optimization: for decoration/color property changes, invalidation is only
// needed if we have style or text affected by these properties.
- if (diff.textDecorationOrColorChanged() && !diff.needsPaintInvalidation()) {
+ if (diff.textDecorationOrColorChanged() &&
+ !diff.needsFullPaintInvalidation()) {
if (style()->hasBorder() || style()->hasOutline() ||
style()->hasBackgroundRelatedColorReferencingCurrentColor() ||
// Skip any text nodes that do not contain text boxes. Whitespace cannot
@@ -1564,7 +1565,8 @@ void LayoutObject::firstLineStyleDidChange(const ComputedStyle& oldStyle,
const ComputedStyle& newStyle) {
StyleDifference diff = oldStyle.visualInvalidationDiff(newStyle);
- if (diff.needsPaintInvalidation() || diff.textDecorationOrColorChanged()) {
+ if (diff.needsFullPaintInvalidation() ||
+ diff.textDecorationOrColorChanged()) {
// We need to invalidate all inline boxes in the first line, because they
// need to be repainted with the new style, e.g. background, font style,
// etc.
@@ -1903,7 +1905,7 @@ void LayoutObject::styleDidChange(StyleDifference diff,
}
}
- if (diff.needsPaintInvalidation() && oldStyle) {
+ if (diff.needsFullPaintInvalidation() && oldStyle) {
if (resolveColor(*oldStyle, CSSPropertyBackgroundColor) !=
resolveColor(CSSPropertyBackgroundColor) ||
oldStyle->backgroundLayers() != styleRef().backgroundLayers())
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBox.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutScrollbarPart.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698