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

Side by Side Diff: Source/WebCore/dom/ContextFeatures.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/dom/ContextFeatures.h ('k') | Source/WebCore/dom/Position.cpp » ('j') | 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 * * 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
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
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 }
OLDNEW
« no previous file with comments | « Source/WebCore/dom/ContextFeatures.h ('k') | Source/WebCore/dom/Position.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698