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

Side by Side Diff: third_party/WebKit/Source/core/frame/ImageBitmap.cpp

Issue 2701993002: DO NOT COMMIT: Results of running new (proposed) clang-format on Blink (Closed)
Patch Set: Created 3 years, 10 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 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/frame/ImageBitmap.h" 5 #include "core/frame/ImageBitmap.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include "core/html/Float32ImageData.h" 8 #include "core/html/Float32ImageData.h"
9 #include "core/html/HTMLCanvasElement.h" 9 #include "core/html/HTMLCanvasElement.h"
10 #include "core/html/HTMLVideoElement.h" 10 #include "core/html/HTMLVideoElement.h"
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 return false; 425 return false;
426 } 426 }
427 return true; 427 return true;
428 } 428 }
429 429
430 bool ImageBitmap::isSourceSizeValid(int sourceWidth, 430 bool ImageBitmap::isSourceSizeValid(int sourceWidth,
431 int sourceHeight, 431 int sourceHeight,
432 ExceptionState& exceptionState) { 432 ExceptionState& exceptionState) {
433 if (!sourceWidth || !sourceHeight) { 433 if (!sourceWidth || !sourceHeight) {
434 exceptionState.throwDOMException( 434 exceptionState.throwDOMException(
435 IndexSizeError, String::format("The source %s provided is 0.", 435 IndexSizeError,
436 sourceWidth ? "height" : "width")); 436 String::format("The source %s provided is 0.",
437 sourceWidth ? "height" : "width"));
437 return false; 438 return false;
438 } 439 }
439 return true; 440 return true;
440 } 441 }
441 442
442 // The parameter imageFormat indicates whether the first parameter "image" is 443 // The parameter imageFormat indicates whether the first parameter "image" is
443 // unpremultiplied or not. imageFormat = PremultiplyAlpha means the image is in 444 // unpremultiplied or not. imageFormat = PremultiplyAlpha means the image is in
444 // premuliplied format For example, if the image is already in unpremultiplied 445 // premuliplied format For example, if the image is already in unpremultiplied
445 // format and we want the created ImageBitmap in the same format, then we don't 446 // format and we want the created ImageBitmap in the same format, then we don't
446 // need to use the ImageDecoder to decode the image. 447 // need to use the ImageDecoder to decode the image.
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after
1152 void ImageBitmap::adjustDrawRects(FloatRect* srcRect, 1153 void ImageBitmap::adjustDrawRects(FloatRect* srcRect,
1153 FloatRect* dstRect) const {} 1154 FloatRect* dstRect) const {}
1154 1155
1155 FloatSize ImageBitmap::elementSize(const FloatSize&) const { 1156 FloatSize ImageBitmap::elementSize(const FloatSize&) const {
1156 return FloatSize(width(), height()); 1157 return FloatSize(width(), height());
1157 } 1158 }
1158 1159
1159 DEFINE_TRACE(ImageBitmap) {} 1160 DEFINE_TRACE(ImageBitmap) {}
1160 1161
1161 } // namespace blink 1162 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.cpp ('k') | third_party/WebKit/Source/core/frame/LocalFrame.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698