diff --git a/mozilla/layout/reftests/bugs/378535-1-ref.html b/mozilla/layout/reftests/bugs/378535-1-ref.html new file mode 100644 index 00000000000..b1d25c26d10 --- /dev/null +++ b/mozilla/layout/reftests/bugs/378535-1-ref.html @@ -0,0 +1,19 @@ + + + + + +
PASS1
+
PASS2
+
+
PASS4
+
+
PASS6
+
PASS7
+
PASS8
+
PASS9
+
PASS10
+
+
PASS12
+ + diff --git a/mozilla/layout/reftests/bugs/378535-1.html b/mozilla/layout/reftests/bugs/378535-1.html new file mode 100644 index 00000000000..b56f9df8321 --- /dev/null +++ b/mozilla/layout/reftests/bugs/378535-1.html @@ -0,0 +1,34 @@ + + + + + + +
+
+
+
+
+
+
+
+
+
+
+
+ + diff --git a/mozilla/layout/reftests/bugs/reftest.list b/mozilla/layout/reftests/bugs/reftest.list index 34cfd2af384..3612a398388 100644 --- a/mozilla/layout/reftests/bugs/reftest.list +++ b/mozilla/layout/reftests/bugs/reftest.list @@ -222,3 +222,4 @@ fails-if(MOZ_WIDGET_TOOLKIT=="cocoa") == 372037-1.html 372037-1-ref.html # bug 3 == 374193-1.xhtml about:blank fails == 376484-1.html 376484-1-ref.html == 377603-1.html 377603-1-ref.html +== 378535-1.html 378535-1-ref.html diff --git a/mozilla/layout/style/nsCSSParser.cpp b/mozilla/layout/style/nsCSSParser.cpp index e05d532e556..b84028f2c56 100644 --- a/mozilla/layout/style/nsCSSParser.cpp +++ b/mozilla/layout/style/nsCSSParser.cpp @@ -5327,7 +5327,8 @@ PRBool CSSParserImpl::ParseContent(nsresult& aErrorCode) // XXX Rewrite to make it look more like ParseCursor or ParseCounterData? nsCSSValue value; if (ParseVariant(aErrorCode, value, - VARIANT_CONTENT | VARIANT_INHERIT | VARIANT_NORMAL, + VARIANT_CONTENT | VARIANT_INHERIT | VARIANT_NORMAL | + VARIANT_NONE, nsCSSProps::kContentKTable)) { nsCSSValueList* listHead = new nsCSSValueList(); nsCSSValueList* list = listHead; @@ -5347,6 +5348,7 @@ PRBool CSSParserImpl::ParseContent(nsresult& aErrorCode) if (eCSSUnit_Inherit == value.GetUnit() || eCSSUnit_Initial == value.GetUnit() || eCSSUnit_Normal == value.GetUnit() || + eCSSUnit_None == value.GetUnit() || (eCSSUnit_Enumerated == value.GetUnit() && NS_STYLE_CONTENT_ALT_CONTENT == value.GetIntValue())) { // This only matters the first time through the loop. diff --git a/mozilla/layout/style/nsRuleNode.cpp b/mozilla/layout/style/nsRuleNode.cpp index c070036a45d..0195d3bbaab 100644 --- a/mozilla/layout/style/nsRuleNode.cpp +++ b/mozilla/layout/style/nsRuleNode.cpp @@ -3724,14 +3724,15 @@ nsRuleNode::ComputeContentData(nsStyleStruct* aStartStruct, COMPUTE_START_RESET(Content, (), content, parentContent, Content, contentData) - // content: [string, url, counter, attr, enum]+, normal, inherit + // content: [string, url, counter, attr, enum]+, normal, none, inherit PRUint32 count; nsAutoString buffer; nsCSSValueList* contentValue = contentData.mContent; if (contentValue) { if (eCSSUnit_Normal == contentValue->mValue.GetUnit() || + eCSSUnit_None == contentValue->mValue.GetUnit() || eCSSUnit_Initial == contentValue->mValue.GetUnit()) { - // "normal" and "initial" both mean no content + // "normal", "none", and "initial" all mean no content content->AllocateContents(0); } else if (eCSSUnit_Inherit == contentValue->mValue.GetUnit()) { diff --git a/mozilla/layout/style/test/test_value_computation.html b/mozilla/layout/style/test/test_value_computation.html index ca27e642625..430746fec59 100644 --- a/mozilla/layout/style/test/test_value_computation.html +++ b/mozilla/layout/style/test/test_value_computation.html @@ -86,7 +86,6 @@ var gNotAccepted = { "-moz-column-width": [ "50%" ], "-moz-user-select": [ "auto" ], "background-color": [ "rgb(255.0,0.387,3489)" ], - "content": [ "none" ], "list-style": [ "none disc outside" ], }; diff --git a/mozilla/layout/style/test/test_value_storage.html b/mozilla/layout/style/test/test_value_storage.html index 481e81a9114..300c4b44736 100644 --- a/mozilla/layout/style/test/test_value_storage.html +++ b/mozilla/layout/style/test/test_value_storage.html @@ -65,7 +65,6 @@ var gNotAccepted = { "-moz-column-width": [ "50%" ], "-moz-user-select": [ "auto" ], "background-color": [ "rgb(255.0,0.387,3489)" ], - "content": [ "none" ], "list-style": [ "none disc outside" ], };