Index: Source/core/layout/HitTestResult.cpp |
diff --git a/Source/core/layout/HitTestResult.cpp b/Source/core/layout/HitTestResult.cpp |
index 526b62251bedabe4ade35baa441731b865cd72f8..cc5c22bf32775b652327aa7ff02075221058f886 100644 |
--- a/Source/core/layout/HitTestResult.cpp |
+++ b/Source/core/layout/HitTestResult.cpp |
@@ -108,6 +108,7 @@ HitTestResult& HitTestResult::operator=(const HitTestResult& other) |
m_innerURLElement = other.URLElement(); |
m_scrollbar = other.scrollbar(); |
m_isOverWidget = other.isOverWidget(); |
+ m_validityRect = other.m_validityRect; |
// Only copy the NodeSet in case of list hit test. |
m_listBasedTestResult = adoptPtrWillBeNoop(other.m_listBasedTestResult ? new NodeSet(*other.m_listBasedTestResult) : 0); |
@@ -115,6 +116,24 @@ HitTestResult& HitTestResult::operator=(const HitTestResult& other) |
return *this; |
} |
+bool HitTestResult::equalForCacheability(const HitTestResult& other) const |
+{ |
+ return m_hitTestRequest.equalForCacheability(other.m_hitTestRequest) |
+ && m_innerNode == other.innerNode() |
+ && m_innerPossiblyPseudoNode == other.innerPossiblyPseudoNode() |
+ && m_pointInInnerNodeFrame == other.m_pointInInnerNodeFrame |
+ && m_localPoint == other.localPoint() |
+ && m_innerURLElement == other.URLElement() |
+ && m_scrollbar == other.scrollbar() |
+ && m_isOverWidget == other.isOverWidget(); |
+} |
+ |
+void HitTestResult::cacheValues(const HitTestResult& other) |
+{ |
+ *this = other; |
+ m_hitTestRequest = other.m_hitTestRequest.type() & ~HitTestRequest::AvoidCache; |
+} |
+ |
DEFINE_TRACE(HitTestResult) |
{ |
visitor->trace(m_innerNode); |
@@ -219,6 +238,12 @@ bool HitTestResult::isSelected() const |
return false; |
} |
+void HitTestResult::setValidityRect(const LayoutRect& rect) |
+{ |
+ ASSERT(!rect.isEmpty()); |
+ m_validityRect = rect; |
+} |
+ |
String HitTestResult::spellingToolTip(TextDirection& dir) const |
{ |
dir = LTR; |