[Webkit-unassigned] [Bug 86703] [CSS3 Backgrounds and Borders] Refactor background-position parsing code for 2 values

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jun 8 23:09:32 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=86703





--- Comment #6 from Uday Kiran <udaykiran at motorola.com>  2012-06-08 23:09:32 PST ---
Hi Julien,

I tried implementing background-position with 3-4 values with state machine logic like existing code but there are too many ambiguous states while parsing position values since possible ways of specifying position is much higher. We can see that by constructing state machine.
It becomes more complex as background-position, radial-gradient take maximum of 4 values and -webkit-mask-position, -transform-origin, -prespective-origin take only two values.

Implementing using switch case is much simpler and easier to read code.
If you think switch case logic doesn't cover some code path or if missing some tests, can you please elaborate? I will be glad to fix it.

Main concern here seems to be step 2 in comment #3, without that I am not sure how we can implement this feature in small patches as any modifications to existing parsing function needs testing for all properties, background-position, -webkit-mask-position, -transform-origin, -prespective-origin and -radial-gradient, making the patch larger.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list