Bug 145281

Summary: Add an "initiated by user gesture" flag to ResourceRequest
Product: WebKit Reporter: Brady Eidson <beidson>
Component: WebCore Misc.Assignee: Brady Eidson <beidson>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, commit-queue, mitz
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 145280    
Attachments:
Description Flags
Patch v1
none
Patch v2 - Less WK1 test crashing
none
Patch v3 - More iOS building
achristensen: review+
Patch for landing.
none
Followup to fix WCSI/WSI misusage - v1 mitz: review+

Description Brady Eidson 2015-05-21 13:20:56 PDT
Add an "initiated by user gesture" flag to ResourceRequest

This is in support of https://bugs.webkit.org/show_bug.cgi?id=145280, and will be tested along with that bug.
Comment 1 Brady Eidson 2015-05-21 13:55:07 PDT
Created attachment 253540 [details]
Patch v1
Comment 2 Brady Eidson 2015-05-21 14:36:31 PDT
Created attachment 253544 [details]
Patch v2 - Less WK1 test crashing
Comment 3 Brady Eidson 2015-05-21 15:01:19 PDT
Created attachment 253546 [details]
Patch v3 - More iOS building
Comment 4 Alex Christensen 2015-05-21 16:41:22 PDT
Comment on attachment 253546 [details]
Patch v3 - More iOS building

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

> Source/WebCore/platform/mac/WebCoreSystemInterface.h:321
> +#if PLATFORM(COCOA)

PLATFORM(COCOA) shouldn't be needed in platform/mac

> Source/WebCore/platform/mac/WebCoreSystemInterface.mm:173
> +#if PLATFORM(COCOA)

shouldn't be needed.

> Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:211
> +#if PLATFORM(COCOA)

shouldn't be needed.
Comment 5 Brady Eidson 2015-05-21 16:46:58 PDT
Created attachment 253552 [details]
Patch for landing.
Comment 6 WebKit Commit Bot 2015-05-21 17:36:04 PDT
Comment on attachment 253552 [details]
Patch for landing.

Clearing flags on attachment: 253552

Committed r184741: <http://trac.webkit.org/changeset/184741>
Comment 7 mitz 2015-05-22 08:46:08 PDT
Comment on attachment 253546 [details]
Patch v3 - More iOS building

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

> Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:31
>  

WebSystemInterface exists solely for binding symbols from libWebKitSystemInterface. It’s unnecessary and inappropriate to use it for this.
Comment 8 Brady Eidson 2015-05-22 09:06:22 PDT
(In reply to comment #7)
> Comment on attachment 253546 [details]
> Patch v3 - More iOS building
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=253546&action=review
> 
> > Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:31
> >  
> 
> WebSystemInterface exists solely for binding symbols from
> libWebKitSystemInterface. It’s unnecessary and inappropriate to use it for
> this.

I was not aware that it was inappropriate, as I haven't seen that documented anywhere.

I would like to here the obviously better alternative that makes it unnecessary, as I was unable to figure another obvious way for WebCore to have access to a static string provided by WebKit.

There might *be* an obvious way, I just don't know what it is off hand.
Comment 9 Brady Eidson 2015-05-22 09:34:21 PDT
(In reply to comment #8)
> (In reply to comment #7)
> > Comment on attachment 253546 [details]
> > Patch v3 - More iOS building
> > 
> > View in context:
> > https://bugs.webkit.org/attachment.cgi?id=253546&action=review
> > 
> > > Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:31
> > >  
> > 
> > WebSystemInterface exists solely for binding symbols from
> > libWebKitSystemInterface. It’s unnecessary and inappropriate to use it for
> > this.
> 
> I was not aware that it was inappropriate, as I haven't seen that documented
> anywhere.
> 
> I would like to here the obviously better alternative that makes it
> unnecessary, as I was unable to figure another obvious way for WebCore to
> have access to a static string provided by WebKit.
> 
> There might *be* an obvious way, I just don't know what it is off hand.

I realize now that I shifted strategies partway through my patch in a way that no longer required the string to be WebKit provided, and in fact it can live in WebCore.

Will fix.
Comment 10 Brady Eidson 2015-05-22 10:11:56 PDT
Created attachment 253594 [details]
Followup to fix WCSI/WSI misusage - v1
Comment 11 Brady Eidson 2015-05-22 10:24:32 PDT
http://trac.webkit.org/changeset/184775
Comment 12 Alexey Proskuryakov 2015-05-22 11:58:43 PDT
Trying to fix the build in r184783.