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

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

Issue 325663003: Remove scoped styles (retry) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix layout test (and expectation) Created 6 years, 6 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
« no previous file with comments | « Source/core/dom/ContextFeatures.h ('k') | Source/core/dom/Element.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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
OLDNEW
« no previous file with comments | « Source/core/dom/ContextFeatures.h ('k') | Source/core/dom/Element.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698