Bug 130668

Summary: Implement ImageData constructors and WebWorkers exposure
Product: WebKit Reporter: Dirk Schulze <krit>
Component: CanvasAssignee: Dirk Schulze <krit>
Status: RESOLVED FIXED    
Severity: Normal CC: buildbot, cabanier, cdumez, commit-queue, dino, esprehn+autocc, gyuyoung.kim, kondapallykalyan, oliver, rniwa, simon.fraser
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
URL: http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#pixel-manipulation
Attachments:
Description Flags
Patch
buildbot: commit-queue-
Archive of layout-test-results from webkit-ews-14 for mac-mountainlion-wk2
none
Patch none

Description Dirk Schulze 2014-03-24 07:55:28 PDT
The spec says:

[Constructor(unsigned long sw, unsigned long sh),
 Constructor(Uint8ClampedArray data, unsigned long sw, optional unsigned long sh),
 Exposed=Window,Worker]
interface ImageData {
  readonly attribute unsigned long width;
  readonly attribute unsigned long height;
  readonly attribute Uint8ClampedArray data;
};

We should support constructors and the workers exposure.
Comment 1 Dirk Schulze 2014-03-24 07:59:19 PDT
Firefox already has this feature in the Nighlies and will ship without a flag: https://bugzilla.mozilla.org/show_bug.cgi?id=959958

Chrome has a CL for it and an Intent to ship is under way: https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/FvHQUEXCgEo
Comment 2 Dirk Schulze 2014-03-24 13:10:50 PDT
Created attachment 227684 [details]
Patch
Comment 3 WebKit Commit Bot 2014-03-24 13:13:13 PDT
Attachment 227684 [details] did not pass style-queue:


ERROR: Source/WebCore/html/ImageData.cpp:87:  Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons.  [readability/comparison_to_zero] [5]
ERROR: Source/WebCore/html/ImageData.cpp:98:  Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons.  [readability/comparison_to_zero] [5]
ERROR: Source/WebCore/html/ImageData.idl:30:  Line contains tab character.  [whitespace/tab] [5]
Total errors found: 3 in 8 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Dirk Schulze 2014-03-24 13:18:26 PDT
(In reply to comment #3)
> Attachment 227684 [details] did not pass style-queue:
> 
> 
> ERROR: Source/WebCore/html/ImageData.cpp:87:  Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons.  [readability/comparison_to_zero] [5]
> ERROR: Source/WebCore/html/ImageData.cpp:98:  Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons.  [readability/comparison_to_zero] [5]
> ERROR: Source/WebCore/html/ImageData.idl:30:  Line contains tab character.  [whitespace/tab] [5]
> Total errors found: 3 in 8 files
> 
> 
> If any of these errors are false positives, please file a bug against check-webkit-style.

The equality comparisons are false positives. Will fix indentation before landing.
Comment 5 Build Bot 2014-03-24 14:02:38 PDT
Comment on attachment 227684 [details]
Patch

Attachment 227684 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/5630271990792192

New failing tests:
js/dom/global-constructors-attributes-shared-worker.html
js/dom/global-constructors-attributes-dedicated-worker.html
canvas/philip/tests/2d.imageData.object.ctor.html
Comment 6 Build Bot 2014-03-24 14:02:44 PDT
Created attachment 227691 [details]
Archive of layout-test-results from webkit-ews-14 for mac-mountainlion-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-14  Port: mac-mountainlion-wk2  Platform: Mac OS X 10.8.5
Comment 7 Dirk Schulze 2014-03-24 14:23:35 PDT
Created attachment 227692 [details]
Patch
Comment 8 WebKit Commit Bot 2014-03-24 14:24:54 PDT
Attachment 227692 [details] did not pass style-queue:


ERROR: Source/WebCore/html/ImageData.cpp:87:  Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons.  [readability/comparison_to_zero] [5]
ERROR: Source/WebCore/html/ImageData.cpp:98:  Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons.  [readability/comparison_to_zero] [5]
ERROR: LayoutTests/ChangeLog:17:  Need whitespace between colon and description  [changelog/filechangedescriptionwhitespace] [5]
ERROR: LayoutTests/ChangeLog:18:  Need whitespace between colon and description  [changelog/filechangedescriptionwhitespace] [5]
Total errors found: 4 in 10 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 9 WebKit Commit Bot 2014-03-25 13:24:41 PDT
Comment on attachment 227692 [details]
Patch

Clearing flags on attachment: 227692

Committed r166246: <http://trac.webkit.org/changeset/166246>
Comment 10 WebKit Commit Bot 2014-03-25 13:24:47 PDT
All reviewed patches have been landed.  Closing bug.