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

Side by Side Diff: third_party/WebKit/Source/core/paint/BoxPaintInvalidator.h

Issue 2699463004: Fix gradient background invalidation when HTML size changes (Closed)
Patch Set: - Created 3 years, 10 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
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 #ifndef BoxPaintInvalidator_h 5 #ifndef BoxPaintInvalidator_h
6 #define BoxPaintInvalidator_h 6 #define BoxPaintInvalidator_h
7 7
8 #include "platform/graphics/PaintInvalidationReason.h" 8 #include "platform/graphics/PaintInvalidationReason.h"
9 #include "wtf/Allocator.h" 9 #include "wtf/Allocator.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 class LayoutBox; 13 class LayoutBox;
14 class LayoutRect; 14 class LayoutRect;
15 class LayoutSize; 15 class LayoutSize;
16 struct PaintInvalidatorContext; 16 struct PaintInvalidatorContext;
17 17
18 class BoxPaintInvalidator { 18 class BoxPaintInvalidator {
19 STACK_ALLOCATED(); 19 STACK_ALLOCATED();
20 20
21 public: 21 public:
22 BoxPaintInvalidator(const LayoutBox& box, 22 BoxPaintInvalidator(const LayoutBox& box,
23 const PaintInvalidatorContext& context) 23 const PaintInvalidatorContext& context)
24 : m_box(box), m_context(context) {} 24 : m_box(box), m_context(context) {}
25 25
26 static void boxWillBeDestroyed(const LayoutBox&); 26 static void boxWillBeDestroyed(const LayoutBox&);
27 27
28 PaintInvalidationReason invalidatePaintIfNeeded(); 28 PaintInvalidationReason invalidatePaintIfNeeded();
29 29
30 static LayoutSize previousBorderBoxSize(const LayoutBox&,
31 const LayoutSize& defaultSize);
32
30 private: 33 private:
31 bool backgroundGeometryDependsOnLayoutOverflowRect(); 34 bool backgroundGeometryDependsOnLayoutOverflowRect();
32 bool backgroundPaintsOntoScrollingContentsLayer(); 35 bool backgroundPaintsOntoScrollingContentsLayer();
33 bool shouldFullyInvalidateBackgroundOnLayoutOverflowChange( 36 bool shouldFullyInvalidateBackgroundOnLayoutOverflowChange(
34 const LayoutRect& oldLayoutOverflow, 37 const LayoutRect& oldLayoutOverflow,
35 const LayoutRect& newLayoutOverflow); 38 const LayoutRect& newLayoutOverflow);
36 void invalidateScrollingContentsBackgroundIfNeeded(); 39 void invalidateScrollingContentsBackgroundIfNeeded();
37 40
38 PaintInvalidationReason computePaintInvalidationReason(); 41 PaintInvalidationReason computePaintInvalidationReason();
39 42
40 bool incrementallyInvalidatePaint(PaintInvalidationReason, 43 bool incrementallyInvalidatePaint(PaintInvalidationReason,
41 const LayoutRect& oldRect, 44 const LayoutRect& oldRect,
42 const LayoutRect& newRect); 45 const LayoutRect& newRect);
43 46
44 bool needsToSavePreviousBoxGeometries(); 47 bool needsToSavePreviousBoxGeometries();
45 void savePreviousBoxGeometriesIfNeeded(); 48 void savePreviousBoxGeometriesIfNeeded();
46 LayoutSize previousBorderBoxSize();
47 LayoutRect previousContentBoxRect(); 49 LayoutRect previousContentBoxRect();
48 LayoutRect previousLayoutOverflowRect(); 50 LayoutRect previousLayoutOverflowRect();
49 51
50 const LayoutBox& m_box; 52 const LayoutBox& m_box;
51 const PaintInvalidatorContext& m_context; 53 const PaintInvalidatorContext& m_context;
52 }; 54 };
53 55
54 } // namespace blink 56 } // namespace blink
55 57
56 #endif 58 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/BUILD.gn ('k') | third_party/WebKit/Source/core/paint/BoxPaintInvalidator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698