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

Unified Diff: third_party/WebKit/Source/core/paint/BlockFlowPaintInvalidator.cpp

Issue 2392443009: reflow comments in core/paint (Closed)
Patch Set: Created 4 years, 2 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/paint/BlockFlowPaintInvalidator.cpp
diff --git a/third_party/WebKit/Source/core/paint/BlockFlowPaintInvalidator.cpp b/third_party/WebKit/Source/core/paint/BlockFlowPaintInvalidator.cpp
index 4d240d993aad67007abe1c0314197a558a168931..84fed48255919b79ec7288af193f569b377b34d7 100644
--- a/third_party/WebKit/Source/core/paint/BlockFlowPaintInvalidator.cpp
+++ b/third_party/WebKit/Source/core/paint/BlockFlowPaintInvalidator.cpp
@@ -13,15 +13,16 @@ namespace blink {
void BlockFlowPaintInvalidator::invalidatePaintForOverhangingFloatsInternal(
InvalidateDescendantMode invalidateDescendants) {
- // Invalidate paint of any overhanging floats (if we know we're the one to paint them).
- // Otherwise, bail out.
+ // Invalidate paint of any overhanging floats (if we know we're the one to
+ // paint them). Otherwise, bail out.
if (!m_blockFlow.hasOverhangingFloats())
return;
for (const auto& floatingObject : m_blockFlow.floatingObjects()->set()) {
- // Only issue paint invalidations for the object if it is overhanging, is not in its own layer, and
- // is our responsibility to paint (m_shouldPaint is set). When paintAllDescendants is true, the latter
- // condition is replaced with being a descendant of us.
+ // Only issue paint invalidations for the object if it is overhanging, is
+ // not in its own layer, and is our responsibility to paint (m_shouldPaint
+ // is set). When paintAllDescendants is true, the latter condition is
+ // replaced with being a descendant of us.
if (m_blockFlow.isOverhangingFloat(*floatingObject) &&
!floatingObject->layoutObject()->hasSelfPaintingLayer() &&
(floatingObject->shouldPaint() ||
@@ -43,14 +44,16 @@ void BlockFlowPaintInvalidator::invalidateDisplayItemClients(
objectPaintInvalidator.invalidateDisplayItemClient(m_blockFlow, reason);
// PaintInvalidationRectangle happens when we invalidate the caret.
- // The later conditions don't apply when we invalidate the caret or the selection.
+ // The later conditions don't apply when we invalidate the caret or the
+ // selection.
if (reason == PaintInvalidationRectangle ||
reason == PaintInvalidationSelection)
return;
- // 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 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 (m_blockFlow.isAnonymous()) {
LayoutObject* startOfContinuations = nullptr;
if (LayoutInline* inlineElementContinuation =
@@ -58,7 +61,8 @@ void BlockFlowPaintInvalidator::invalidateDisplayItemClients(
// This block is an anonymous block continuation.
startOfContinuations = inlineElementContinuation->node()->layoutObject();
} else if (LayoutObject* firstChild = m_blockFlow.firstChild()) {
- // This block is the anonymous containing block of an inline element continuation.
+ // This block is the anonymous containing block of an inline element
+ // continuation.
if (firstChild->isElementContinuation())
startOfContinuations = firstChild->node()->layoutObject();
}
@@ -71,15 +75,16 @@ void BlockFlowPaintInvalidator::invalidateDisplayItemClients(
RootInlineBox* line = m_blockFlow.firstRootBox();
if (line && line->isFirstLineStyle()) {
- // 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 which is typically cheaper.
+ // 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
+ // which is typically cheaper.
objectPaintInvalidator.invalidateDisplayItemClient(*line, reason);
}
if (m_blockFlow.multiColumnFlowThread()) {
- // Invalidate child LayoutMultiColumnSets which may need to repaint column rules after
- // m_blockFlow's column rule style and/or layout changed.
+ // Invalidate child LayoutMultiColumnSets which may need to repaint column
+ // rules after m_blockFlow's column rule style and/or layout changed.
for (LayoutObject* child = m_blockFlow.firstChild(); child;
child = child->nextSibling()) {
if (child->isLayoutMultiColumnSet() &&

Powered by Google App Engine
This is Rietveld 408576698