| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |