Bug 169805 - [WK1] Support animated transitions when performing a data interaction operation
Summary: [WK1] Support animated transitions when performing a data interaction operation
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Wenson Hsieh
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-03-16 20:28 PDT by Wenson Hsieh
Modified: 2017-03-17 15:38 PDT (History)
5 users (show)

See Also:


Attachments
First pass (17.25 KB, patch)
2017-03-16 21:22 PDT, Wenson Hsieh
no flags Details | Formatted Diff | Diff
Fix OpenSource build (17.54 KB, patch)
2017-03-17 09:01 PDT, Wenson Hsieh
no flags Details | Formatted Diff | Diff
Fix OpenSource iOS builds (17.66 KB, patch)
2017-03-17 09:47 PDT, Wenson Hsieh
bdakin: review+
Details | Formatted Diff | Diff
Patch for landing (17.62 KB, patch)
2017-03-17 11:50 PDT, Wenson Hsieh
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Wenson Hsieh 2017-03-16 20:28:34 PDT
Support animated transitions when performing a data interaction operation in a WK1 web view.
Comment 1 Wenson Hsieh 2017-03-16 21:08:30 PDT
<rdar://problem/31045767>
Comment 2 Wenson Hsieh 2017-03-16 21:22:25 PDT
Created attachment 304751 [details]
First pass
Comment 3 Megan Gardner 2017-03-17 02:33:01 PDT
Comment on attachment 304751 [details]
First pass

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

> Source/WebKit/mac/WebCoreSupport/WebDragClient.h:52
>  private:

Is this change needed, the implementations are empty.

> Source/WebKit/mac/WebCoreSupport/WebDragClient.mm:82
> +

empty implementations, do these belong in this patch?

> Source/WebKit/mac/WebCoreSupport/WebDragClient.mm:196
> +

empty implementations, do these belong in this patch?

> Source/WebKit/mac/WebView/WebView.mm:669
> +            _contentImageWithoutSelectionRectInRootViewCoordinates = indicatorData.contentImageWithoutSelectionRectInRootViewCoordinates;

retain here, also release this and _contentImageWithoutSelection in dealloc.

> Source/WebKit/mac/WebView/WebView.mm:1912
>  #endif // ENABLE(DATA_INTERACTION) && defined(__cplusplus)

empty method? what is it used for?

> Source/WebKit/mac/WebView/WebViewData.h:292
>  #endif

is this the best way to transfer this data?

> Source/WebKit/mac/WebView/WebViewInternal.h:262
>  #endif

The implementation is empty, is this used?

> Source/WebKit/mac/WebView/WebViewPrivate.h:-59
> -

Make sure that this removed from where it is needed first, so as to not cause code to stop compiling.

> Source/WebKit/mac/WebView/WebViewPrivate.h:194
>  @end

Is everything above being used? Can we re-purpose some of the existing properties?
Comment 4 Wenson Hsieh 2017-03-17 08:36:44 PDT
Comment on attachment 304751 [details]
First pass

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

>> Source/WebKit/mac/WebCoreSupport/WebDragClient.h:52
>>  private:
> 
> Is this change needed, the implementations are empty.

The implementation we care about is in WebKitAdditions. It just takes a snapshot using TextIndicator and sets dataOperationTextIndicator -- I will post the patch later.

>> Source/WebKit/mac/WebCoreSupport/WebDragClient.mm:82
>> +
> 
> empty implementations, do these belong in this patch?

Yes. didConcludeEditDrag() was formerly implemented in the header, now it's just declared there and defined in the implementation.

>> Source/WebKit/mac/WebCoreSupport/WebDragClient.mm:196
>> +
> 
> empty implementations, do these belong in this patch?

Yes. didConcludeEditDrag() was formerly implemented in the header, now it's just declared there and defined in the implementation.

>> Source/WebKit/mac/WebView/WebView.mm:669
>> +            _contentImageWithoutSelectionRectInRootViewCoordinates = indicatorData.contentImageWithoutSelectionRectInRootViewCoordinates;
> 
> retain here, also release this and _contentImageWithoutSelection in dealloc.

This is a CGRect, and isn't something we can or should retain.

Fixed the _contentImageWithoutSelection leak though -- good catch!

>> Source/WebKit/mac/WebView/WebView.mm:1912
>>  #endif // ENABLE(DATA_INTERACTION) && defined(__cplusplus)
> 
> empty method? what is it used for?

Refer to the other empty methods preceding this. Although on second glance, it looks like these are just for staging if <WebKitAdditions/WebViewAdditions.mm> is not available yet? In which case we should just remove the empty implementations for _requestStartDataInteraction:globalPosition: ... -_endedDataInteraction:global: instead...

>> Source/WebKit/mac/WebView/WebViewData.h:292
>>  #endif
> 
> is this the best way to transfer this data?

I believe so, for the same reason textIndicatorData is a member of WebViewPrivate.

Also, we need access to this in two places in UIWebDocumentView anyways (refer to the UIKit change) so even if we made -[WebView _performDataInteraction:client:global:operation:], we'd have to store dataOperationTextIndicator somewhere that UIWebDocumentView can access.

>> Source/WebKit/mac/WebView/WebViewInternal.h:262
>>  #endif
> 
> The implementation is empty, is this used?

The implementation we care about is in WebKitAdditions (patch not yet posted).

>> Source/WebKit/mac/WebView/WebViewPrivate.h:-59
>> -
> 
> Make sure that this removed from where it is needed first, so as to not cause code to stop compiling.

👍

>> Source/WebKit/mac/WebView/WebViewPrivate.h:194
>>  @end
> 
> Is everything above being used? Can we re-purpose some of the existing properties?

No, we definitely should not repurpose the existing properties (though it might make staging a bit easier). WebUITextIndicatorData is meant to mirror TextIndicatorData.
Comment 5 Wenson Hsieh 2017-03-17 08:49:42 PDT
Comment on attachment 304751 [details]
First pass

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

>>> Source/WebKit/mac/WebView/WebView.mm:1912
>>>  #endif // ENABLE(DATA_INTERACTION) && defined(__cplusplus)
>> 
>> empty method? what is it used for?
> 
> Refer to the other empty methods preceding this. Although on second glance, it looks like these are just for staging if <WebKitAdditions/WebViewAdditions.mm> is not available yet? In which case we should just remove the empty implementations for _requestStartDataInteraction:globalPosition: ... -_endedDataInteraction:global: instead...

On second glance, this is not just a staging hack -- we'll need to keep this, and also add a stub implementation for -_dataOperationTextIndicator (this appears to be the cause of the EWS build failures).
Comment 6 Wenson Hsieh 2017-03-17 09:01:39 PDT
Created attachment 304783 [details]
Fix OpenSource build
Comment 7 Wenson Hsieh 2017-03-17 09:05:37 PDT
(In reply to comment #5)
> Comment on attachment 304751 [details]
> First pass
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=304751&action=review
> 
> >>> Source/WebKit/mac/WebView/WebView.mm:1912
> >>>  #endif // ENABLE(DATA_INTERACTION) && defined(__cplusplus)
> >> 
> >> empty method? what is it used for?
> > 
> > Refer to the other empty methods preceding this. Although on second glance, it looks like these are just for staging if <WebKitAdditions/WebViewAdditions.mm> is not available yet? In which case we should just remove the empty implementations for _requestStartDataInteraction:globalPosition: ... -_endedDataInteraction:global: instead...
> 
> On second glance, this is not just a staging hack -- we'll need to keep
> this, and also add a stub implementation for -_dataOperationTextIndicator
> (this appears to be the cause of the EWS build failures).

Hm...it looks like we'll actually need to stub -_dataOperationTextIndicator and not -_didConcludeEditDataInteraction, since the former is SPI but the latter is IPI.
Comment 8 Wenson Hsieh 2017-03-17 09:47:28 PDT
Created attachment 304787 [details]
Fix OpenSource iOS builds
Comment 9 Wenson Hsieh 2017-03-17 11:50:10 PDT
Created attachment 304802 [details]
Patch for landing
Comment 10 WebKit Commit Bot 2017-03-17 12:30:47 PDT
Comment on attachment 304802 [details]
Patch for landing

Clearing flags on attachment: 304802

Committed r214111: <http://trac.webkit.org/changeset/214111>