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

Side by Side Diff: third_party/WebKit/Source/core/paint/BlockFlowPaintInvalidator.cpp

Issue 2240753003: Fix column rule under invalidation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: - Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/paint/invalidation/column-rule-change-expected.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/paint/BlockFlowPaintInvalidator.h" 5 #include "core/paint/BlockFlowPaintInvalidator.h"
6 6
7 #include "core/layout/LayoutBlockFlow.h" 7 #include "core/layout/LayoutBlockFlow.h"
8 #include "core/paint/BoxPaintInvalidator.h" 8 #include "core/paint/BoxPaintInvalidator.h"
9 #include "core/paint/PaintInvalidator.h" 9 #include "core/paint/PaintInvalidator.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 PaintInvalidationReason BlockFlowPaintInvalidator::invalidatePaintIfNeeded() 13 PaintInvalidationReason BlockFlowPaintInvalidator::invalidatePaintIfNeeded()
14 { 14 {
15 PaintInvalidationReason reason = BoxPaintInvalidator(m_blockFlow, m_context) .invalidatePaintIfNeeded(); 15 PaintInvalidationReason reason = BoxPaintInvalidator(m_blockFlow, m_context) .invalidatePaintIfNeeded();
16 16
17 // TODO(wangxianzhu): Refactor the following into invalidateDisplayItemClien ts().
18
17 if (reason == PaintInvalidationNone || reason == PaintInvalidationDelayedFul l) 19 if (reason == PaintInvalidationNone || reason == PaintInvalidationDelayedFul l)
18 return reason; 20 return reason;
19 21
20 RootInlineBox* line = m_blockFlow.firstRootBox(); 22 RootInlineBox* line = m_blockFlow.firstRootBox();
21 if (line && line->isFirstLineStyle()) { 23 if (line && line->isFirstLineStyle()) {
22 // It's the RootInlineBox that paints the ::first-line background. Note that since it may be 24 // It's the RootInlineBox that paints the ::first-line background. Note that since it may be
23 // expensive to figure out if the first line is affected by any ::first- line selectors at all, 25 // expensive to figure out if the first line is affected by any ::first- line selectors at all,
24 // we just invalidate it unconditionally which is typically cheaper. 26 // we just invalidate it unconditionally which is typically cheaper.
25 m_blockFlow.invalidateDisplayItemClient(*line, reason); 27 m_blockFlow.invalidateDisplayItemClient(*line, reason);
26 } 28 }
29
30 if (m_blockFlow.multiColumnFlowThread()) {
31 // Invalidate child LayoutMultiColumnSets which may need to repaint colu mn rules after
32 // m_blockFlow's column rule style and/or layout changed.
33 for (LayoutObject* child = m_blockFlow.firstChild(); child; child = chil d->nextSibling()) {
34 if (child->isLayoutMultiColumnSet() && !child->shouldDoFullPaintInva lidation())
35 m_blockFlow.invalidateDisplayItemClient(*child, reason);
36 }
37 }
38
27 return reason; 39 return reason;
28 } 40 }
29 41
30 } // namespace blink 42 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/paint/invalidation/column-rule-change-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698