mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 679689. Allow empty string values to be associtated to enumerated attributes. r=sicking
This commit is contained in:
parent
b98b1e5b49
commit
5df1c9dfe4
2
content/base/crashtests/679689-1.html
Normal file
2
content/base/crashtests/679689-1.html
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<img crossorigin>
|
@ -93,3 +93,4 @@ load 642022-1.html
|
|||||||
load 646184.html
|
load 646184.html
|
||||||
load 658845-1.svg
|
load 658845-1.svg
|
||||||
load 667336-1.html
|
load 667336-1.html
|
||||||
|
load 679689-1.html
|
||||||
|
@ -1250,10 +1250,14 @@ nsAttrValue::SetMiscAtomOrString(const nsAString* aValue)
|
|||||||
"Trying to re-set atom or string!");
|
"Trying to re-set atom or string!");
|
||||||
if (aValue) {
|
if (aValue) {
|
||||||
PRUint32 len = aValue->Length();
|
PRUint32 len = aValue->Length();
|
||||||
// We're allowing eCSSStyleRule attributes to store empty strings as it
|
// * We're allowing eCSSStyleRule attributes to store empty strings as it
|
||||||
// can be beneficial to store an empty style attribute as a parsed rule.
|
// can be beneficial to store an empty style attribute as a parsed rule.
|
||||||
|
// * We're allowing enumerated values because sometimes the empty
|
||||||
|
// string corresponds to a particular enumerated value, especially
|
||||||
|
// for enumerated values that are not limited enumerated.
|
||||||
// Add other types as needed.
|
// Add other types as needed.
|
||||||
NS_ASSERTION(len || Type() == eCSSStyleRule, "Empty string?");
|
NS_ASSERTION(len || Type() == eCSSStyleRule || Type() == eEnum,
|
||||||
|
"Empty string?");
|
||||||
MiscContainer* cont = GetMiscContainer();
|
MiscContainer* cont = GetMiscContainer();
|
||||||
if (len <= NS_ATTRVALUE_MAX_STRINGLENGTH_ATOM) {
|
if (len <= NS_ATTRVALUE_MAX_STRINGLENGTH_ATOM) {
|
||||||
nsIAtom* atom = NS_NewAtom(*aValue);
|
nsIAtom* atom = NS_NewAtom(*aValue);
|
||||||
|
Loading…
Reference in New Issue
Block a user