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::populateFromCachedResult(const HitTestResult& other) { 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(); m_cacheable = other.m_cacheable; // Only copy the NodeSet in case of list hit test. m_listBasedTestResult = adoptPtrWillBeNoop(other.m_listBasedTestResult ? new NodeSet(*other.m_listBasedTestResult) : 0); }
void HitTestResult::append(const HitTestResult& other) { ASSERT(isRectBasedTest() && other.isRectBasedTest()); if (!m_innerNode && other.innerNode()) { m_innerNode = other.innerNode(); m_innerPossiblyPseudoNode = other.innerPossiblyPseudoNode(); m_innerNonSharedNode = other.innerNonSharedNode(); m_localPoint = other.localPoint(); m_pointInInnerNodeFrame = other.m_pointInInnerNodeFrame; } if (other.m_rectBasedTestResult) { NodeSet& set = mutableRectBasedTestResult(); for (NodeSet::const_iterator it = other.m_rectBasedTestResult->begin(), last = other.m_rectBasedTestResult->end(); it != last; ++it) set.add(it->get()); } }
void HitTestResult::append(const HitTestResult& other) { ASSERT(hitTestRequest().listBased()); if (!m_scrollbar && other.scrollbar()) { setScrollbar(other.scrollbar()); } if (!m_innerNode && other.innerNode()) { m_innerNode = other.innerNode(); m_innerPossiblyPseudoNode = other.innerPossiblyPseudoNode(); m_localPoint = other.localPoint(); m_pointInInnerNodeFrame = other.m_pointInInnerNodeFrame; m_innerURLElement = other.URLElement(); m_isOverWidget = other.isOverWidget(); } if (other.m_listBasedTestResult) { NodeSet& set = mutableListBasedTestResult(); for (NodeSet::const_iterator it = other.m_listBasedTestResult->begin(), last = other.m_listBasedTestResult->end(); it != last; ++it) set.add(it->get()); } }