| OLD | NEW |
| 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 | 104 |
| 105 HitTestResult& HitTestResult::operator=(const HitTestResult& other) | 105 HitTestResult& HitTestResult::operator=(const HitTestResult& other) |
| 106 { | 106 { |
| 107 m_hitTestLocation = other.m_hitTestLocation; | 107 m_hitTestLocation = other.m_hitTestLocation; |
| 108 m_hitTestRequest = other.m_hitTestRequest; | 108 m_hitTestRequest = other.m_hitTestRequest; |
| 109 populateFromCachedResult(other); | 109 populateFromCachedResult(other); |
| 110 | 110 |
| 111 return *this; | 111 return *this; |
| 112 } | 112 } |
| 113 | 113 |
| 114 unsigned HitTestResult::equalityScore(const HitTestResult& other) const | |
| 115 { | |
| 116 return (m_hitTestRequest.equalForCacheability(other.m_hitTestRequest) << 7) | |
| 117 | ((m_innerNode == other.innerNode()) << 6) | |
| 118 | ((m_innerPossiblyPseudoNode == other.innerPossiblyPseudoNode()) << 5) | |
| 119 | ((m_pointInInnerNodeFrame == other.m_pointInInnerNodeFrame) << 4) | |
| 120 | ((m_localPoint == other.localPoint()) << 3) | |
| 121 | ((m_innerURLElement == other.URLElement()) << 2) | |
| 122 | ((m_scrollbar == other.scrollbar()) << 1) | |
| 123 | (m_isOverWidget == other.isOverWidget()); | |
| 124 } | |
| 125 | |
| 126 bool HitTestResult::equalForCacheability(const HitTestResult& other) const | 114 bool HitTestResult::equalForCacheability(const HitTestResult& other) const |
| 127 { | 115 { |
| 128 return m_hitTestRequest.equalForCacheability(other.m_hitTestRequest) | 116 return m_hitTestRequest.equalForCacheability(other.m_hitTestRequest) |
| 129 && m_innerNode == other.innerNode() | 117 && m_innerNode == other.innerNode() |
| 130 && m_innerPossiblyPseudoNode == other.innerPossiblyPseudoNode() | 118 && m_innerPossiblyPseudoNode == other.innerPossiblyPseudoNode() |
| 131 && m_pointInInnerNodeFrame == other.m_pointInInnerNodeFrame | 119 && m_pointInInnerNodeFrame == other.m_pointInInnerNodeFrame |
| 132 && m_localPoint == other.localPoint() | 120 && m_localPoint == other.localPoint() |
| 133 && m_innerURLElement == other.URLElement() | 121 && m_innerURLElement == other.URLElement() |
| 134 && m_scrollbar == other.scrollbar() | 122 && m_scrollbar == other.scrollbar() |
| 135 && m_isOverWidget == other.isOverWidget(); | 123 && m_isOverWidget == other.isOverWidget(); |
| (...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 535 else if (isHTMLMapElement(m_innerNode)) | 523 else if (isHTMLMapElement(m_innerNode)) |
| 536 imageMapImageElement = toHTMLMapElement(m_innerNode)->imageElement(); | 524 imageMapImageElement = toHTMLMapElement(m_innerNode)->imageElement(); |
| 537 | 525 |
| 538 if (!imageMapImageElement) | 526 if (!imageMapImageElement) |
| 539 return m_innerNode.get(); | 527 return m_innerNode.get(); |
| 540 | 528 |
| 541 return imageMapImageElement; | 529 return imageMapImageElement; |
| 542 } | 530 } |
| 543 | 531 |
| 544 } // namespace blink | 532 } // namespace blink |
| OLD | NEW |