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

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

Issue 2894093002: Don't access DisplayItemClient::VisualRect() for cached display items. (Closed)
Patch Set: - Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 PaintControllerPaintTest_h 5 #ifndef PaintControllerPaintTest_h
6 #define PaintControllerPaintTest_h 6 #define PaintControllerPaintTest_h
7 7
8 #include "core/frame/FrameView.h" 8 #include "core/frame/FrameView.h"
9 #include "core/layout/LayoutTestHelper.h" 9 #include "core/layout/LayoutTestHelper.h"
10 #include "core/layout/LayoutView.h" 10 #include "core/layout/LayoutView.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 PaintControllerPaintTestForSlimmingPaintV1AndV2() 111 PaintControllerPaintTestForSlimmingPaintV1AndV2()
112 : PaintControllerPaintTestBase(GetParam()) {} 112 : PaintControllerPaintTestBase(GetParam()) {}
113 }; 113 };
114 114
115 class TestDisplayItem final : public DisplayItem { 115 class TestDisplayItem final : public DisplayItem {
116 public: 116 public:
117 TestDisplayItem(const DisplayItemClient& client, Type type) 117 TestDisplayItem(const DisplayItemClient& client, Type type)
118 : DisplayItem(client, type, sizeof(*this)) {} 118 : DisplayItem(client, type, sizeof(*this)) {}
119 119
120 void Replay(GraphicsContext&) const final { NOTREACHED(); } 120 void Replay(GraphicsContext&) const final { NOTREACHED(); }
121 void AppendToWebDisplayItemList(const IntRect&, 121 void AppendToWebDisplayItemList(const LayoutSize&,
122 WebDisplayItemList*) const final { 122 WebDisplayItemList*) const final {
123 NOTREACHED(); 123 NOTREACHED();
124 } 124 }
125 }; 125 };
126 126
127 #ifndef NDEBUG 127 #ifndef NDEBUG
128 #define TRACE_DISPLAY_ITEMS(i, expected, actual) \ 128 #define TRACE_DISPLAY_ITEMS(i, expected, actual) \
129 String trace = String::Format("%d: ", (int)i) + \ 129 String trace = String::Format("%d: ", (int)i) + \
130 "Expected: " + (expected).AsDebugString() + \ 130 "Expected: " + (expected).AsDebugString() + \
131 " Actual: " + (actual).AsDebugString(); \ 131 " Actual: " + (actual).AsDebugString(); \
(...skipping 19 matching lines...) Expand all
151 // Shorter names for frequently used display item types in tests. 151 // Shorter names for frequently used display item types in tests.
152 const DisplayItem::Type kBackgroundType = DisplayItem::kBoxDecorationBackground; 152 const DisplayItem::Type kBackgroundType = DisplayItem::kBoxDecorationBackground;
153 const DisplayItem::Type kForegroundType = 153 const DisplayItem::Type kForegroundType =
154 DisplayItem::PaintPhaseToDrawingType(kPaintPhaseForeground); 154 DisplayItem::PaintPhaseToDrawingType(kPaintPhaseForeground);
155 const DisplayItem::Type kDocumentBackgroundType = 155 const DisplayItem::Type kDocumentBackgroundType =
156 DisplayItem::kDocumentBackground; 156 DisplayItem::kDocumentBackground;
157 157
158 } // namespace blink 158 } // namespace blink
159 159
160 #endif // PaintControllerPaintTest_h 160 #endif // PaintControllerPaintTest_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.cpp ('k') | third_party/WebKit/Source/platform/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698