RESOLVED FIXED 87097
[Chromium][API] Introduce WebPermissionClient::allowWebComponents()
https://bugs.webkit.org/show_bug.cgi?id=87097
Summary [Chromium][API] Introduce WebPermissionClient::allowWebComponents()
Hajime Morrita
Reported 2012-05-22 01:29:11 PDT
This is going to be an all-in-one API to turn on/off the web component features.
Attachments
Patch (3.62 KB, patch)
2012-05-22 01:59 PDT, Hajime Morrita
no flags
Patch for landing (3.61 KB, patch)
2012-05-22 17:11 PDT, Hajime Morrita
no flags
Hajime Morrita
Comment 1 2012-05-22 01:59:45 PDT
WebKit Review Bot
Comment 2 2012-05-22 02:01:13 PDT
Please wait for approval from abarth@webkit.org, dglazkov@chromium.org, fishd@chromium.org, jamesr@chromium.org or tkent@chromium.org before submitting, as this patch contains changes to the Chromium public API. See also https://trac.webkit.org/wiki/ChromiumWebKitAPI.
Kent Tamura
Comment 3 2012-05-22 02:15:18 PDT
Comment on attachment 143233 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=143233&action=review > Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp:248 > + return enabledAsRuntimeFeatures; Is it safe to use this value as a fallback?
Dimitri Glazkov (Google)
Comment 4 2012-05-22 09:32:51 PDT
Comment on attachment 143233 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=143233&action=review > Source/WebKit/chromium/public/WebPermissionClient.h:92 > + // Controls whether enabling Web Components API for this frame. "whether Web Components API are enabled for this frame." > Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp:242 > +bool FrameLoaderClientImpl::shadowDOMAllowed(bool enabledAsRuntimeFeatures) enabledAsRuntimeFeatures -> enabledAsRuntimeFeature
Darin Fisher (:fishd, Google)
Comment 5 2012-05-22 11:15:02 PDT
Comment on attachment 143233 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=143233&action=review > Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp:246 > + return webview->permissionClient()->allowWebComponents(m_webFrame, enabledAsRuntimeFeatures); why are we mapping shadowDOMAllowed to allowWebComponents? should the FrameLoaderClient method be renamed to allowWebComponents as well? or should the API one change to say "shadow DOM" instead?
Dimitri Glazkov (Google)
Comment 6 2012-05-22 12:02:16 PDT
(In reply to comment #5) > (From update of attachment 143233 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=143233&action=review > > > Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp:246 > > + return webview->permissionClient()->allowWebComponents(m_webFrame, enabledAsRuntimeFeatures); > > why are we mapping shadowDOMAllowed to allowWebComponents? should the FrameLoaderClient method be renamed to allowWebComponents as well? or should the API one change to say "shadow DOM" instead? This is a good question. Initially, I thought that we would make the decision on what flags substitute web Components at the chrome://flags UI level and check/uncheck boxes as a group. Morrita-san's patch attempts to move it to WebKit API layer, which seems on the short term, because we don't need to go and modify the chrome://flags UI.
Hajime Morrita
Comment 7 2012-05-22 16:10:10 PDT
(In reply to comment #6) > (In reply to comment #5) > > (From update of attachment 143233 [details] [details]) > > View in context: https://bugs.webkit.org/attachment.cgi?id=143233&action=review > > > > > Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp:246 > > > + return webview->permissionClient()->allowWebComponents(m_webFrame, enabledAsRuntimeFeatures); > > > > why are we mapping shadowDOMAllowed to allowWebComponents? should the FrameLoaderClient method be renamed to allowWebComponents as well? or should the API one change to say "shadow DOM" instead? > > This is a good question. Initially, I thought that we would make the decision on what flags substitute web Components at the chrome://flags UI level and check/uncheck boxes as a group. > > Morrita-san's patch attempts to move it to WebKit API layer, which seems on the short term, because we don't need to go and modify the chrome://flags UI. Yeah, the intention here is to let allowWebComponents to cover several WebCore flags, like scoped stylesheet and upcoming other features.
Hajime Morrita
Comment 8 2012-05-22 16:13:29 PDT
Comment on attachment 143233 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=143233&action=review >> Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp:248 >> + return enabledAsRuntimeFeatures; > > Is it safe to use this value as a fallback? Yes. This API is to relax the restriction, not to limit it. This is going to return true for some frames even if the default is false.
Hajime Morrita
Comment 9 2012-05-22 17:11:41 PDT
Created attachment 143405 [details] Patch for landing
WebKit Review Bot
Comment 10 2012-05-22 18:57:41 PDT
Comment on attachment 143405 [details] Patch for landing Clearing flags on attachment: 143405 Committed r118097: <http://trac.webkit.org/changeset/118097>
WebKit Review Bot
Comment 11 2012-05-22 18:57:48 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.