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

Side by Side Diff: Source/core/html/HTMLCanvasElement.cpp

Issue 55143009: Move MIMEType classes to Source/platform (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase against ToT Created 7 years, 1 month 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
« no previous file with comments | « Source/core/fileapi/File.cpp ('k') | Source/core/html/HTMLMediaElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2007 Alp Toker <alp@atoker.com> 3 * Copyright (C) 2007 Alp Toker <alp@atoker.com>
4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. 4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 25 matching lines...) Expand all
36 #include "bindings/v8/ScriptController.h" 36 #include "bindings/v8/ScriptController.h"
37 #include "core/dom/Document.h" 37 #include "core/dom/Document.h"
38 #include "core/dom/ExceptionCode.h" 38 #include "core/dom/ExceptionCode.h"
39 #include "core/html/ImageData.h" 39 #include "core/html/ImageData.h"
40 #include "core/html/canvas/Canvas2DContextAttributes.h" 40 #include "core/html/canvas/Canvas2DContextAttributes.h"
41 #include "core/html/canvas/CanvasRenderingContext2D.h" 41 #include "core/html/canvas/CanvasRenderingContext2D.h"
42 #include "core/html/canvas/WebGLContextAttributes.h" 42 #include "core/html/canvas/WebGLContextAttributes.h"
43 #include "core/html/canvas/WebGLRenderingContext.h" 43 #include "core/html/canvas/WebGLRenderingContext.h"
44 #include "core/frame/Frame.h" 44 #include "core/frame/Frame.h"
45 #include "core/page/Settings.h" 45 #include "core/page/Settings.h"
46 #include "core/platform/MIMETypeRegistry.h"
47 #include "core/platform/graphics/GraphicsContextStateSaver.h" 46 #include "core/platform/graphics/GraphicsContextStateSaver.h"
48 #include "core/platform/graphics/ImageBuffer.h" 47 #include "core/platform/graphics/ImageBuffer.h"
49 #include "core/rendering/RenderHTMLCanvas.h" 48 #include "core/rendering/RenderHTMLCanvas.h"
49 #include "platform/MIMETypeRegistry.h"
50 #include "public/platform/Platform.h" 50 #include "public/platform/Platform.h"
51 51
52 namespace WebCore { 52 namespace WebCore {
53 53
54 using namespace HTMLNames; 54 using namespace HTMLNames;
55 55
56 // These values come from the WhatWG spec. 56 // These values come from the WhatWG spec.
57 static const int DefaultWidth = 300; 57 static const int DefaultWidth = 300;
58 static const int DefaultHeight = 150; 58 static const int DefaultHeight = 150;
59 59
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 ASSERT(m_hasCreatedImageBuffer); 555 ASSERT(m_hasCreatedImageBuffer);
556 IntSize unscaledSize = size(); 556 IntSize unscaledSize = size();
557 IntSize size = convertLogicalToDevice(unscaledSize); 557 IntSize size = convertLogicalToDevice(unscaledSize);
558 AffineTransform transform; 558 AffineTransform transform;
559 if (size.width() && size.height()) 559 if (size.width() && size.height())
560 transform.scaleNonUniform(size.width() / unscaledSize.width(), size.heig ht() / unscaledSize.height()); 560 transform.scaleNonUniform(size.width() / unscaledSize.width(), size.heig ht() / unscaledSize.height());
561 return m_imageBuffer->baseTransform() * transform; 561 return m_imageBuffer->baseTransform() * transform;
562 } 562 }
563 563
564 } 564 }
OLDNEW
« no previous file with comments | « Source/core/fileapi/File.cpp ('k') | Source/core/html/HTMLMediaElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698