Bug 195647 - Add WebFrameProxy::loadData
Summary: Add WebFrameProxy::loadData
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jiewen Tan
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-03-12 15:37 PDT by Jiewen Tan
Modified: 2019-03-12 17:36 PDT (History)
5 users (show)

See Also:


Attachments
Patch (5.39 KB, patch)
2019-03-12 15:47 PDT, Jiewen Tan
youennf: review+
Details | Formatted Diff | Diff
Patch for landing (5.40 KB, patch)
2019-03-12 16:58 PDT, Jiewen Tan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jiewen Tan 2019-03-12 15:37:09 PDT
Add WebFrameProxy::loadData.
Comment 1 Radar WebKit Bug Importer 2019-03-12 15:38:15 PDT
<rdar://problem/48826856>
Comment 2 Jiewen Tan 2019-03-12 15:44:42 PDT
The Internal counterpart is within: <rdar://problem/48048800>.
Comment 3 Jiewen Tan 2019-03-12 15:47:13 PDT
Created attachment 364463 [details]
Patch
Comment 4 youenn fablet 2019-03-12 16:25:15 PDT
Comment on attachment 364463 [details]
Patch

It might be good to add a test for that if it is difficult to test it without additional features.

Maybe we could expose a private API on the web view for testing purposes only.
This API could take a frameId and some data to be loaded.
TestRunner would then grab the frameId and call that new API.

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

> Source/WebKit/WebProcess/WebPage/WebPage.cpp:1401
> +    SubstituteData substituteData(WTFMove(sharedBuffer), URL(), WTFMove(response), SubstituteData::SessionHistoryVisibility::Hidden);

It is true that the above code is not doing that but I would tend to set the correct URL in both response and substituteData.
Comment 5 Jiewen Tan 2019-03-12 16:47:33 PDT
(In reply to youenn fablet from comment #4)
> Comment on attachment 364463 [details]
> Patch
> 
> It might be good to add a test for that if it is difficult to test it
> without additional features.
> 
> Maybe we could expose a private API on the web view for testing purposes
> only.
> This API could take a frameId and some data to be loaded.
> TestRunner would then grab the frameId and call that new API.

I am not sure whether it will be good idea to expose this into SPI, which will then be misused probably. Do we have test only SPIs?

> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=364463&action=review
> 
> > Source/WebKit/WebProcess/WebPage/WebPage.cpp:1401
> > +    SubstituteData substituteData(WTFMove(sharedBuffer), URL(), WTFMove(response), SubstituteData::SessionHistoryVisibility::Hidden);
> 
> It is true that the above code is not doing that but I would tend to set the
> correct URL in both response and substituteData.

Sure.
Comment 6 Jiewen Tan 2019-03-12 16:58:42 PDT
Created attachment 364475 [details]
Patch for landing
Comment 7 WebKit Commit Bot 2019-03-12 17:36:08 PDT
Comment on attachment 364475 [details]
Patch for landing

Clearing flags on attachment: 364475

Committed r242836: <https://trac.webkit.org/changeset/242836>