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

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

Issue 1536663004: Need to repaint its ::first-line background when a block moves. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Two tests even need manual rebaseline, since they already existed in TestExpectations. Created 5 years 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/layout/LayoutBlockFlow.h ('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/layout/LayoutBlockFlowLine.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp b/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp
index 70afd80a4198c4f2b5a63388252fabe4d272baf3..19518e3248b9a1a6fa8b129b10063c72fa4a9de6 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp
@@ -2079,4 +2079,19 @@ void LayoutBlockFlow::invalidateDisplayItemClientsOfFirstLine()
firstRootBox->invalidateDisplayItemClientsRecursively();
}
+PaintInvalidationReason LayoutBlockFlow::invalidatePaintIfNeeded(PaintInvalidationState& paintInvalidationState, const LayoutBoxModelObject& paintInvalidationContainer)
+{
+ PaintInvalidationReason reason = LayoutBlock::invalidatePaintIfNeeded(paintInvalidationState, paintInvalidationContainer);
+ if (reason == PaintInvalidationNone)
+ return reason;
+ RootInlineBox* line = firstRootBox();
+ if (!line || !line->isFirstLineStyle())
+ return reason;
+ // It's the RootInlineBox that paints the ::first-line background. Note that since it may be
+ // expensive to figure out if the first line is affected by any ::first-line selectors at all,
+ // we just invalidate it unconditionally, since that's typically cheaper.
+ invalidateDisplayItemClient(*line);
+ return reason;
+}
+
}
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBlockFlow.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698