Bug 164982 - Add a runtime flag for SubtleCrypto
Summary: Add a runtime flag for SubtleCrypto
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jiewen Tan
URL:
Keywords: InRadar
Depends on:
Blocks: 160880
  Show dependency treegraph
 
Reported: 2016-11-18 21:46 PST by Jiewen Tan
Modified: 2017-01-17 16:03 PST (History)
9 users (show)

See Also:


Attachments
Patch (16.18 KB, patch)
2016-11-18 21:54 PST, Jiewen Tan
no flags Details | Formatted Diff | Diff
Patch (16.16 KB, patch)
2016-11-21 21:56 PST, Jiewen Tan
bfulgham: review+
Details | Formatted Diff | Diff
Patch for landing (16.08 KB, patch)
2016-12-01 18:05 PST, 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 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?