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

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

Issue 331803004: context.addHitRegion should return if the DOMException occurs. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 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
« no previous file with comments | « no previous file | no next file » | 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 2375 matching lines...) Expand 10 before | Expand all | Expand 10 after
2386 } 2386 }
2387 2387
2388 Path specifiedPath = m_path; 2388 Path specifiedPath = m_path;
2389 specifiedPath.transform(state().m_transform); 2389 specifiedPath.transform(state().m_transform);
2390 2390
2391 if (context->isClipMode()) { 2391 if (context->isClipMode()) {
2392 // FIXME: The hit regions should take clipping region into account. 2392 // FIXME: The hit regions should take clipping region into account.
2393 // However, we have no way to get the region from canvas state stack by now. 2393 // However, we have no way to get the region from canvas state stack by now.
2394 // See http://crbug.com/387057 2394 // See http://crbug.com/387057
2395 exceptionState.throwDOMException(NotSupportedError, "The specified path has no pixels."); 2395 exceptionState.throwDOMException(NotSupportedError, "The specified path has no pixels.");
2396 return;
2396 } 2397 }
2397 2398
2398 passOptions.path = specifiedPath; 2399 passOptions.path = specifiedPath;
2399 addHitRegionInternal(passOptions, exceptionState); 2400 addHitRegionInternal(passOptions, exceptionState);
2400 } 2401 }
2401 2402
2402 void CanvasRenderingContext2D::addHitRegionInternal(const HitRegionOptions& opti ons, ExceptionState& exceptionState) 2403 void CanvasRenderingContext2D::addHitRegionInternal(const HitRegionOptions& opti ons, ExceptionState& exceptionState)
2403 { 2404 {
2404 if (!m_hitRegionManager) 2405 if (!m_hitRegionManager)
2405 m_hitRegionManager = HitRegionManager::create(); 2406 m_hitRegionManager = HitRegionManager::create();
(...skipping 29 matching lines...) Expand all
2435 2436
2436 unsigned CanvasRenderingContext2D::hitRegionsCount() const 2437 unsigned CanvasRenderingContext2D::hitRegionsCount() const
2437 { 2438 {
2438 if (m_hitRegionManager) 2439 if (m_hitRegionManager)
2439 return m_hitRegionManager->getHitRegionsCount(); 2440 return m_hitRegionManager->getHitRegionsCount();
2440 2441
2441 return 0; 2442 return 0;
2442 } 2443 }
2443 2444
2444 } // namespace WebCore 2445 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698