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

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

Issue 2208463003: First step of PaintInvalidator implementation (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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "core/paint/BlockFlowPaintInvalidator.h"
6
7 #include "core/layout/LayoutBlockFlow.h"
8 #include "core/paint/BoxPaintInvalidator.h"
9 #include "core/paint/PaintInvalidator.h"
10
11 namespace blink {
12
13 PaintInvalidationReason BlockFlowPaintInvalidator::invalidatePaintIfNeeded()
14 {
15 PaintInvalidationReason reason = BoxPaintInvalidator(m_blockFlow, m_context) .invalidatePaintIfNeeded();
16
17 if (reason == PaintInvalidationNone || reason == PaintInvalidationDelayedFul l)
18 return reason;
19
20 RootInlineBox* line = m_blockFlow.firstRootBox();
21 if (line && line->isFirstLineStyle()) {
22 // 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,
24 // we just invalidate it unconditionally which is typically cheaper.
25 m_blockFlow.invalidateDisplayItemClient(*line, reason);
26 }
27 return reason;
28 }
29
30 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698