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

Unified Diff: third_party/WebKit/Source/platform/graphics/paint/DrawingDisplayItem.cpp

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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/graphics/paint/DrawingDisplayItem.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/paint/DrawingDisplayItem.cpp b/third_party/WebKit/Source/platform/graphics/paint/DrawingDisplayItem.cpp
index 55b511afd347582d99c8248b02ad966d5c3b2230..9706eef1d92d1e52122197a5161e1d93f8893aee 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/DrawingDisplayItem.cpp
+++ b/third_party/WebKit/Source/platform/graphics/paint/DrawingDisplayItem.cpp
@@ -19,10 +19,14 @@ void DrawingDisplayItem::Replay(GraphicsContext& context) const {
}
void DrawingDisplayItem::AppendToWebDisplayItemList(
- const IntRect& visual_rect,
+ const LayoutSize& visual_rect_offset,
WebDisplayItemList* list) const {
- if (record_)
- list->AppendDrawingItem(visual_rect, record_);
+ if (record_) {
+ // Convert visual rect into the GraphicsLayer's coordinate space.
+ LayoutRect visual_rect = VisualRect();
+ visual_rect.Move(-visual_rect_offset);
+ list->AppendDrawingItem(EnclosingIntRect(visual_rect), record_);
+ }
}
bool DrawingDisplayItem::DrawsContent() const {

Powered by Google App Engine
This is Rietveld 408576698