This is going to be an all-in-one API to turn on/off the web component features.
Created attachment 143233 [details] Patch
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.
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?
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
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?
(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.
(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.
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.
Created attachment 143405 [details] Patch for landing
Comment on attachment 143405 [details] Patch for landing Clearing flags on attachment: 143405 Committed r118097: <http://trac.webkit.org/changeset/118097>
All reviewed patches have been landed. Closing bug.