| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |