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

Side by Side Diff: third_party/WebKit/Source/core/html/ImageData.cpp

Issue 2727133002: Remove ColorBehavior argument to Image::imageForCurrentFrame (Closed)
Patch Set: Rebase Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2008 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 16 matching lines...) Expand all
27 */ 27 */
28 28
29 #include "core/html/ImageData.h" 29 #include "core/html/ImageData.h"
30 30
31 #include "bindings/core/v8/ExceptionState.h" 31 #include "bindings/core/v8/ExceptionState.h"
32 #include "bindings/core/v8/V8Uint8ClampedArray.h" 32 #include "bindings/core/v8/V8Uint8ClampedArray.h"
33 #include "core/dom/ExceptionCode.h" 33 #include "core/dom/ExceptionCode.h"
34 #include "core/frame/ImageBitmap.h" 34 #include "core/frame/ImageBitmap.h"
35 #include "core/imagebitmap/ImageBitmapOptions.h" 35 #include "core/imagebitmap/ImageBitmapOptions.h"
36 #include "platform/RuntimeEnabledFeatures.h" 36 #include "platform/RuntimeEnabledFeatures.h"
37 #include "platform/graphics/ColorBehavior.h"
37 38
38 namespace blink { 39 namespace blink {
39 40
40 bool ImageData::validateConstructorArguments(const unsigned& paramFlags, 41 bool ImageData::validateConstructorArguments(const unsigned& paramFlags,
41 const IntSize* size, 42 const IntSize* size,
42 const unsigned& width, 43 const unsigned& width,
43 const unsigned& height, 44 const unsigned& height,
44 const DOMArrayBufferView* data, 45 const DOMArrayBufferView* data,
45 const String* colorSpace, 46 const String* colorSpace,
46 ExceptionState* exceptionState, 47 ExceptionState* exceptionState,
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 : m_size(size), 395 : m_size(size),
395 m_colorSpace(getImageDataColorSpace(colorSpaceName)), 396 m_colorSpace(getImageDataColorSpace(colorSpaceName)),
396 m_data(byteArray) { 397 m_data(byteArray) {
397 DCHECK_GE(size.width(), 0); 398 DCHECK_GE(size.width(), 0);
398 DCHECK_GE(size.height(), 0); 399 DCHECK_GE(size.height(), 0);
399 SECURITY_CHECK(static_cast<unsigned>(size.width() * size.height() * 4) <= 400 SECURITY_CHECK(static_cast<unsigned>(size.width() * size.height() * 4) <=
400 m_data->length()); 401 m_data->length());
401 } 402 }
402 403
403 } // namespace blink 404 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698