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

Side by Side Diff: Source/WebKit/chromium/src/ContextFeaturesClientImpl.cpp

Issue 11410062: Merge 133429 - Shadow DOM should be able to be disabled per context. (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1312/
Patch Set: Created 8 years, 1 month 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 | « Source/WebCore/page/DOMWindow.idl ('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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 { 133 {
134 ContextFeaturesCache::from(document)->validateAgainst(document); 134 ContextFeaturesCache::from(document)->validateAgainst(document);
135 } 135 }
136 136
137 bool ContextFeaturesClientImpl::askIfIsEnabled(Document* document, ContextFeatur es::FeatureType type, bool defaultValue) 137 bool ContextFeaturesClientImpl::askIfIsEnabled(Document* document, ContextFeatur es::FeatureType type, bool defaultValue)
138 { 138 {
139 if (!m_client) 139 if (!m_client)
140 return defaultValue; 140 return defaultValue;
141 141
142 switch (type) { 142 switch (type) {
143 case ContextFeatures::ShadowDOM:
143 case ContextFeatures::StyleScoped: 144 case ContextFeatures::StyleScoped:
144 return m_client->allowWebComponents(WebDocument(document), defaultValue) ; 145 return m_client->allowWebComponents(WebDocument(document), defaultValue) ;
145 case ContextFeatures::HTMLNotifications: 146 case ContextFeatures::HTMLNotifications:
146 return m_client->allowHTMLNotifications(WebDocument(document)); 147 return m_client->allowHTMLNotifications(WebDocument(document));
147 case ContextFeatures::MutationEvents: 148 case ContextFeatures::MutationEvents:
148 return m_client->allowMutationEvents(WebDocument(document), defaultValue ); 149 return m_client->allowMutationEvents(WebDocument(document), defaultValue );
149 case ContextFeatures::PushState: 150 case ContextFeatures::PushState:
150 return m_client->allowPushState(WebDocument(document)); 151 return m_client->allowPushState(WebDocument(document));
151 default: 152 default:
152 return defaultValue; 153 return defaultValue;
153 } 154 }
154 } 155 }
155 156
156 } // namespace WebKit 157 } // namespace WebKit
OLDNEW
« no previous file with comments | « Source/WebCore/page/DOMWindow.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698