Chromium Code Reviews| Index: Source/core/layout/HitTestResult.cpp |
| diff --git a/Source/core/layout/HitTestResult.cpp b/Source/core/layout/HitTestResult.cpp |
| index bba10d29df7bc7dfc008fb80cd292193efb530ab..7c02ae6f0c882d70558b13062727590e074bbc68 100644 |
| --- a/Source/core/layout/HitTestResult.cpp |
| +++ b/Source/core/layout/HitTestResult.cpp |
| @@ -85,6 +85,7 @@ HitTestResult::HitTestResult(const HitTestRequest& otherRequest, const HitTestLo |
| HitTestResult::HitTestResult(const HitTestResult& other) |
| : m_hitTestLocation(other.m_hitTestLocation) |
| , m_hitTestRequest(other.m_hitTestRequest) |
| + , m_cacheable(other.m_cacheable) |
|
Rick Byers
2015/06/25 20:58:27
was this an unrelated bug?
dtapuska
2015/06/25 21:01:33
Yes it was; this constructor isn't used in the cod
|
| , m_innerNode(other.innerNode()) |
| , m_innerPossiblyPseudoNode(other.m_innerPossiblyPseudoNode) |
| , m_pointInInnerNodeFrame(other.m_pointInInnerNodeFrame) |
| @@ -110,6 +111,18 @@ HitTestResult& HitTestResult::operator=(const HitTestResult& other) |
| return *this; |
| } |
| +unsigned HitTestResult::equalityScore(const HitTestResult& other) const |
| +{ |
| + return (m_hitTestRequest.equalForCacheability(other.m_hitTestRequest) << 7) |
| + | ((m_innerNode == other.innerNode()) << 6) |
| + | ((m_innerPossiblyPseudoNode == other.innerPossiblyPseudoNode()) << 5) |
| + | ((m_pointInInnerNodeFrame == other.m_pointInInnerNodeFrame) << 4) |
| + | ((m_localPoint == other.localPoint()) << 3) |
| + | ((m_innerURLElement == other.URLElement()) << 2) |
| + | ((m_scrollbar == other.scrollbar()) << 1) |
| + | (m_isOverWidget == other.isOverWidget()); |
| +} |
| + |
| bool HitTestResult::equalForCacheability(const HitTestResult& other) const |
| { |
| return m_hitTestRequest.equalForCacheability(other.m_hitTestRequest) |