Closed Bug 988702 Opened 10 years ago Closed 10 years ago

fix missing UngetToken() calls in ParseCounterData

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla31

People

(Reporter: dbaron, Assigned: dbaron)

Details

Attachments

(3 files)

I've had a patch in my tree for ages to fix missing UngetToken() calls in ParseCounterData() (which leads to incorrect parsing if the token we forgot to unget is relevant to matching (), [], or {}); it was just waiting for me to write tests, which I just did.
Values that are already in invalidGradientAndElementValues don't also
need to be listed in an array that has invalidGradientAndElementValues
appended to it.
Attachment #8397566 - Flags: review?(cam)
(This provides an easy mechanism for testing for missing UngetToken()
calls as in the following patch.)
Attachment #8397567 - Flags: review?(cam)
I tested that test_property_syntax_errors.html gives a failure on the
new test without the patch, and that the failure is not present with the
patch.
Attachment #8397568 - Flags: review?(cam)
Comment on attachment 8397566 [details] [diff] [review]
patch 1 - Remove duplication between invalidGradientAndElementValues and the list of invalid values in background-image

Review of attachment 8397566 [details] [diff] [review]:
-----------------------------------------------------------------

::: layout/style/test/property_database.js
@@ +1924,5 @@
>  		"none, url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), none",
>  		"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)",
>  		].concat(validGradientAndElementValues),
>  		invalid_values: [
> +			

Remove the blank line.
Attachment #8397566 - Flags: review?(cam) → review+
Comment on attachment 8397567 [details] [diff] [review]
patch 2 - Test invalid CSS property values for their balanced-ness of () [] or {}

Review of attachment 8397567 [details] [diff] [review]:
-----------------------------------------------------------------

::: layout/style/test/property_database.js
@@ +766,5 @@
>  		invalid_values: [
>  			"url('border.png') url('border.png')",
> +		].concat(invalidGradientAndElementValues),
> +		unbalanced_values: [
> +			

Remove the blank line.

@@ +1937,5 @@
>  		invalid_values: [
>  			
> +		].concat(invalidGradientAndElementValues),
> +		unbalanced_values: [
> +			

And this one too.
Attachment #8397567 - Flags: review?(cam) → review+
Attachment #8397568 - Flags: review?(cam) → review+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: