| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 return instance; | 53 return instance; |
| 54 } | 54 } |
| 55 | 55 |
| 56 bool ContextFeatures::dialogElementEnabled(Document* document) | 56 bool ContextFeatures::dialogElementEnabled(Document* document) |
| 57 { | 57 { |
| 58 if (!document) | 58 if (!document) |
| 59 return RuntimeEnabledFeatures::dialogElementEnabled(); | 59 return RuntimeEnabledFeatures::dialogElementEnabled(); |
| 60 return document->contextFeatures().isEnabled(document, DialogElement, Runtim
eEnabledFeatures::dialogElementEnabled()); | 60 return document->contextFeatures().isEnabled(document, DialogElement, Runtim
eEnabledFeatures::dialogElementEnabled()); |
| 61 } | 61 } |
| 62 | 62 |
| 63 bool ContextFeatures::styleScopedEnabled(Document* document) | |
| 64 { | |
| 65 if (!document) | |
| 66 return RuntimeEnabledFeatures::styleScopedEnabled(); | |
| 67 return document->contextFeatures().isEnabled(document, StyleScoped, RuntimeE
nabledFeatures::styleScopedEnabled()); | |
| 68 } | |
| 69 | |
| 70 bool ContextFeatures::pagePopupEnabled(Document* document) | 63 bool ContextFeatures::pagePopupEnabled(Document* document) |
| 71 { | 64 { |
| 72 if (!document) | 65 if (!document) |
| 73 return false; | 66 return false; |
| 74 return document->contextFeatures().isEnabled(document, PagePopup, false); | 67 return document->contextFeatures().isEnabled(document, PagePopup, false); |
| 75 } | 68 } |
| 76 | 69 |
| 77 bool ContextFeatures::mutationEventsEnabled(Document* document) | 70 bool ContextFeatures::mutationEventsEnabled(Document* document) |
| 78 { | 71 { |
| 79 ASSERT(document); | 72 ASSERT(document); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 94 | 87 |
| 95 void provideContextFeaturesToDocumentFrom(Document& document, Page& page) | 88 void provideContextFeaturesToDocumentFrom(Document& document, Page& page) |
| 96 { | 89 { |
| 97 ContextFeatures* provided = static_cast<ContextFeatures*>(ContextFeatures::S
upplementType::from(page, ContextFeatures::supplementName())); | 90 ContextFeatures* provided = static_cast<ContextFeatures*>(ContextFeatures::S
upplementType::from(page, ContextFeatures::supplementName())); |
| 98 if (!provided) | 91 if (!provided) |
| 99 return; | 92 return; |
| 100 document.setContextFeatures(*provided); | 93 document.setContextFeatures(*provided); |
| 101 } | 94 } |
| 102 | 95 |
| 103 } | 96 } |
| OLD | NEW |