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

Unified Diff: third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.cpp

Issue 2283183002: Don't adjust scroll for selection if it's already empty. (Closed)
Patch Set: Created 4 years, 4 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/paint/ObjectPaintInvalidator.cpp
diff --git a/third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.cpp b/third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.cpp
index 22d4541294d1648509d3c725720542e19a42549e..eeb48ba73fd87a5e111b4e328fbe7850094067f7 100644
--- a/third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.cpp
+++ b/third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.cpp
@@ -419,10 +419,10 @@ void ObjectPaintInvalidatorWithContext::invalidateSelectionIfNeeded(PaintInvalid
LayoutRect oldSelectionRect = selectionPaintInvalidationMap().get(&m_object);
LayoutRect newSelectionRect = m_object.localSelectionRect();
- if (!newSelectionRect.isEmpty())
+ if (!newSelectionRect.isEmpty()) {
m_context.mapLocalRectToPaintInvalidationBacking(m_object, newSelectionRect);
-
- newSelectionRect.move(m_object.scrollAdjustmentForPaintInvalidation(*m_context.paintInvalidationContainer));
+ newSelectionRect.move(m_object.scrollAdjustmentForPaintInvalidation(*m_context.paintInvalidationContainer));
+ }
setPreviousSelectionPaintInvalidationRect(m_object, newSelectionRect);
« 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