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

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

Issue 2732113002: Move ::selection invalidation to applyPseudoStyleChanges. (Closed)
Patch Set: Rebased Created 3 years, 9 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 | third_party/WebKit/Source/core/style/ComputedStyle.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 f9660903f4b0737c6183822d5baf5c0f4d9d1f0c..d62eab76425595a0e172f6c538666b4162abbc8c 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
@@ -1733,8 +1733,6 @@ void LayoutObject::setStyle(PassRefPtr<ComputedStyle> style) {
else if (diff.needsPaintInvalidationObject() ||
updatedDiff.needsPaintInvalidationObject())
setShouldDoFullPaintInvalidation();
- else if (diff.needsPaintInvalidationSelection())
- invalidatePaintForSelection();
// Text nodes share style with their parents but the paint properties don't
// apply to them, hence the !isText() check.
@@ -1940,10 +1938,9 @@ void LayoutObject::applyPseudoStyleChanges(const ComputedStyle& oldStyle) {
styleRef().hasPseudoStyle(PseudoIdFirstLine))
applyFirstLineChanges(oldStyle);
- // TODO(rune@opera.com): Move the invalidation for ::selection here.
- // Instead of having a PaintInvalidationSelectionOnly PaintInvalidationType
- // used for the element diff, we should use PaintInvalidationObject diff on
- // the pseudo element style here instead.
+ if (oldStyle.hasPseudoStyle(PseudoIdSelection) ||
+ styleRef().hasPseudoStyle(PseudoIdSelection))
+ invalidatePaintForSelection();
}
void LayoutObject::applyFirstLineChanges(const ComputedStyle& oldStyle) {
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/style/ComputedStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698