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

Unified Diff: Source/core/page/RuntimeCSSEnabled.h

Issue 14324009: Add support for disabling CSS Properties at runtime (Closed) Base URL: http://src.chromium.org/blink/trunk/Source/
Patch Set: Runtime guard more uses of CSSPropertyID, per Elliot's request. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/editing/EditingStyle.cpp ('k') | Source/core/page/RuntimeCSSEnabled.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/RuntimeCSSEnabled.h
diff --git a/Source/core/rendering/ExclusionInterval.h b/Source/core/page/RuntimeCSSEnabled.h
similarity index 62%
copy from Source/core/rendering/ExclusionInterval.h
copy to Source/core/page/RuntimeCSSEnabled.h
index 5d31feb18113de8c1e4341e0103708b774ca351f..71a19a4630ead925e897edeca366108c8356138a 100644
--- a/Source/core/rendering/ExclusionInterval.h
+++ b/Source/core/page/RuntimeCSSEnabled.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved.
+ * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -12,7 +12,7 @@
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials
* provided with the distribution.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
@@ -27,32 +27,28 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef ExclusionInterval_h
-#define ExclusionInterval_h
+#ifndef RuntimeCSSEnabled_h
+#define RuntimeCSSEnabled_h
-#include <wtf/Vector.h>
+#include "CSSPropertyNames.h"
+#include "wtf/Vector.h"
namespace WebCore {
-struct ExclusionInterval {
+// A class storing static arrays for enabling CSS properties at
+// runtime. By default, all properties are enabled.
+
+class RuntimeCSSEnabled {
public:
- float x1;
- float x2;
+ static bool isCSSPropertyEnabled(CSSPropertyID);
+ static void setCSSPropertyEnabled(CSSPropertyID, bool);
- ExclusionInterval(float x1 = 0, float x2 = 0)
- : x1(x1)
- , x2(x2)
- {
- }
+ static void filterEnabledCSSPropertiesIntoVector(const CSSPropertyID*, size_t length, Vector<CSSPropertyID>&);
- bool intersect(const ExclusionInterval&, ExclusionInterval&) const;
+private:
+ RuntimeCSSEnabled();
};
-void sortExclusionIntervals(Vector<ExclusionInterval>&);
-void mergeExclusionIntervals(const Vector<ExclusionInterval>&, const Vector<ExclusionInterval>&, Vector<ExclusionInterval>&);
-void intersectExclusionIntervals(const Vector<ExclusionInterval>&, const Vector<ExclusionInterval>&, Vector<ExclusionInterval>&);
-void subtractExclusionIntervals(const Vector<ExclusionInterval>&, const Vector<ExclusionInterval>&, Vector<ExclusionInterval>&);
-
} // namespace WebCore
-#endif // ExclusionInterval_h
+#endif // RuntimeCSSEnabled_h
« no previous file with comments | « Source/core/editing/EditingStyle.cpp ('k') | Source/core/page/RuntimeCSSEnabled.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698