Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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" | |
|
Justin Novosad
2017/03/03 19:34:57
Is this because it used to be indirectly included?
ccameron
2017/03/03 20:13:21
Yes, exactly.
| |
| 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 Loading... | |
| 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 |
| OLD | NEW |