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

Side by Side Diff: third_party/WebKit/Source/core/layout/HitTestResult.cpp

Issue 1850183003: Round out WillBe type removal. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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) 2006, 2008, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2008, 2011 Apple Inc. All rights reserved.
3 * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies)
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 , m_cacheable(other.m_cacheable) 90 , m_cacheable(other.m_cacheable)
91 , m_innerNode(other.innerNode()) 91 , m_innerNode(other.innerNode())
92 , m_innerPossiblyPseudoNode(other.m_innerPossiblyPseudoNode) 92 , m_innerPossiblyPseudoNode(other.m_innerPossiblyPseudoNode)
93 , m_pointInInnerNodeFrame(other.m_pointInInnerNodeFrame) 93 , m_pointInInnerNodeFrame(other.m_pointInInnerNodeFrame)
94 , m_localPoint(other.localPoint()) 94 , m_localPoint(other.localPoint())
95 , m_innerURLElement(other.URLElement()) 95 , m_innerURLElement(other.URLElement())
96 , m_scrollbar(other.scrollbar()) 96 , m_scrollbar(other.scrollbar())
97 , m_isOverWidget(other.isOverWidget()) 97 , m_isOverWidget(other.isOverWidget())
98 { 98 {
99 // Only copy the NodeSet in case of list hit test. 99 // Only copy the NodeSet in case of list hit test.
100 m_listBasedTestResult = adoptPtrWillBeNoop(other.m_listBasedTestResult ? new NodeSet(*other.m_listBasedTestResult) : 0); 100 m_listBasedTestResult = other.m_listBasedTestResult ? new NodeSet(*other.m_l istBasedTestResult) : nullptr;
101 } 101 }
102 102
103 HitTestResult::~HitTestResult() 103 HitTestResult::~HitTestResult()
104 { 104 {
105 } 105 }
106 106
107 HitTestResult& HitTestResult::operator=(const HitTestResult& other) 107 HitTestResult& HitTestResult::operator=(const HitTestResult& other)
108 { 108 {
109 m_hitTestLocation = other.m_hitTestLocation; 109 m_hitTestLocation = other.m_hitTestLocation;
110 m_hitTestRequest = other.m_hitTestRequest; 110 m_hitTestRequest = other.m_hitTestRequest;
(...skipping 25 matching lines...) Expand all
136 m_innerNode = other.innerNode(); 136 m_innerNode = other.innerNode();
137 m_innerPossiblyPseudoNode = other.innerPossiblyPseudoNode(); 137 m_innerPossiblyPseudoNode = other.innerPossiblyPseudoNode();
138 m_pointInInnerNodeFrame = other.m_pointInInnerNodeFrame; 138 m_pointInInnerNodeFrame = other.m_pointInInnerNodeFrame;
139 m_localPoint = other.localPoint(); 139 m_localPoint = other.localPoint();
140 m_innerURLElement = other.URLElement(); 140 m_innerURLElement = other.URLElement();
141 m_scrollbar = other.scrollbar(); 141 m_scrollbar = other.scrollbar();
142 m_isOverWidget = other.isOverWidget(); 142 m_isOverWidget = other.isOverWidget();
143 m_cacheable = other.m_cacheable; 143 m_cacheable = other.m_cacheable;
144 144
145 // Only copy the NodeSet in case of list hit test. 145 // Only copy the NodeSet in case of list hit test.
146 m_listBasedTestResult = adoptPtrWillBeNoop(other.m_listBasedTestResult ? new NodeSet(*other.m_listBasedTestResult) : 0); 146 m_listBasedTestResult = other.m_listBasedTestResult ? new NodeSet(*other.m_l istBasedTestResult) : nullptr;
147 } 147 }
148 148
149 DEFINE_TRACE(HitTestResult) 149 DEFINE_TRACE(HitTestResult)
150 { 150 {
151 visitor->trace(m_innerNode); 151 visitor->trace(m_innerNode);
152 visitor->trace(m_innerPossiblyPseudoNode); 152 visitor->trace(m_innerPossiblyPseudoNode);
153 visitor->trace(m_innerURLElement); 153 visitor->trace(m_innerURLElement);
154 visitor->trace(m_scrollbar); 154 visitor->trace(m_scrollbar);
155 #if ENABLE(OILPAN)
156 visitor->trace(m_listBasedTestResult); 155 visitor->trace(m_listBasedTestResult);
157 #endif
158 } 156 }
159 157
160 PositionWithAffinity HitTestResult::position() const 158 PositionWithAffinity HitTestResult::position() const
161 { 159 {
162 if (!m_innerPossiblyPseudoNode) 160 if (!m_innerPossiblyPseudoNode)
163 return PositionWithAffinity(); 161 return PositionWithAffinity();
164 LayoutObject* layoutObject = this->layoutObject(); 162 LayoutObject* layoutObject = this->layoutObject();
165 if (!layoutObject) 163 if (!layoutObject)
166 return PositionWithAffinity(); 164 return PositionWithAffinity();
167 if (m_innerPossiblyPseudoNode->isPseudoElement() && m_innerPossiblyPseudoNod e->getPseudoId() == PseudoIdBefore) 165 if (m_innerPossiblyPseudoNode->isPseudoElement() && m_innerPossiblyPseudoNod e->getPseudoId() == PseudoIdBefore)
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
542 else if (isHTMLMapElement(m_innerNode)) 540 else if (isHTMLMapElement(m_innerNode))
543 imageMapImageElement = toHTMLMapElement(m_innerNode)->imageElement(); 541 imageMapImageElement = toHTMLMapElement(m_innerNode)->imageElement();
544 542
545 if (!imageMapImageElement) 543 if (!imageMapImageElement)
546 return m_innerNode.get(); 544 return m_innerNode.get();
547 545
548 return imageMapImageElement; 546 return imageMapImageElement;
549 } 547 }
550 548
551 } // namespace blink 549 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/ElementData.cpp ('k') | third_party/WebKit/Source/platform/heap/HeapTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698