@@ -21,7 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2121THE SOFTWARE.
2222
2323*/
24- /* Version v0.1.6 , Build time: 2-March -2012 02:44:32 */
24+ /* Version v0.1.7 , Build time: 4-May -2012 03:57:04 */
2525var parserlib = { } ;
2626( function ( ) {
2727
@@ -931,7 +931,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
931931THE SOFTWARE.
932932
933933*/
934- /* Version v0.1.6 , Build time: 2-March -2012 02:44:32 */
934+ /* Version v0.1.7 , Build time: 4-May -2012 03:57:04 */
935935( function ( ) {
936936var EventTarget = parserlib . util . EventTarget ,
937937TokenStreamBase = parserlib . util . TokenStreamBase ,
@@ -2640,7 +2640,8 @@ Parser.prototype = function(){
26402640 expr = null ,
26412641 prio = null ,
26422642 error = null ,
2643- invalid = null ;
2643+ invalid = null ,
2644+ propertyName = "" ;
26442645
26452646 property = this . _property ( ) ;
26462647 if ( property !== null ) {
@@ -2657,8 +2658,20 @@ Parser.prototype = function(){
26572658
26582659 prio = this . _prio ( ) ;
26592660
2661+ /*
2662+ * If hacks should be allowed, then only check the root
2663+ * property. If hacks should not be allowed, treat
2664+ * _property or *property as invalid properties.
2665+ */
2666+ propertyName = property . toString ( ) ;
2667+ if ( this . options . starHack && property . hack == "*" ||
2668+ this . options . underscoreHack && property . hack == "_" ) {
2669+
2670+ propertyName = property . text ;
2671+ }
2672+
26602673 try {
2661- this . _validateProperty ( property , expr ) ;
2674+ this . _validateProperty ( propertyName , expr ) ;
26622675 } catch ( ex ) {
26632676 invalid = ex ;
26642677 }
@@ -3499,6 +3512,7 @@ var Properties = {
34993512 "background-repeat" : { multi : "<repeat-style>" } ,
35003513 "background-size" : { multi : "<bg-size>" , comma : true } ,
35013514 "baseline-shift" : "baseline | sub | super | <percentage> | <length>" ,
3515+ "behavior" : 1 ,
35023516 "binding" : 1 ,
35033517 "bleed" : "<length>" ,
35043518 "bookmark-label" : "<content> | <attr> | <string>" ,
@@ -3845,6 +3859,7 @@ var Properties = {
38453859 "text-justify" : "auto | none | inter-word | inter-ideograph | inter-cluster | distribute | kashida" ,
38463860 "text-outline" : 1 ,
38473861 "text-overflow" : 1 ,
3862+ "text-rendering" : "auto | optimizeSpeed | optimizeLegibility | geometricPrecision | inherit" ,
38483863 "text-shadow" : 1 ,
38493864 "text-transform" : "capitalize | uppercase | lowercase | none | inherit" ,
38503865 "text-wrap" : "normal | none | avoid" ,
@@ -5924,7 +5939,7 @@ var ValidationTypes = {
59245939 i , len , found = false ;
59255940
59265941 for ( i = 0 , len = args . length ; i < len && ! found ; i ++ ) {
5927- if ( text == args [ i ] ) {
5942+ if ( text == args [ i ] . toLowerCase ( ) ) {
59285943 found = true ;
59295944 }
59305945 }
@@ -6016,7 +6031,7 @@ var ValidationTypes = {
60166031 } ,
60176032
60186033 "<gradient>" : function ( part ) {
6019- return part . type == "function" && / ^ (?: \- (?: m s | m o z | o | w e b k i t ) \- ) ? (?: r e p e a t i n g \- ) ? (?: r a d i a l | l i n e a r ) \- g r a d i e n t / i. test ( part ) ;
6034+ return part . type == "function" && / ^ (?: \- (?: m s | m o z | o | w e b k i t ) \- ) ? (?: r e p e a t i n g \- ) ? (?: r a d i a l \- | l i n e a r \- ) ? g r a d i e n t / i. test ( part ) ;
60206035 } ,
60216036
60226037 "<box>" : function ( part ) {
@@ -6108,6 +6123,18 @@ var ValidationTypes = {
61086123 part ,
61096124 i , len ;
61106125
6126+ /*
6127+ <position> = [
6128+ [ left | center | right | top | bottom | <percentage> | <length> ]
6129+ |
6130+ [ left | center | right | <percentage> | <length> ]
6131+ [ top | center | bottom | <percentage> | <length> ]
6132+ |
6133+ [ center | [ left | right ] [ <percentage> | <length> ]? ] &&
6134+ [ center | [ top | bottom ] [ <percentage> | <length> ]? ]
6135+ ]
6136+
6137+ */
61116138
61126139 if ( ValidationTypes . isAny ( expression , "top | bottom" ) ) {
61136140 result = true ;
0 commit comments