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

Side by Side Diff: Source/core/dom/ContextFeatures.cpp

Issue 14467003: Remove ENABLE_DIALOG_ELEMENT (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 8 months 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 | Annotate | Revision Log
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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 } 45 }
46 46
47 ContextFeatures* ContextFeatures::defaultSwitch() 47 ContextFeatures* ContextFeatures::defaultSwitch()
48 { 48 {
49 DEFINE_STATIC_LOCAL(RefPtr<ContextFeatures>, instance, (ContextFeatures::cre ate(ContextFeaturesClient::empty()))); 49 DEFINE_STATIC_LOCAL(RefPtr<ContextFeatures>, instance, (ContextFeatures::cre ate(ContextFeaturesClient::empty())));
50 return instance.get(); 50 return instance.get();
51 } 51 }
52 52
53 bool ContextFeatures::dialogElementEnabled(Document* document) 53 bool ContextFeatures::dialogElementEnabled(Document* document)
54 { 54 {
55 #if ENABLE(DIALOG_ELEMENT)
56 if (!document) 55 if (!document)
57 return RuntimeEnabledFeatures::dialogElementEnabled(); 56 return RuntimeEnabledFeatures::dialogElementEnabled();
58 return document->contextFeatures()->isEnabled(document, DialogElement, Runti meEnabledFeatures::dialogElementEnabled()); 57 return document->contextFeatures()->isEnabled(document, DialogElement, Runti meEnabledFeatures::dialogElementEnabled());
59 #else
60 UNUSED_PARAM(document);
61 return false;
62 #endif
63 } 58 }
64 59
65 bool ContextFeatures::styleScopedEnabled(Document* document) 60 bool ContextFeatures::styleScopedEnabled(Document* document)
66 { 61 {
67 if (!document) 62 if (!document)
68 return RuntimeEnabledFeatures::styleScopedEnabled(); 63 return RuntimeEnabledFeatures::styleScopedEnabled();
69 return document->contextFeatures()->isEnabled(document, StyleScoped, Runtime EnabledFeatures::styleScopedEnabled()); 64 return document->contextFeatures()->isEnabled(document, StyleScoped, Runtime EnabledFeatures::styleScopedEnabled());
70 } 65 }
71 66
72 bool ContextFeatures::pagePopupEnabled(Document* document) 67 bool ContextFeatures::pagePopupEnabled(Document* document)
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 108
114 void provideContextFeaturesToDocumentFrom(Document* document, Page* page) 109 void provideContextFeaturesToDocumentFrom(Document* document, Page* page)
115 { 110 {
116 ContextFeatures* provided = static_cast<ContextFeatures*>(RefCountedSuppleme nt<Page, ContextFeatures>::from(page, ContextFeatures::supplementName())); 111 ContextFeatures* provided = static_cast<ContextFeatures*>(RefCountedSuppleme nt<Page, ContextFeatures>::from(page, ContextFeatures::supplementName()));
117 if (!provided) 112 if (!provided)
118 return; 113 return;
119 document->setContextFeatures(provided); 114 document->setContextFeatures(provided);
120 } 115 }
121 116
122 } 117 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698