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

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

Issue 1654653002: Canvas2d: Implement rerouting event by hit region's control. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 /* 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 1070 matching lines...) Expand 10 before | Expand all | Expand 10 after
1081 || element.hasTagName(HTMLNames::tbodyTag) 1081 || element.hasTagName(HTMLNames::tbodyTag)
1082 || element.hasTagName(HTMLNames::tfootTag) 1082 || element.hasTagName(HTMLNames::tfootTag)
1083 || element.hasTagName(HTMLNames::trTag) 1083 || element.hasTagName(HTMLNames::trTag)
1084 || element.hasTagName(HTMLNames::tdTag) 1084 || element.hasTagName(HTMLNames::tdTag)
1085 || element.hasTagName(HTMLNames::thTag)) 1085 || element.hasTagName(HTMLNames::thTag))
1086 return true; 1086 return true;
1087 1087
1088 return false; 1088 return false;
1089 } 1089 }
1090 1090
1091 std::pair<Element*, String> HTMLCanvasElement::getControlAndIdIfHitRegionExists( const LayoutPoint& location)
1092 {
1093 if (m_context && m_context->is2d() && m_context->hitRegionsCount() > 0)
Rick Byers 2016/03/10 21:36:29 nit: move the hitRegionsCount check down into impl
zino 2016/03/11 09:35:47 Done.
1094 return m_context->getControlAndIdIfHitRegionExists(location);
1095 return std::make_pair(nullptr, String());
1096 }
1097
1091 } // namespace blink 1098 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698