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

Unified Diff: third_party/WebKit/Source/core/style/ComputedStyle.cpp

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
Index: third_party/WebKit/Source/core/style/ComputedStyle.cpp
diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.cpp b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
index bc38abc13cb784e065807157793231de423cbf34..60b10b21eafceb1e646e8b403750898d03b61cd6 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.cpp
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
@@ -572,6 +572,8 @@ StyleDifference ComputedStyle::visualInvalidationDiff(
diff.setNeedsPaintInvalidationSubtree();
else if (diffNeedsPaintInvalidationObject(other))
diff.setNeedsPaintInvalidationObject();
+ else if (diffNeedsPaintInvalidationSelection(other))
+ diff.setNeedsPaintInvalidationSelection();
updatePropertySpecificDifferences(other, diff);
@@ -1020,6 +1022,12 @@ bool ComputedStyle::diffNeedsPaintInvalidationObjectForPaintImage(
return false;
}
+bool ComputedStyle::diffNeedsPaintInvalidationSelection(
+ const ComputedStyle& other) const {
+ return hasPseudoStyle(PseudoIdSelection) ||
+ other.hasPseudoStyle(PseudoIdSelection);
+}
+
void ComputedStyle::updatePropertySpecificDifferences(
const ComputedStyle& other,
StyleDifference& diff) const {
« no previous file with comments | « third_party/WebKit/Source/core/style/ComputedStyle.h ('k') | third_party/WebKit/Source/core/style/StyleDifference.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698