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

Unified Diff: third_party/WebKit/Source/core/style/StyleDifference.h

Issue 2709693003: Repaint selection when element with ::selection style is recalculated. (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
Index: third_party/WebKit/Source/core/style/StyleDifference.h
diff --git a/third_party/WebKit/Source/core/style/StyleDifference.h b/third_party/WebKit/Source/core/style/StyleDifference.h
index 3003e61de8437994ee39652c49b2b7d2cf1a50f1..274e5846ee8ae77ce06dfdddffbd52b6c0f05cbb 100644
--- a/third_party/WebKit/Source/core/style/StyleDifference.h
+++ b/third_party/WebKit/Source/core/style/StyleDifference.h
@@ -55,12 +55,21 @@ class StyleDifference {
return m_paintInvalidationType != NoPaintInvalidation;
}
+ // The text selection needs paint invalidation.
+ bool needsPaintInvalidationSelection() const {
+ return m_paintInvalidationType == PaintInvalidationSelection;
+ }
+ void setNeedsPaintInvalidationSelection() {
+ DCHECK(!needsPaintInvalidation());
mstensho (USE GERRIT) 2017/02/21 21:03:54 So, it looks like this one is failing in quite a f
rune 2017/02/21 21:42:00 Yes. This is fragile since it relies on order and
+ m_paintInvalidationType = PaintInvalidationSelection;
+ }
+
// The object just needs to issue paint invalidations.
bool needsPaintInvalidationObject() const {
return m_paintInvalidationType == PaintInvalidationObject;
}
void setNeedsPaintInvalidationObject() {
- ASSERT(!needsPaintInvalidationSubtree());
+ DCHECK(!needsPaintInvalidationSubtree());
m_paintInvalidationType = PaintInvalidationObject;
}
@@ -140,9 +149,10 @@ class StyleDifference {
private:
enum PaintInvalidationType {
- NoPaintInvalidation = 0,
+ NoPaintInvalidation,
+ PaintInvalidationSelection,
PaintInvalidationObject,
- PaintInvalidationSubtree
+ PaintInvalidationSubtree,
};
unsigned m_paintInvalidationType : 2;

Powered by Google App Engine
This is Rietveld 408576698