Bug 184424

Summary: Expand WebCore policy concept of "shouldContinue" to allow for more than true/false
Product: WebKit Reporter: Brady Eidson <beidson>
Component: WebCore Misc.Assignee: Brady Eidson <beidson>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, aestes, cdumez, commit-queue, dbates, ews-watchlist, japhet, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch none

Description Brady Eidson 2018-04-09 12:24:33 PDT
Expand WebCore policy concept of "shouldContinue" to allow for more than true/false

Specifically:
-Yes
-No
-ForSuspension
Comment 1 Brady Eidson 2018-04-09 12:28:16 PDT Comment hidden (obsolete)
Comment 2 Brady Eidson 2018-04-09 13:42:31 PDT
Created attachment 337536 [details]
Patch
Comment 3 Alex Christensen 2018-04-09 13:56:28 PDT
Comment on attachment 337536 [details]
Patch

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

> Source/WebCore/loader/FrameLoader.cpp:3186
> +        FALLTHROUGH;

I don't think this FALLTHROUGH is necessary here or above.
I also think this whole thing could be just shouldContinue != ShouldContinue::No

> Source/WebCore/loader/PolicyChecker.h:60
> +using NavigationPolicyDecisionFunction = WTF::CompletionHandler<void(ResourceRequest&&, FormState*, ShouldContinue)>;

WTF:: could be removed.
Comment 4 Brady Eidson 2018-04-09 14:30:28 PDT
(In reply to Alex Christensen from comment #3)
> Comment on attachment 337536 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=337536&action=review
> 
> > Source/WebCore/loader/FrameLoader.cpp:3186
> > +        FALLTHROUGH;
> 
> I don't think this FALLTHROUGH is necessary here or above.
> I also think this whole thing could be just shouldContinue !=
> ShouldContinue::No

But I want to make sure all cases are always accounted for even if new ones are addddeddddddd!!!!


> 
> > Source/WebCore/loader/PolicyChecker.h:60
> > +using NavigationPolicyDecisionFunction = WTF::CompletionHandler<void(ResourceRequest&&, FormState*, ShouldContinue)>;
> 
> WTF:: could be removed.

Sure
Comment 5 Alex Christensen 2018-04-09 15:15:21 PDT
Comment on attachment 337536 [details]
Patch

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

> Source/WebCore/loader/FrameLoader.cpp:3190
> +    case ShouldContinue::ForSuspension:
> +        shouldContinueBool = true;
> +    case ShouldContinue::No:
> +        shouldContinueBool = false;

Give me a break!
Comment 6 Brady Eidson 2018-04-09 15:29:23 PDT
Created attachment 337554 [details]
Patch
Comment 7 Brady Eidson 2018-04-09 15:30:19 PDT
(In reply to Alex Christensen from comment #5)
> Comment on attachment 337536 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=337536&action=review
> 
> > Source/WebCore/loader/FrameLoader.cpp:3190
> > +    case ShouldContinue::ForSuspension:
> > +        shouldContinueBool = true;
> > +    case ShouldContinue::No:
> > +        shouldContinueBool = false;
> 
> Give me a break!

No!

(Okay maybe)
Comment 8 Brady Eidson 2018-04-09 15:54:49 PDT
Created attachment 337557 [details]
Patch
Comment 9 WebKit Commit Bot 2018-04-09 17:31:08 PDT
Comment on attachment 337557 [details]
Patch

Clearing flags on attachment: 337557

Committed r230458: <https://trac.webkit.org/changeset/230458>
Comment 10 WebKit Commit Bot 2018-04-09 17:31:09 PDT
All reviewed patches have been landed.  Closing bug.
Comment 11 Radar WebKit Bug Importer 2018-04-09 17:32:19 PDT
<rdar://problem/39299789>