Changeset 99755 in webkit
- Timestamp:
- Nov 9, 2011 1:18:44 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r99754 r99755 1 2011-11-09 Anders Carlsson <andersca@apple.com> 2 3 Use contentsToRootView/rootViewToContents when converting between frame coordinate systems 4 https://bugs.webkit.org/show_bug.cgi?id=71947 5 6 Reviewed by Sam Weinig. 7 8 This gets rid of a few calls to contentsToWindow and windowToContents. 9 10 * inspector/DOMNodeHighlighter.cpp: 11 * page/DragController.cpp: 12 (WebCore::DragController::startDrag): 13 (WebCore::DragController::doSystemDrag): 14 * page/EventHandler.cpp: 15 (WebCore::EventHandler::hitTestResultAtPoint): 16 1 17 2011-11-09 Mark Hahnenberg <mhahnenberg@apple.com> 2 18 -
trunk/Source/WebCore/inspector/DOMNodeHighlighter.cpp
r97949 r99755 145 145 inline LayoutSize frameToMainFrameOffset(Frame* frame) 146 146 { 147 LayoutPoint mainFramePoint = frame->page()->mainFrame()->view()-> windowToContents(frame->view()->contentsToWindow(LayoutPoint()));147 LayoutPoint mainFramePoint = frame->page()->mainFrame()->view()->rootViewToContents(frame->view()->contentsToRootView(LayoutPoint())); 148 148 return toLayoutSize(mainFramePoint); 149 149 } -
trunk/Source/WebCore/page/DragController.cpp
r99539 r99755 783 783 if (!dragImage) { 784 784 IntRect imageRect = hitTestResult.imageRect(); 785 imageRect.setLocation(m_page->mainFrame()->view()-> windowToContents(src->view()->contentsToWindow(imageRect.location())));785 imageRect.setLocation(m_page->mainFrame()->view()->rootViewToContents(src->view()->contentsToRootView(imageRect.location()))); 786 786 doImageDrag(element, dragOrigin, hitTestResult.imageRect(), clipboard, src, m_dragOffset); 787 787 } else … … 875 875 RefPtr<Frame> frameProtector = m_page->mainFrame(); 876 876 RefPtr<FrameView> viewProtector = frameProtector->view(); 877 m_client->startDrag(image, viewProtector-> windowToContents(frame->view()->contentsToWindow(dragLoc)),878 viewProtector-> windowToContents(frame->view()->contentsToWindow(eventPos)), clipboard, frameProtector.get(), forLink);877 m_client->startDrag(image, viewProtector->rootViewToContents(frame->view()->contentsToRootView(dragLoc)), 878 viewProtector->rootViewToContents(frame->view()->contentsToRootView(eventPos)), clipboard, frameProtector.get(), forLink); 879 879 880 880 cleanupAfterSystemDrag(); -
trunk/Source/WebCore/page/EventHandler.cpp
r99667 r99755 976 976 FrameView* mainView = mainFrame->view(); 977 977 if (resultView && mainView) { 978 LayoutPoint windowPoint = resultView->contentsToWindow(result.point()); 979 LayoutPoint mainFramePoint = mainView->windowToContents(windowPoint); 978 LayoutPoint mainFramePoint = mainView->rootViewToContents(resultView->contentsToRootView(result.point())); 980 979 result = mainFrame->eventHandler()->hitTestResultAtPoint(mainFramePoint, allowShadowContent, ignoreClipping, testScrollbars, hitType, padding); 981 980 }
Note: See TracChangeset
for help on using the changeset viewer.