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..eefa999aaec147411c1b78d56b9cd1b592e8d7ab 100644 |
--- a/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.h |
+++ b/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.h |
@@ -59,10 +59,10 @@ class CORE_EXPORT OffscreenCanvas final |
const IntSize& Size() const override { return size_; } |
void SetSize(const IntSize&); |
- void SetPlaceholderCanvasId(int canvas_id) { |
+ void SetPlaceholderCanvasId(unsigned canvas_id) { |
suzyh_UTC10 (ex-contributor)
2017/05/05 04:27:30
Would it be worth typedef-ing canvas ID as well, t
chrishtr
2017/05/05 05:34:52
Sure - done.
|
placeholder_canvas_id_ = canvas_id; |
} |
- int PlaceholderCanvasId() const { return placeholder_canvas_id_; } |
+ unsigned PlaceholderCanvasId() const { return placeholder_canvas_id_; } |
bool HasPlaceholderCanvas() { |
return placeholder_canvas_id_ != kNoPlaceholderCanvas; |
} |
@@ -167,10 +167,10 @@ class CORE_EXPORT OffscreenCanvas final |
WeakMember<ExecutionContext> execution_context_; |
enum { |
- kNoPlaceholderCanvas = -1, // DOMNodeIds starts from 0, using -1 to |
- // indicate no associated canvas element. |
+ kNoPlaceholderCanvas = 0, // DOMNodeIds starts from 1, using 0 to |
chrishtr
2017/05/05 03:40:11
https://cs.chromium.org/chromium/src/third_party/W
suzyh_UTC10 (ex-contributor)
2017/05/05 04:27:30
What is the practical result of changing this from
chrishtr
2017/05/05 05:34:52
I made this change because bit-shifting signed int
|
+ // indicate no associated canvas element. |
}; |
- int placeholder_canvas_id_ = kNoPlaceholderCanvas; |
+ unsigned placeholder_canvas_id_ = kNoPlaceholderCanvas; |
IntSize size_; |
bool is_neutered_ = false; |