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

Side by Side Diff: Source/core/html/canvas/CanvasRenderingContext2D.cpp

Issue 99083002: WIP: Migrate generated bindings to new ExceptionState constructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase. Created 7 years 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/html/TimeRanges.cpp ('k') | Source/core/html/canvas/WebGLRenderingContext.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, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
3 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies)
4 * Copyright (C) 2007 Alp Toker <alp@atoker.com> 4 * Copyright (C) 2007 Alp Toker <alp@atoker.com>
5 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> 5 * Copyright (C) 2008 Eric Seidel <eric@webkit.org>
6 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org> 6 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org>
7 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. 7 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved.
8 * Copyright (C) 2012, 2013 Intel Corporation. All rights reserved. 8 * Copyright (C) 2012, 2013 Intel Corporation. All rights reserved.
9 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. 9 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
10 * 10 *
(...skipping 16 matching lines...) Expand all
27 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 27 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
28 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 */ 31 */
32 32
33 #include "config.h" 33 #include "config.h"
34 #include "core/html/canvas/CanvasRenderingContext2D.h" 34 #include "core/html/canvas/CanvasRenderingContext2D.h"
35 35
36 #include "CSSPropertyNames.h" 36 #include "CSSPropertyNames.h"
37 #include "bindings/v8/ExceptionMessages.h"
38 #include "bindings/v8/ExceptionState.h" 37 #include "bindings/v8/ExceptionState.h"
39 #include "bindings/v8/ExceptionStatePlaceholder.h" 38 #include "bindings/v8/ExceptionStatePlaceholder.h"
40 #include "core/accessibility/AXObjectCache.h" 39 #include "core/accessibility/AXObjectCache.h"
41 #include "core/css/CSSFontSelector.h" 40 #include "core/css/CSSFontSelector.h"
42 #include "core/css/CSSParser.h" 41 #include "core/css/CSSParser.h"
43 #include "core/css/StylePropertySet.h" 42 #include "core/css/StylePropertySet.h"
44 #include "core/css/resolver/StyleResolver.h" 43 #include "core/css/resolver/StyleResolver.h"
45 #include "core/dom/ExceptionCode.h" 44 #include "core/dom/ExceptionCode.h"
46 #include "core/fetch/ImageResource.h" 45 #include "core/fetch/ImageResource.h"
47 #include "core/html/HTMLCanvasElement.h" 46 #include "core/html/HTMLCanvasElement.h"
(...skipping 1827 matching lines...) Expand 10 before | Expand all | Expand 10 after
1875 } 1874 }
1876 1875
1877 PassRefPtr<ImageData> CanvasRenderingContext2D::webkitGetImageDataHD(float sx, f loat sy, float sw, float sh, ExceptionState& exceptionState) const 1876 PassRefPtr<ImageData> CanvasRenderingContext2D::webkitGetImageDataHD(float sx, f loat sy, float sw, float sh, ExceptionState& exceptionState) const
1878 { 1877 {
1879 return getImageData(ImageBuffer::BackingStoreCoordinateSystem, sx, sy, sw, s h, exceptionState); 1878 return getImageData(ImageBuffer::BackingStoreCoordinateSystem, sx, sy, sw, s h, exceptionState);
1880 } 1879 }
1881 1880
1882 PassRefPtr<ImageData> CanvasRenderingContext2D::getImageData(ImageBuffer::Coordi nateSystem coordinateSystem, float sx, float sy, float sw, float sh, ExceptionSt ate& exceptionState) const 1881 PassRefPtr<ImageData> CanvasRenderingContext2D::getImageData(ImageBuffer::Coordi nateSystem coordinateSystem, float sx, float sy, float sw, float sh, ExceptionSt ate& exceptionState) const
1883 { 1882 {
1884 if (!canvas()->originClean()) { 1883 if (!canvas()->originClean()) {
1885 exceptionState.throwSecurityError(ExceptionMessages::failedToExecute("ge tImageData", "CanvasRenderingContext2D", "The canvas has been tainted by cross-o rigin data.")); 1884 exceptionState.throwSecurityError("The canvas has been tainted by cross- origin data.");
1886 return 0; 1885 return 0;
1887 } 1886 }
1888 1887
1889 if (!sw || !sh) { 1888 if (!sw || !sh) {
1890 exceptionState.throwUninformativeAndGenericDOMException(IndexSizeError); 1889 exceptionState.throwUninformativeAndGenericDOMException(IndexSizeError);
1891 return 0; 1890 return 0;
1892 } 1891 }
1893 if (!std::isfinite(sx) || !std::isfinite(sy) || !std::isfinite(sw) || !std:: isfinite(sh)) { 1892 if (!std::isfinite(sx) || !std::isfinite(sy) || !std::isfinite(sw) || !std:: isfinite(sh)) {
1894 exceptionState.throwUninformativeAndGenericDOMException(NotSupportedErro r); 1893 exceptionState.throwUninformativeAndGenericDOMException(NotSupportedErro r);
1895 return 0; 1894 return 0;
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after
2427 const int focusRingWidth = 5; 2426 const int focusRingWidth = 5;
2428 const int focusRingOutline = 0; 2427 const int focusRingOutline = 0;
2429 c->drawFocusRing(path, focusRingWidth, focusRingOutline, focusRingColor); 2428 c->drawFocusRing(path, focusRingWidth, focusRingOutline, focusRingColor);
2430 2429
2431 c->restore(); 2430 c->restore();
2432 2431
2433 didDraw(dirtyRect); 2432 didDraw(dirtyRect);
2434 } 2433 }
2435 2434
2436 } // namespace WebCore 2435 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/html/TimeRanges.cpp ('k') | Source/core/html/canvas/WebGLRenderingContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698