-
hyatt authored
Rework positionForCoordinates to be more efficient and to handle multi-column content. This entailed adding a new field to HitTestResult called localPoint that cached the mouse coordinate in the coordinate space of the renderer. positionForCoordinates now takes local coordinates and so no longer needs to waste time recomputing absolute positions over and over again. Reviewed by darin * bridge/mac/WebCoreAXObject.mm: (-[WebCoreAXObject value]): (-[WebCoreAXObject doAXTextMarkerRangeForLine:]): (-[WebCoreAXObject doAXTextMarkerForPosition:]): * dom/Document.cpp: (WebCore::Document::prepareMouseEvent): * editing/SelectionController.cpp: (WebCore::SelectionController::contains): * editing/visible_units.cpp: (WebCore::previousLinePosition): (WebCore::nextLinePosition): * page/EventHandler.cpp: (WebCore::EventHandler::selectClosestWordFromMouseEvent): (WebCore::EventHandler::handleMousePressEventDoubleClick): (WebCore::EventHandler::handleMousePressEventTripleClick): (WebCore::EventHandler::handleMousePressEventSingleClick): (WebCore::EventHandler::handleMouseMoveEvent): (WebCore::EventHandler::handleMouseReleaseEvent): (WebCore::EventHandler::sendContextMenuEvent): * page/EventHandler.h: * page/MouseEventWithHitTestResults.cpp: (WebCore::MouseEventWithHitTestResults::MouseEventWithHitTestResults): * page/MouseEventWithHitTestResults.h: (WebCore::MouseEventWithHitTestResults::localPoint): * page/mac/WebCoreFrameBridge.mm: (-[WebCoreFrameBridge _visiblePositionForPoint:]): * rendering/EllipsisBox.cpp: (WebCore::EllipsisBox::nodeAtPoint): * rendering/HitTestResult.h: (WebCore::HitTestResult::localPoint): (WebCore::HitTestResult::setLocalPoint): * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::nodeAtPoint): * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::nodeAtPoint): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::nodeAtPoint): (WebCore::RenderBlock::hitTestContents): (WebCore::RenderBlock::positionForCoordinates): * rendering/RenderBox.cpp: (WebCore::RenderBox::nodeAtPoint): * rendering/RenderContainer.cpp: (WebCore::RenderContainer::positionForCoordinates): * rendering/RenderFlow.cpp: (WebCore::RenderFlow::hitTestLines): * rendering/RenderInline.cpp: (WebCore::RenderInline::positionForCoordinates): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::autoscroll): (WebCore::RenderLayer::hitTestLayer): * rendering/RenderObject.cpp: (WebCore::RenderObject::updateHitTestResult): * rendering/RenderObject.h: * rendering/RenderPath.cpp: (WebCore::RenderPath::nodeAtPoint): * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::positionForCoordinates): * rendering/RenderTableRow.cpp: (WebCore::RenderTableRow::nodeAtPoint): * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::nodeAtPoint): * rendering/RenderText.cpp: (WebCore::RenderText::positionForCoordinates): * rendering/RootInlineBox.cpp: (WebCore::RootInlineBox::nodeAtPoint): (WebCore::RootInlineBox::closestLeafChildForXPos): * rendering/RootInlineBox.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@18758 268f45cc-cd09-0410-ab3c-d52691b4dbfc
6a2ac52c