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

Side by Side Diff: Source/modules/accessibility/AXImageMapLink.cpp

Issue 1072273006: Oilpan: Prepare moving AXObject to heap (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2008 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 27 matching lines...) Expand all
38 38
39 AXImageMapLink::AXImageMapLink(AXObjectCacheImpl& axObjectCache) 39 AXImageMapLink::AXImageMapLink(AXObjectCacheImpl& axObjectCache)
40 : AXMockObject(axObjectCache) 40 : AXMockObject(axObjectCache)
41 , m_areaElement(nullptr) 41 , m_areaElement(nullptr)
42 , m_mapElement(nullptr) 42 , m_mapElement(nullptr)
43 { 43 {
44 } 44 }
45 45
46 AXImageMapLink::~AXImageMapLink() 46 AXImageMapLink::~AXImageMapLink()
47 { 47 {
48 ASSERT(!m_areaElement);
49 ASSERT(!m_mapElement);
50 }
51
52 void AXImageMapLink::detach()
53 {
54 AXMockObject::detach();
55 m_areaElement = nullptr;
56 m_mapElement = nullptr;
48 } 57 }
49 58
50 void AXImageMapLink::detachFromParent() 59 void AXImageMapLink::detachFromParent()
51 { 60 {
52 AXMockObject::detachFromParent(); 61 AXMockObject::detachFromParent();
53 m_areaElement = nullptr; 62 m_areaElement = nullptr;
54 m_mapElement = nullptr; 63 m_mapElement = nullptr;
55 } 64 }
56 65
57 PassRefPtr<AXImageMapLink> AXImageMapLink::create(AXObjectCacheImpl& axObjectCac he) 66 PassRefPtrWillBeRawPtr<AXImageMapLink> AXImageMapLink::create(AXObjectCacheImpl& axObjectCache)
58 { 67 {
59 return adoptRef(new AXImageMapLink(axObjectCache)); 68 return adoptRefWillBeNoop(new AXImageMapLink(axObjectCache));
60 } 69 }
61 70
62 AXObject* AXImageMapLink::computeParent() const 71 AXObject* AXImageMapLink::computeParent() const
63 { 72 {
64 if (m_parent) 73 if (m_parent)
65 return m_parent; 74 return m_parent;
66 75
67 if (!m_mapElement.get() || !m_mapElement->layoutObject()) 76 if (!m_mapElement.get() || !m_mapElement->layoutObject())
68 return 0; 77 return 0;
69 78
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 layoutObject = toAXLayoutObject(m_parent)->layoutObject(); 143 layoutObject = toAXLayoutObject(m_parent)->layoutObject();
135 else 144 else
136 layoutObject = m_mapElement->layoutObject(); 145 layoutObject = m_mapElement->layoutObject();
137 146
138 if (!layoutObject) 147 if (!layoutObject)
139 return LayoutRect(); 148 return LayoutRect();
140 149
141 return m_areaElement->computeRect(layoutObject); 150 return m_areaElement->computeRect(layoutObject);
142 } 151 }
143 152
153 DEFINE_TRACE(AXImageMapLink)
154 {
155 visitor->trace(m_areaElement);
156 visitor->trace(m_mapElement);
157 AXMockObject::trace(visitor);
158 }
159
144 } // namespace blink 160 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/accessibility/AXImageMapLink.h ('k') | Source/modules/accessibility/AXInlineTextBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698