Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(481)

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/ConditionalFeatures.cpp

Issue 2628923002: Make document.rootScroller into an origin trial (Closed)
Patch Set: Rebase Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/Document.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "bindings/core/v8/ConditionalFeatures.h" 5 #include "bindings/core/v8/ConditionalFeatures.h"
6 6
7 #include "bindings/core/v8/ScriptState.h" 7 #include "bindings/core/v8/ScriptState.h"
8 #include "bindings/core/v8/V8Document.h" 8 #include "bindings/core/v8/V8Document.h"
9 #include "bindings/core/v8/V8HTMLLinkElement.h" 9 #include "bindings/core/v8/V8HTMLLinkElement.h"
10 #include "bindings/core/v8/V8Navigator.h" 10 #include "bindings/core/v8/V8Navigator.h"
(...skipping 27 matching lines...) Expand all
38 interfaceObject); 38 interfaceObject);
39 } 39 }
40 } else if (wrapperTypeInfo == &V8Window::wrapperTypeInfo) { 40 } else if (wrapperTypeInfo == &V8Window::wrapperTypeInfo) {
41 v8::Local<v8::Object> instanceObject = scriptState->context()->Global(); 41 v8::Local<v8::Object> instanceObject = scriptState->context()->Global();
42 if (RuntimeEnabledFeatures::longTaskObserverEnabled() || 42 if (RuntimeEnabledFeatures::longTaskObserverEnabled() ||
43 (originTrialContext && 43 (originTrialContext &&
44 originTrialContext->isTrialEnabled("LongTaskObserver"))) { 44 originTrialContext->isTrialEnabled("LongTaskObserver"))) {
45 V8Window::installLongTaskObserver(isolate, world, instanceObject, 45 V8Window::installLongTaskObserver(isolate, world, instanceObject,
46 prototypeObject, interfaceObject); 46 prototypeObject, interfaceObject);
47 } 47 }
48 } else if (wrapperTypeInfo == &V8Document::wrapperTypeInfo) {
49 if (RuntimeEnabledFeatures::setRootScrollerEnabled() ||
50 (originTrialContext &&
51 originTrialContext->isTrialEnabled("RootScroller"))) {
52 V8Document::installRootScroller(isolate, world, v8::Local<v8::Object>(),
53 prototypeObject, interfaceObject);
54 }
48 } 55 }
49 } 56 }
50 57
51 namespace { 58 namespace {
52 59
53 InstallConditionalFeaturesFunction s_installConditionalFeaturesFunction = 60 InstallConditionalFeaturesFunction s_installConditionalFeaturesFunction =
54 &installConditionalFeaturesCore; 61 &installConditionalFeaturesCore;
55 } 62 }
56 63
57 InstallConditionalFeaturesFunction setInstallConditionalFeaturesFunction( 64 InstallConditionalFeaturesFunction setInstallConditionalFeaturesFunction(
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 FeaturePolicy* featurePolicy = frame->securityContext()->getFeaturePolicy(); 99 FeaturePolicy* featurePolicy = frame->securityContext()->getFeaturePolicy();
93 // The policy should always be initialized before checking it to ensure we 100 // The policy should always be initialized before checking it to ensure we
94 // properly inherit the parent policy. 101 // properly inherit the parent policy.
95 DCHECK(featurePolicy); 102 DCHECK(featurePolicy);
96 103
97 // Otherwise, check policy. 104 // Otherwise, check policy.
98 return featurePolicy->isFeatureEnabled(feature); 105 return featurePolicy->isFeatureEnabled(feature);
99 } 106 }
100 107
101 } // namespace blink 108 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/Document.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698