Bug 164982

Summary: Add a runtime flag for SubtleCrypto
Product: WebKit Reporter: Jiewen Tan <jiewen_tan>
Component: WebCore Misc.Assignee: Jiewen Tan <jiewen_tan>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, cdumez, commit-queue, esprehn+autocc, jiewen_tan, joepeck, kondapallykalyan, rniwa, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 160880    
Attachments:
Description Flags
Patch
none
Patch
bfulgham: review+
Patch for landing none

Description Jiewen Tan 2016-11-18 21:46:44 PST
Add a runtime flag for SubtleCrypto.
Comment 1 Jiewen Tan 2016-11-18 21:54:04 PST
Created attachment 295252 [details]
Patch
Comment 2 Jiewen Tan 2016-11-18 21:54:39 PST
Comment on attachment 295252 [details]
Patch

Can someone tell me why minibrowser WK2 doesn't work?
Comment 3 Jiewen Tan 2016-11-21 21:56:14 PST
Created attachment 295325 [details]
Patch
Comment 4 Brent Fulgham 2016-11-30 09:25:16 PST
(In reply to comment #2)
> Comment on attachment 295252 [details]
> Patch
> 
> Can someone tell me why minibrowser WK2 doesn't work?

I think you need to modify AppDelegate.m "defaultConfiguration" to add turn your new flag on. Otherwise it will default to off.

I assume you want to turn it on for MiniBrowser by default, not allow the user to toggle it at runtime?
Comment 5 Jiewen Tan 2016-11-30 14:04:44 PST
(In reply to comment #4)
> (In reply to comment #2)
> > Comment on attachment 295252 [details]
> > Patch
> > 
> > Can someone tell me why minibrowser WK2 doesn't work?
> 
> I think you need to modify AppDelegate.m "defaultConfiguration" to add turn
> your new flag on. Otherwise it will default to off.
> 
> I assume you want to turn it on for MiniBrowser by default, not allow the
> user to toggle it at runtime?

Thanks Brent, let me try.
Comment 6 Jiewen Tan 2016-11-30 17:54:24 PST
(In reply to comment #5)
> (In reply to comment #4)
> > (In reply to comment #2)
> > > Comment on attachment 295252 [details]
> > > Patch
> > > 
> > > Can someone tell me why minibrowser WK2 doesn't work?
> > 
> > I think you need to modify AppDelegate.m "defaultConfiguration" to add turn
> > your new flag on. Otherwise it will default to off.
> > 
> > I assume you want to turn it on for MiniBrowser by default, not allow the
> > user to toggle it at runtime?
> 
> Thanks Brent, let me try.

It seems like experimental features are default off. If that's the case for miniBrowser, I have no objection on it. I can use WK1 window for test purpose.
Comment 7 Radar WebKit Bug Importer 2016-12-01 14:55:42 PST
<rdar://problem/29468077>
Comment 8 Brent Fulgham 2016-12-01 14:57:02 PST
Comment on attachment 295325 [details]
Patch

Looks correct. r=me.
Comment 9 Jiewen Tan 2016-12-01 14:59:47 PST
(In reply to comment #8)
> Comment on attachment 295325 [details]
> Patch
> 
> Looks correct. r=me.

Thanks Brent for r+ my patch.
Comment 10 Jiewen Tan 2016-12-01 18:05:59 PST
Created attachment 295922 [details]
Patch for landing
Comment 11 WebKit Commit Bot 2016-12-01 19:30:59 PST
Comment on attachment 295922 [details]
Patch for landing

Clearing flags on attachment: 295922

Committed r209230: <http://trac.webkit.org/changeset/209230>
Comment 12 Joseph Pecoraro 2017-01-17 16:03:00 PST
Comment on attachment 295922 [details]
Patch for landing

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

> Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h:372
> +#if ENABLE(SUBTLE_CRYPTO)
> +    bool m_isSubtleCryptoEnabled;
> +#endif

This member variable doesn't appear to be initialed to anything by default, or in reset(). Could this cause problems for Windows / Linux ports that doesn't explicitly set this in their WebKit APIs?