| Index: third_party/WebKit/Source/platform/graphics/paint/PaintArtifact.cpp
|
| diff --git a/third_party/WebKit/Source/platform/graphics/paint/PaintArtifact.cpp b/third_party/WebKit/Source/platform/graphics/paint/PaintArtifact.cpp
|
| index e792755782bba1f3be89e58b1eaffa171e62c53f..1a19cad77298f784c9672aeee7375cd9701427d4 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/paint/PaintArtifact.cpp
|
| +++ b/third_party/WebKit/Source/platform/graphics/paint/PaintArtifact.cpp
|
| @@ -38,12 +38,20 @@ void PaintArtifact::replay(GraphicsContext& graphicsContext) const
|
| displayItem.replay(graphicsContext);
|
| }
|
|
|
| -void PaintArtifact::appendToWebDisplayItemList(WebDisplayItemList* list) const
|
| +void PaintArtifact::appendToWebDisplayItemList(const DisplayItemRectMap& itemRects, WebDisplayItemList* list) const
|
| {
|
| TRACE_EVENT0("blink,benchmark", "PaintArtifact::appendToWebDisplayItemList");
|
| - for (const DisplayItem& displayItem : m_displayItemList) {
|
| - // TODO(wkorman): Pass the actual visual rect for the display item.
|
| - displayItem.appendToWebDisplayItemList(IntRect(), list);
|
| + for (const auto& displayItem : m_displayItemList) {
|
| + if (itemRects.contains(displayItem.client())) {
|
| + IntRect visualRect = itemRects.get(displayItem.client());
|
| + // fprintf(stderr, "Got visual rect [rect=(%d, %d, %d, %d), item=%s].\n",
|
| + // visualRect.x(), visualRect.y(), visualRect.width(), visualRect.height(),
|
| + // displayItem.asDebugString().ascii().data());
|
| + displayItem.appendToWebDisplayItemList(visualRect, list);
|
| + } else {
|
| + // fprintf(stderr, "Missing visual rect [item=%s].\n", displayItem.asDebugString().ascii().data());
|
| + displayItem.appendToWebDisplayItemList(IntRect(), list);
|
| + }
|
| }
|
| }
|
|
|
|
|