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

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

Issue 2650403006: Remove PlatformMouseEvent and use WebMouseEvent instead (Closed)
Patch Set: Created 3 years, 10 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 HitTestResult::HitTestResult(const HitTestResult& other) 85 HitTestResult::HitTestResult(const HitTestResult& other)
86 : m_hitTestLocation(other.m_hitTestLocation), 86 : m_hitTestLocation(other.m_hitTestLocation),
87 m_hitTestRequest(other.m_hitTestRequest), 87 m_hitTestRequest(other.m_hitTestRequest),
88 m_cacheable(other.m_cacheable), 88 m_cacheable(other.m_cacheable),
89 m_innerNode(other.innerNode()), 89 m_innerNode(other.innerNode()),
90 m_innerPossiblyPseudoNode(other.m_innerPossiblyPseudoNode), 90 m_innerPossiblyPseudoNode(other.m_innerPossiblyPseudoNode),
91 m_pointInInnerNodeFrame(other.m_pointInInnerNodeFrame), 91 m_pointInInnerNodeFrame(other.m_pointInInnerNodeFrame),
92 m_localPoint(other.localPoint()), 92 m_localPoint(other.localPoint()),
93 m_innerURLElement(other.URLElement()), 93 m_innerURLElement(other.URLElement()),
94 m_scrollbar(other.scrollbar()), 94 m_scrollbar(other.scrollbar()),
95 m_isOverWidget(other.isOverWidget()) { 95 m_isOverWidget(other.isOverWidget()),
96 m_canvasRegionId(other.canvasRegionId()) {
96 // Only copy the NodeSet in case of list hit test. 97 // Only copy the NodeSet in case of list hit test.
97 m_listBasedTestResult = other.m_listBasedTestResult 98 m_listBasedTestResult = other.m_listBasedTestResult
98 ? new NodeSet(*other.m_listBasedTestResult) 99 ? new NodeSet(*other.m_listBasedTestResult)
99 : nullptr; 100 : nullptr;
100 } 101 }
101 102
102 HitTestResult::~HitTestResult() {} 103 HitTestResult::~HitTestResult() {}
103 104
104 HitTestResult& HitTestResult::operator=(const HitTestResult& other) { 105 HitTestResult& HitTestResult::operator=(const HitTestResult& other) {
105 m_hitTestLocation = other.m_hitTestLocation; 106 m_hitTestLocation = other.m_hitTestLocation;
(...skipping 22 matching lines...) Expand all
128 129
129 void HitTestResult::populateFromCachedResult(const HitTestResult& other) { 130 void HitTestResult::populateFromCachedResult(const HitTestResult& other) {
130 m_innerNode = other.innerNode(); 131 m_innerNode = other.innerNode();
131 m_innerPossiblyPseudoNode = other.innerPossiblyPseudoNode(); 132 m_innerPossiblyPseudoNode = other.innerPossiblyPseudoNode();
132 m_pointInInnerNodeFrame = other.m_pointInInnerNodeFrame; 133 m_pointInInnerNodeFrame = other.m_pointInInnerNodeFrame;
133 m_localPoint = other.localPoint(); 134 m_localPoint = other.localPoint();
134 m_innerURLElement = other.URLElement(); 135 m_innerURLElement = other.URLElement();
135 m_scrollbar = other.scrollbar(); 136 m_scrollbar = other.scrollbar();
136 m_isOverWidget = other.isOverWidget(); 137 m_isOverWidget = other.isOverWidget();
137 m_cacheable = other.m_cacheable; 138 m_cacheable = other.m_cacheable;
139 m_canvasRegionId = other.canvasRegionId();
138 140
139 // Only copy the NodeSet in case of list hit test. 141 // Only copy the NodeSet in case of list hit test.
140 m_listBasedTestResult = other.m_listBasedTestResult 142 m_listBasedTestResult = other.m_listBasedTestResult
141 ? new NodeSet(*other.m_listBasedTestResult) 143 ? new NodeSet(*other.m_listBasedTestResult)
142 : nullptr; 144 : nullptr;
143 } 145 }
144 146
145 DEFINE_TRACE(HitTestResult) { 147 DEFINE_TRACE(HitTestResult) {
146 visitor->trace(m_innerNode); 148 visitor->trace(m_innerNode);
147 visitor->trace(m_innerPossiblyPseudoNode); 149 visitor->trace(m_innerPossiblyPseudoNode);
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 setScrollbar(other.scrollbar()); 433 setScrollbar(other.scrollbar());
432 } 434 }
433 435
434 if (!m_innerNode && other.innerNode()) { 436 if (!m_innerNode && other.innerNode()) {
435 m_innerNode = other.innerNode(); 437 m_innerNode = other.innerNode();
436 m_innerPossiblyPseudoNode = other.innerPossiblyPseudoNode(); 438 m_innerPossiblyPseudoNode = other.innerPossiblyPseudoNode();
437 m_localPoint = other.localPoint(); 439 m_localPoint = other.localPoint();
438 m_pointInInnerNodeFrame = other.m_pointInInnerNodeFrame; 440 m_pointInInnerNodeFrame = other.m_pointInInnerNodeFrame;
439 m_innerURLElement = other.URLElement(); 441 m_innerURLElement = other.URLElement();
440 m_isOverWidget = other.isOverWidget(); 442 m_isOverWidget = other.isOverWidget();
443 m_canvasRegionId = other.canvasRegionId();
441 } 444 }
442 445
443 if (other.m_listBasedTestResult) { 446 if (other.m_listBasedTestResult) {
444 NodeSet& set = mutableListBasedTestResult(); 447 NodeSet& set = mutableListBasedTestResult();
445 for (NodeSet::const_iterator it = other.m_listBasedTestResult->begin(), 448 for (NodeSet::const_iterator it = other.m_listBasedTestResult->begin(),
446 last = other.m_listBasedTestResult->end(); 449 last = other.m_listBasedTestResult->end();
447 it != last; ++it) 450 it != last; ++it)
448 set.add(it->get()); 451 set.add(it->get());
449 } 452 }
450 } 453 }
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 else if (isHTMLMapElement(m_innerNode)) 503 else if (isHTMLMapElement(m_innerNode))
501 imageMapImageElement = toHTMLMapElement(m_innerNode)->imageElement(); 504 imageMapImageElement = toHTMLMapElement(m_innerNode)->imageElement();
502 505
503 if (!imageMapImageElement) 506 if (!imageMapImageElement)
504 return m_innerNode.get(); 507 return m_innerNode.get();
505 508
506 return imageMapImageElement; 509 return imageMapImageElement;
507 } 510 }
508 511
509 } // namespace blink 512 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698