diff lisp/w3/css.el @ 98:0d2f883870bc r20-1b1

Import from CVS: tag r20-1b1
author cvs
date Mon, 13 Aug 2007 09:13:56 +0200
parents 859a2309aef8
children 441bb1e64a06
line wrap: on
line diff
--- a/lisp/w3/css.el	Mon Aug 13 09:12:43 2007 +0200
+++ b/lisp/w3/css.el	Mon Aug 13 09:13:56 2007 +0200
@@ -1,7 +1,7 @@
 ;;; css.el -- Cascading Style Sheet parser
 ;; Author: wmperry
-;; Created: 1997/01/17 14:30:54
-;; Version: 1.25
+;; Created: 1997/02/08 05:24:49
+;; Version: 1.27
 ;; Keywords: 
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -366,10 +366,10 @@
   (cond
    ((not (stringp spec)) spec)
    ((string-equal spec "auto") nil)
-   ((string-match "\([0-9]+\)%" spec)	; A percentage
+   ((string-match "\\([+-]?\\([0-9]+\\|[0-9]*\\.[0-9]+\\)\\)%" spec)	; A percentage
     nil)
-   ((string-match "\([0-9]+\)e[mn]" spec) ; Character based
-    (string-to-int (substring spec (match-beginning 1) (match-end 1))))
+   ((string-match "\\([+-]?\\([0-9]+\\|[0-9]*\\.[0-9]+\\)\\)e[mx]" spec) ; Character based
+    (max 0 (round (string-to-number (match-string 1 spec)))))
    (t
     (truncate (font-spatial-to-canonical spec)))
    )