| Index: Source/core/layout/HitTestResult.cpp
|
| diff --git a/Source/core/layout/HitTestResult.cpp b/Source/core/layout/HitTestResult.cpp
|
| index 84e6dc112d581cd23546e2c4f697da907183033d..83690358f760063f492084f24189d65037c335e0 100644
|
| --- a/Source/core/layout/HitTestResult.cpp
|
| +++ b/Source/core/layout/HitTestResult.cpp
|
| @@ -101,6 +101,31 @@ HitTestResult& HitTestResult::operator=(const HitTestResult& other)
|
| {
|
| m_hitTestLocation = other.m_hitTestLocation;
|
| m_hitTestRequest = other.m_hitTestRequest;
|
| + populateFromCachedResult(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;
|
| +}
|
| +
|
| +void HitTestResult::populateFromCachedResult(const HitTestResult& other)
|
| +{
|
| m_innerNode = other.innerNode();
|
| m_innerPossiblyPseudoNode = other.innerPossiblyPseudoNode();
|
| m_pointInInnerNodeFrame = other.m_pointInInnerNodeFrame;
|
| @@ -108,11 +133,10 @@ 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);
|
| -
|
| - return *this;
|
| }
|
|
|
| DEFINE_TRACE(HitTestResult)
|
| @@ -219,6 +243,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;
|
|
|