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

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

Issue 1964083002: Move invalidateDisplayItemClients() override into LayoutBlockFlow and eat the static helper. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/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/LayoutBlockFlow.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp b/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp
index 1f11e9809007648f8021300f03ebf495772820d2..e024ccc5af6948c48ab64160fce998dc246ae4ed 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp
@@ -2362,6 +2362,29 @@ void LayoutBlockFlow::invalidatePaintForOverflow()
m_paintInvalidationLogicalBottom = LayoutUnit();
}
+void LayoutBlockFlow::invalidateDisplayItemClients(const LayoutBoxModelObject& paintInvalidationContainer, PaintInvalidationReason invalidationReason) const
+{
+ LayoutBlock::invalidateDisplayItemClients(paintInvalidationContainer, invalidationReason);
+
+ // If the block is a continuation or containing block of an inline continuation, invalidate the
+ // start object of the continuations if it has focus ring because change of continuation may change
+ // the shape of the focus ring.
+ if (!isAnonymous())
+ return;
+
+ LayoutObject* startOfContinuations = nullptr;
+ if (LayoutInline* inlineElementContinuation = this->inlineElementContinuation()) {
+ // This block is an anonymous block continuation.
+ startOfContinuations = inlineElementContinuation->node()->layoutObject();
+ } else if (LayoutObject* firstChild = this->firstChild()) {
+ // This block is the anonymous containing block of an inline element continuation.
+ if (firstChild->isElementContinuation())
+ startOfContinuations = firstChild->node()->layoutObject();
+ }
+ if (startOfContinuations && startOfContinuations->styleRef().outlineStyleIsAuto())
+ startOfContinuations->invalidateDisplayItemClient(*startOfContinuations);
+}
+
void LayoutBlockFlow::paintFloats(const PaintInfo& paintInfo, const LayoutPoint& paintOffset) const
{
BlockFlowPainter(*this).paintFloats(paintInfo, paintOffset);
« 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