bool TextureMapperLayer::scrollableLayerHitTestCondition(TextureMapperLayer* layer, const FloatPoint& point) { // scrolling layer's m_parent->m_parent, the parent of the scrolling layes, is the one that defines the // rectangle to be used for hit testing. if (!layer->isScrollable() || !layer->m_parent || !layer->m_parent->m_parent) return false; TextureMapperLayer* parentLayer = layer->m_parent->m_parent; FloatRect rect = parentLayer->layerRect(); return parentLayer->m_currentTransform.combined().mapQuad(rect).containsPoint(point); }