aboutsummaryrefslogtreecommitdiffstats
path: root/components/script
diff options
context:
space:
mode:
Diffstat (limited to 'components/script')
-rw-r--r--components/script/dom/cssstyledeclaration.rs12
-rw-r--r--components/script/dom/webidls/CSSStyleDeclaration.webidl27
2 files changed, 30 insertions, 9 deletions
diff --git a/components/script/dom/cssstyledeclaration.rs b/components/script/dom/cssstyledeclaration.rs
index 2699bda9b07..37b1a0a4ae1 100644
--- a/components/script/dom/cssstyledeclaration.rs
+++ b/components/script/dom/cssstyledeclaration.rs
@@ -164,9 +164,17 @@ macro_rules! css_properties(
( $([$getter:ident, $setter:ident, $id:expr],)* ) => (
$(
fn $getter(&self) -> DOMString {
+ debug_assert!(
+ $id.enabled_for_all_content(),
+ "Someone forgot a #[Pref] annotation"
+ );
self.get_property_value($id)
}
fn $setter(&self, value: DOMString) -> ErrorResult {
+ debug_assert!(
+ $id.enabled_for_all_content(),
+ "Someone forgot a #[Pref] annotation"
+ );
self.set_property($id, value, DOMString::new())
}
)*
@@ -238,6 +246,10 @@ impl CSSStyleDeclaration {
return Err(Error::NoModificationAllowed);
}
+ if !id.enabled_for_all_content() {
+ return Ok(());
+ }
+
self.owner.mutate_associated_block(|pdb, changed| {
if value.is_empty() {
// Step 3
diff --git a/components/script/dom/webidls/CSSStyleDeclaration.webidl b/components/script/dom/webidls/CSSStyleDeclaration.webidl
index b6df0176947..1bb20990494 100644
--- a/components/script/dom/webidls/CSSStyleDeclaration.webidl
+++ b/components/script/dom/webidls/CSSStyleDeclaration.webidl
@@ -244,8 +244,10 @@ partial interface CSSStyleDeclaration {
[CEReactions, SetterThrows, TreatNullAs=EmptyString] attribute DOMString whiteSpace;
[CEReactions, SetterThrows, TreatNullAs=EmptyString] attribute DOMString white-space;
- [CEReactions, SetterThrows, TreatNullAs=EmptyString] attribute DOMString writingMode;
- [CEReactions, SetterThrows, TreatNullAs=EmptyString] attribute DOMString writing-mode;
+ [Pref="layout.writing-mode.enabled", CEReactions, SetterThrows, TreatNullAs=EmptyString]
+ attribute DOMString writingMode;
+ [Pref="layout.writing-mode.enabled", CEReactions, SetterThrows, TreatNullAs=EmptyString]
+ attribute DOMString writing-mode;
[CEReactions, SetterThrows, TreatNullAs=EmptyString] attribute DOMString letterSpacing;
[CEReactions, SetterThrows, TreatNullAs=EmptyString] attribute DOMString letter-spacing;
@@ -385,13 +387,20 @@ partial interface CSSStyleDeclaration {
[CEReactions, SetterThrows, TreatNullAs=EmptyString] attribute DOMString imageRendering;
[CEReactions, SetterThrows, TreatNullAs=EmptyString] attribute DOMString image-rendering;
- [CEReactions, SetterThrows, TreatNullAs=EmptyString] attribute DOMString columnCount;
- [CEReactions, SetterThrows, TreatNullAs=EmptyString] attribute DOMString column-count;
- [CEReactions, SetterThrows, TreatNullAs=EmptyString] attribute DOMString columnWidth;
- [CEReactions, SetterThrows, TreatNullAs=EmptyString] attribute DOMString column-width;
- [CEReactions, SetterThrows, TreatNullAs=EmptyString] attribute DOMString columns;
- [CEReactions, SetterThrows, TreatNullAs=EmptyString] attribute DOMString columnGap;
- [CEReactions, SetterThrows, TreatNullAs=EmptyString] attribute DOMString column-gap;
+ [Pref="layout.column-count.enabled", CEReactions, SetterThrows, TreatNullAs=EmptyString]
+ attribute DOMString columnCount;
+ [Pref="layout.column-count.enabled", CEReactions, SetterThrows, TreatNullAs=EmptyString]
+ attribute DOMString column-count;
+ [Pref="layout.column-width.enabled", CEReactions, SetterThrows, TreatNullAs=EmptyString]
+ attribute DOMString columnWidth;
+ [Pref="layout.column-width.enabled", CEReactions, SetterThrows, TreatNullAs=EmptyString]
+ attribute DOMString column-width;
+ [Pref="layout.columns.enabled", CEReactions, SetterThrows, TreatNullAs=EmptyString]
+ attribute DOMString columns;
+ [Pref="layout.column-gap.enabled", CEReactions, SetterThrows, TreatNullAs=EmptyString]
+ attribute DOMString columnGap;
+ [Pref="layout.column-gap.enabled", CEReactions, SetterThrows, TreatNullAs=EmptyString]
+ attribute DOMString column-gap;
[CEReactions, SetterThrows, TreatNullAs=EmptyString] attribute DOMString transition;
[CEReactions, SetterThrows, TreatNullAs=EmptyString] attribute DOMString transitionDuration;