Bug 25926

Summary: Clean up DragController
Product: WebKit Reporter: Eric Seidel (no email) <eric>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: oliver
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   
Attachments:
Description Flags
Clean up DragController
none
Clean up DragController ap: review+

Description Eric Seidel (no email) 2009-05-21 06:39:12 PDT
Clean up DragController

Looking at DragController this evening to fix a few bugs I was confused by m_document.  I'm no longer confused by it now that I've renamed it to m_documentUnderMouse.

I also saw copy/paste code involving clearing the selection when moving out of one document and into another.  I moved that code into a function called mouseMovedIntoDocument.

I also got rid of a couple needless null-checks after confirming via source inspection they were not ever possible.
Comment 1 Eric Seidel (no email) 2009-05-21 06:43:38 PDT
Created attachment 30542 [details]
Clean up DragController

 3 files changed, 82 insertions(+), 48 deletions(-)
Comment 2 Eric Seidel (no email) 2009-05-21 06:47:00 PDT
Created attachment 30543 [details]
Clean up DragController

 4 files changed, 86 insertions(+), 51 deletions(-)
Comment 3 Alexey Proskuryakov 2009-05-21 07:00:14 PDT
Comment on attachment 30543 [details]
Clean up DragController

r=me with some trivial comments over IRC.
Comment 4 Eric Seidel (no email) 2009-05-21 07:05:48 PDT
Committing to http://svn.webkit.org/repository/webkit/trunk ...
	M	WebCore/ChangeLog
	M	WebCore/page/DragController.cpp
	M	WebCore/page/DragController.h
	M	WebCore/page/mac/DragControllerMac.mm
Committed r43968

Hopefully future readers of DragController.cpp will find it easier to understand now. :)