| 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 * * Neither the name of Google Inc. nor the names of its | 10 * * Neither the name of Google Inc. nor the names of its |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 #if ENABLE(DIALOG_ELEMENT) | 56 #if ENABLE(DIALOG_ELEMENT) |
| 57 if (!document) | 57 if (!document) |
| 58 return RuntimeEnabledFeatures::dialogElementEnabled(); | 58 return RuntimeEnabledFeatures::dialogElementEnabled(); |
| 59 return document->contextFeatures()->isEnabled(document, DialogElement, Runti
meEnabledFeatures::dialogElementEnabled()); | 59 return document->contextFeatures()->isEnabled(document, DialogElement, Runti
meEnabledFeatures::dialogElementEnabled()); |
| 60 #else | 60 #else |
| 61 UNUSED_PARAM(document); | 61 UNUSED_PARAM(document); |
| 62 return false; | 62 return false; |
| 63 #endif | 63 #endif |
| 64 } | 64 } |
| 65 | 65 |
| 66 bool ContextFeatures::shadowDOMEnabled(Document* document) |
| 67 { |
| 68 #if ENABLE(SHADOW_DOM) |
| 69 if (!document) |
| 70 return RuntimeEnabledFeatures::shadowDOMEnabled(); |
| 71 return document->contextFeatures()->isEnabled(document, ShadowDOM, RuntimeEn
abledFeatures::shadowDOMEnabled()); |
| 72 #else |
| 73 UNUSED_PARAM(document); |
| 74 return false; |
| 75 #endif |
| 76 } |
| 77 |
| 66 bool ContextFeatures::styleScopedEnabled(Document* document) | 78 bool ContextFeatures::styleScopedEnabled(Document* document) |
| 67 { | 79 { |
| 68 #if ENABLE(STYLE_SCOPED) | 80 #if ENABLE(STYLE_SCOPED) |
| 69 if (!document) | 81 if (!document) |
| 70 return RuntimeEnabledFeatures::styleScopedEnabled(); | 82 return RuntimeEnabledFeatures::styleScopedEnabled(); |
| 71 return document->contextFeatures()->isEnabled(document, StyleScoped, Runtime
EnabledFeatures::styleScopedEnabled()); | 83 return document->contextFeatures()->isEnabled(document, StyleScoped, Runtime
EnabledFeatures::styleScopedEnabled()); |
| 72 #else | 84 #else |
| 73 UNUSED_PARAM(document); | 85 UNUSED_PARAM(document); |
| 74 return false; | 86 return false; |
| 75 #endif | 87 #endif |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 | 131 |
| 120 void provideContextFeaturesToDocumentFrom(Document* document, Page* page) | 132 void provideContextFeaturesToDocumentFrom(Document* document, Page* page) |
| 121 { | 133 { |
| 122 ContextFeatures* provided = static_cast<ContextFeatures*>(RefCountedSuppleme
nt<Page, ContextFeatures>::from(page, ContextFeatures::supplementName())); | 134 ContextFeatures* provided = static_cast<ContextFeatures*>(RefCountedSuppleme
nt<Page, ContextFeatures>::from(page, ContextFeatures::supplementName())); |
| 123 if (!provided) | 135 if (!provided) |
| 124 return; | 136 return; |
| 125 document->setContextFeatures(provided); | 137 document->setContextFeatures(provided); |
| 126 } | 138 } |
| 127 | 139 |
| 128 } | 140 } |
| OLD | NEW |