Bug 136819

Summary: Move DragController::createFragmentFromDragData implementation to the editor
Product: WebKit Reporter: Carlos Garcia Campos <cgarcia>
Component: PlatformAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: darin
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 136802    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Updated patch
none
Try to fix windows build
none
Try to fix EFL build
darin: review+
Patch for landing none

Description Carlos Garcia Campos 2014-09-15 05:02:39 PDT
And use the editor from the DragController instead.
Comment 1 Carlos Garcia Campos 2014-09-15 05:09:06 PDT
Created attachment 238117 [details]
Patch
Comment 2 Carlos Garcia Campos 2014-09-17 00:24:27 PDT
Created attachment 238239 [details]
Updated patch

Rebased, it should apply now
Comment 3 Carlos Garcia Campos 2014-09-17 01:19:13 PDT
Created attachment 238240 [details]
Try to fix windows build
Comment 4 Carlos Garcia Campos 2014-09-17 02:03:10 PDT
Created attachment 238243 [details]
Try to fix EFL build
Comment 5 Carlos Garcia Campos 2014-09-29 00:32:29 PDT
Ping :-)
Comment 6 Darin Adler 2014-10-03 09:05:46 PDT
Comment on attachment 238243 [details]
Try to fix EFL build

View in context: https://bugs.webkit.org/attachment.cgi?id=238243&action=review

A good step in the right direction. I suspect we can keep refactoring this to make the code even tighter over time.

> Source/WebCore/editing/win/EditorWin.cpp:51
> +template <typename PlatformDragData>
> +static PassRefPtr<DocumentFragment> createFragmentFromPlatformData(PlatformDragData* platformDragData, Frame& frame)

Should take PlatformDragData& instead of PlatformDragData*.

I’m also surprised this needs to be a template. Are all four functions called here really overloaded for two different types!?
Comment 7 Carlos Garcia Campos 2014-10-03 09:18:44 PDT
(In reply to comment #6)
> (From update of attachment 238243 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=238243&action=review
> 
> A good step in the right direction. I suspect we can keep refactoring this to make the code even tighter over time.

Thanks for the review.

> > Source/WebCore/editing/win/EditorWin.cpp:51
> > +template <typename PlatformDragData>
> > +static PassRefPtr<DocumentFragment> createFragmentFromPlatformData(PlatformDragData* platformDragData, Frame& frame)
> 
> Should take PlatformDragData& instead of PlatformDragData*.

Sure.

> I’m also surprised this needs to be a template. Are all four functions called here really overloaded for two different types!?

Yes.
Comment 8 Carlos Garcia Campos 2014-10-04 00:44:26 PDT
Created attachment 239271 [details]
Patch for landing

Not sure the windows changes are correct...
Comment 9 Carlos Garcia Campos 2014-10-04 01:38:09 PDT
Committed r174314: <http://trac.webkit.org/changeset/174314>