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

Unified Diff: third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModule.cpp

Issue 2493673002: Synchronize OffscreenCanvas content with the placeholder canvas (Closed)
Patch Set: fix obsolete test Created 4 years, 1 month 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/modules/canvas/HTMLCanvasElementModule.cpp
diff --git a/third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModule.cpp b/third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModule.cpp
index 5d444a088941ffe61fe8dfee51798f4a155c0ec3..3345b84017aa8faf2c396eca7f77fe65783a2e77 100644
--- a/third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModule.cpp
+++ b/third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModule.cpp
@@ -65,7 +65,10 @@ OffscreenCanvas* HTMLCanvasElementModule::transferControlToOffscreenInternal(
}
OffscreenCanvas* offscreenCanvas =
OffscreenCanvas::create(canvas.width(), canvas.height());
- offscreenCanvas->setAssociatedCanvasId(DOMNodeIds::idForNode(&canvas));
+
+ int canvasId = DOMNodeIds::idForNode(&canvas);
+ offscreenCanvas->setPlaceholderCanvasId(canvasId);
+ canvas.registerPlaceholder(canvasId);
CanvasSurfaceLayerBridge* bridge = canvas.surfaceLayerBridge();
if (bridge) {

Powered by Google App Engine
This is Rietveld 408576698