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

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

Issue 616703003: Should remove |struct HitRegionOptionsInternal|. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 6 years, 2 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 | « Source/core/html/canvas/HitRegion.h ('k') | 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 // 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 "config.h" 5 #include "config.h"
6 #include "core/html/canvas/HitRegion.h" 6 #include "core/html/canvas/HitRegion.h"
7 7
8 #include "core/accessibility/AXObjectCache.h" 8 #include "core/accessibility/AXObjectCache.h"
9 #include "core/rendering/RenderBoxModelObject.h" 9 #include "core/rendering/RenderBoxModelObject.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 HitRegion::HitRegion(const HitRegionOptionsInternal& options) 13 HitRegion::HitRegion(const Path& path, const HitRegionOptions& options)
14 : m_id(options.id) 14 : m_id(options.id())
15 , m_control(options.control) 15 , m_control(options.control())
16 , m_path(options.path) 16 , m_path(path)
17 , m_fillRule(options.fillRule)
18 { 17 {
18 if (options.fillRule() != "evenodd")
19 m_fillRule = RULE_NONZERO;
20 else
21 m_fillRule = RULE_EVENODD;
19 } 22 }
20 23
21 void HitRegion::updateAccessibility(Element* canvas) 24 void HitRegion::updateAccessibility(Element* canvas)
22 { 25 {
23 if (!m_control || !canvas || !canvas->renderer() || !m_control->isDescendant Of(canvas)) 26 if (!m_control || !canvas || !canvas->renderer() || !m_control->isDescendant Of(canvas))
24 return; 27 return;
25 28
26 AXObjectCache* axObjectCache = m_control->document().existingAXObjectCache() ; 29 AXObjectCache* axObjectCache = m_control->document().existingAXObjectCache() ;
27 if (!axObjectCache) 30 if (!axObjectCache)
28 return; 31 return;
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 #if ENABLE(OILPAN) 160 #if ENABLE(OILPAN)
158 visitor->trace(m_hitRegionList); 161 visitor->trace(m_hitRegionList);
159 visitor->trace(m_hitRegionIdMap); 162 visitor->trace(m_hitRegionIdMap);
160 visitor->trace(m_hitRegionControlMap); 163 visitor->trace(m_hitRegionControlMap);
161 #endif 164 #endif
162 } 165 }
163 166
164 DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(HitRegionManager) 167 DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(HitRegionManager)
165 168
166 } // namespace blink 169 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/html/canvas/HitRegion.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698