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

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

Issue 2709693003: Repaint selection when element with ::selection style is recalculated. (Closed)
Patch Set: Fixed review issues 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 | « third_party/WebKit/Source/core/style/ComputedStyle.cpp ('k') | 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/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..a646e54bb1e584102df98292b2971d1198e628bc 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() {
+ if (!needsPaintInvalidation())
+ 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;
« no previous file with comments | « third_party/WebKit/Source/core/style/ComputedStyle.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698