Changeset 209005 in webkit
- Timestamp:
- Nov 28, 2016 12:27:39 PM (7 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r209003 r209005 1 2016-11-28 Brent Fulgham <bfulgham@apple.com> 2 3 ImageData does not match specification 4 https://bugs.webkit.org/show_bug.cgi?id=164663 5 6 Reviewed by Simon Fraser. 7 8 The W3C specification https://www.w3.org/TR/2dcontext/ clearly states that 9 the width and height attributes of the ImageData type should be unsigned. 10 Our current implementation has signed integer values. 11 12 In practice, we have enforced the unsigned requirement by throwing a TypeError 13 if you attempt to construct an ImageData with negative width or height. 14 15 This change simply updates the IDL and impelemntation to match the spec. 16 17 Test coverage is already provided by fast/canvas/canvas-imageData.html 18 19 * bindings/js/SerializedScriptValue.cpp: 20 (WebCore::CloneDeserializer::readTerminal): Serialize as uint32_t values. 21 * html/ImageData.idl: Revise width and height to be unsigned long. 22 1 23 2016-11-28 Dave Hyatt <hyatt@apple.com> 2 24 -
trunk/Source/WebCore/bindings/js/SerializedScriptValue.cpp
r208688 r209005 2265 2265 } 2266 2266 case ImageDataTag: { 2267 int32_t width;2267 uint32_t width; 2268 2268 if (!read(width)) 2269 2269 return JSValue(); 2270 int32_t height;2270 uint32_t height; 2271 2271 if (!read(height)) 2272 2272 return JSValue(); -
trunk/Source/WebCore/html/ImageData.idl
r208096 r209005 1 1 /* 2 * Copyright (C) 2008 , 2009Apple Inc. All rights reserved.2 * Copyright (C) 2008-2009, 2016 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 35 35 ImplementationLacksVTable, 36 36 ] interface ImageData { 37 readonly attribute long width;38 readonly attribute long height;37 readonly attribute unsigned long width; 38 readonly attribute unsigned long height; 39 39 readonly attribute Uint8ClampedArray data; 40 40 };
Note: See TracChangeset
for help on using the changeset viewer.