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

Side by Side Diff: Source/web/ContextFeaturesClientImpl.cpp

Issue 325663003: Remove scoped styles (retry) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix layout test (and expectation) Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/platform/RuntimeEnabledFeatures.in ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 ContextFeaturesCache::from(*document).validateAgainst(document); 137 ContextFeaturesCache::from(*document).validateAgainst(document);
138 } 138 }
139 139
140 bool ContextFeaturesClientImpl::askIfIsEnabled(Document* document, ContextFeatur es::FeatureType type, bool defaultValue) 140 bool ContextFeaturesClientImpl::askIfIsEnabled(Document* document, ContextFeatur es::FeatureType type, bool defaultValue)
141 { 141 {
142 WebLocalFrameImpl* frame = WebLocalFrameImpl::fromFrame(document->frame()); 142 WebLocalFrameImpl* frame = WebLocalFrameImpl::fromFrame(document->frame());
143 if (!frame || !frame->permissionClient()) 143 if (!frame || !frame->permissionClient())
144 return defaultValue; 144 return defaultValue;
145 145
146 switch (type) { 146 switch (type) {
147 case ContextFeatures::StyleScoped:
148 return frame->permissionClient()->allowWebComponents(defaultValue);
149 case ContextFeatures::MutationEvents: 147 case ContextFeatures::MutationEvents:
150 return frame->permissionClient()->allowMutationEvents(defaultValue); 148 return frame->permissionClient()->allowMutationEvents(defaultValue);
151 case ContextFeatures::PushState: 149 case ContextFeatures::PushState:
152 return frame->permissionClient()->allowPushState(); 150 return frame->permissionClient()->allowPushState();
153 default: 151 default:
154 return defaultValue; 152 return defaultValue;
155 } 153 }
156 } 154 }
157 155
158 } // namespace blink 156 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/RuntimeEnabledFeatures.in ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698