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

Side by Side Diff: third_party/WebKit/Source/modules/canvas2d/HitRegion.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: fix bot errors 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "modules/canvas2d/HitRegion.h" 5 #include "modules/canvas2d/HitRegion.h"
6 6
7 #include "core/dom/AXObjectCache.h" 7 #include "core/dom/AXObjectCache.h"
8 #include "core/layout/LayoutBoxModelObject.h" 8 #include "core/layout/LayoutBoxModelObject.h"
9 9
10 namespace blink { 10 namespace blink {
11 11
12 HitRegion::HitRegion(const Path& path, const HitRegionOptions& options) 12 HitRegion::HitRegion(const Path& path, const HitRegionOptions& options)
13 : m_id(options.id()) 13 : m_id(options.id().isEmpty() ? String() : options.id())
14 , m_control(options.control()) 14 , m_control(options.control())
15 , m_path(path) 15 , m_path(path)
16 { 16 {
17 if (options.fillRule() != "evenodd") 17 if (options.fillRule() != "evenodd")
18 m_fillRule = RULE_NONZERO; 18 m_fillRule = RULE_NONZERO;
19 else 19 else
20 m_fillRule = RULE_EVENODD; 20 m_fillRule = RULE_EVENODD;
21 } 21 }
22 22
23 bool HitRegion::contains(const FloatPoint& point) const 23 bool HitRegion::contains(const FloatPoint& point) const
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 DEFINE_TRACE(HitRegionManager) 135 DEFINE_TRACE(HitRegionManager)
136 { 136 {
137 #if ENABLE(OILPAN) 137 #if ENABLE(OILPAN)
138 visitor->trace(m_hitRegionList); 138 visitor->trace(m_hitRegionList);
139 visitor->trace(m_hitRegionIdMap); 139 visitor->trace(m_hitRegionIdMap);
140 visitor->trace(m_hitRegionControlMap); 140 visitor->trace(m_hitRegionControlMap);
141 #endif 141 #endif
142 } 142 }
143 143
144 } // namespace blink 144 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698