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

Unified Diff: third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.h

Issue 2860293002: Change cc::ElementId to be a uint64_t (Closed)
Patch Set: Merge branch 'master' into secondaryid 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/core/offscreencanvas/OffscreenCanvas.h
diff --git a/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.h b/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.h
index 3d5b7820d210832b2a1f854bdb9c52183ed40784..30ffc9699ae27541774dc7fb244d4ccb9ec7c90f 100644
--- a/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.h
+++ b/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.h
@@ -7,6 +7,7 @@
#include <memory>
#include "bindings/core/v8/ScriptPromise.h"
+#include "core/dom/DOMNodeIds.h"
#include "core/events/EventTarget.h"
#include "core/html/HTMLCanvasElement.h"
#include "core/html/canvas/CanvasImageSource.h"
@@ -59,12 +60,12 @@ class CORE_EXPORT OffscreenCanvas final
const IntSize& Size() const override { return size_; }
void SetSize(const IntSize&);
- void SetPlaceholderCanvasId(int canvas_id) {
+ void SetPlaceholderCanvasId(DOMNodeId canvas_id) {
placeholder_canvas_id_ = canvas_id;
}
- int PlaceholderCanvasId() const { return placeholder_canvas_id_; }
+ DOMNodeId PlaceholderCanvasId() const { return placeholder_canvas_id_; }
bool HasPlaceholderCanvas() {
- return placeholder_canvas_id_ != kNoPlaceholderCanvas;
+ return placeholder_canvas_id_ != kInvalidDOMNodeId;
}
bool IsNeutered() const { return is_neutered_; }
void SetNeutered();
@@ -166,11 +167,7 @@ class CORE_EXPORT OffscreenCanvas final
Member<CanvasRenderingContext> context_;
WeakMember<ExecutionContext> execution_context_;
- enum {
- kNoPlaceholderCanvas = -1, // DOMNodeIds starts from 0, using -1 to
- // indicate no associated canvas element.
- };
- int placeholder_canvas_id_ = kNoPlaceholderCanvas;
+ DOMNodeId placeholder_canvas_id_ = kInvalidDOMNodeId;
IntSize size_;
bool is_neutered_ = false;
« no previous file with comments | « third_party/WebKit/Source/core/dom/DOMNodeIds.cpp ('k') | third_party/WebKit/Source/core/page/scrolling/ScrollState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698