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

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: Updated per Mitica's comments 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
Index: Source/core/page/RuntimeCSSEnabled.h
diff --git a/Source/core/rendering/ExclusionInterval.h b/Source/core/page/RuntimeCSSEnabled.h
similarity index 63%
copy from Source/core/rendering/ExclusionInterval.h
copy to Source/core/page/RuntimeCSSEnabled.h
index 5d31feb18113de8c1e4341e0103708b774ca351f..2859c4f3024764b78e68305f3c47b3926444525b 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,31 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef ExclusionInterval_h
-#define ExclusionInterval_h
+#ifndef RuntimeCSSEnabled_h
+#define RuntimeCSSEnabled_h
+
+#include "CSSPropertyNames.h"
+#include "CSSValueKeywords.h"
#include <wtf/Vector.h>
abarth-chromium 2013/04/24 21:02:13 There's no need to include this header.
namespace WebCore {
-struct ExclusionInterval {
+// A class storing static arrays for enabling CSS properties and values at
+// runtime. By default, all properties and values are enabled.
+
+class RuntimeCSSEnabled {
public:
- float x1;
- float x2;
+ static bool isCSSValueEnabled(CSSValueID);
+ static void setCSSValueEnabled(CSSValueID, bool);
- ExclusionInterval(float x1 = 0, float x2 = 0)
- : x1(x1)
- , x2(x2)
- {
- }
+ static bool isCSSPropertyEnabled(CSSPropertyID);
+ static void setCSSPropertyEnabled(CSSPropertyID, bool);
- 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

Powered by Google App Engine
This is Rietveld 408576698