Bug 120925 - This page: www.orange.co.il/catalog does not render correctly in konqueror. Works in explorer.
Summary: This page: www.orange.co.il/catalog does not render correctly in konqueror. W...
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: kjs (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
: 96743 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-01-28 18:23 UTC by Tal Levy
Modified: 2006-03-03 23:30 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tal Levy 2006-01-28 18:23:39 UTC
Version:            (using KDE KDE 3.5.0)
Installed from:    Unlisted Binary Package
OS:                Linux

The following javascript errors are reported:

Error: http://www.orange.co.il/catalog/inc/arr.aspx: SyntaxError: Parse error at line 511
Error: http://www.orange.co.il/catalog/inc/mobtbl.aspx: SyntaxError: Parse error at line 465
Error: http://www.orange.co.il/catalog/: SyntaxError: Parse error at line 114
Error: http://www.orange.co.il/global_functions/inc/Menu2.asp: Error: DOM Exception 1

The orange button in the middle of the page causes for each press:

Error: node : ReferenceError: Can't find variable: start1
Comment 1 Thiago Macieira 2006-02-02 19:08:12 UTC
I can confirm those errors and the lines on which they happen look innocent enough.
r500000
Comment 2 Maksim Orlovich 2006-03-01 04:49:01 UTC
The first one is: 
ERROR: syntax error, unexpected RESERVED, expecting IDENT at line 511
Comment 3 Maksim Orlovich 2006-03-01 05:00:48 UTC
If we drop package and goto from list of reserved words, we seem to work, although we still get some parse errors.  Mozilla doesn't throw parse errors, it seems, but still doesn't work :-)
Comment 4 Maksim Orlovich 2006-03-01 05:35:15 UTC
SVN commit 514698 by orlovich:

Better addRule emulation: unpassed last parameter, -1, etc.
mean to append, not to throw an exception
CCBUG:120925


 M  +7 -1      kjs_css.cpp  


--- branches/KDE/3.5/kdelibs/khtml/ecma/kjs_css.cpp #514697:514698
@@ -550,8 +550,14 @@
       return Undefined();
     // IE extensions
     case DOMCSSStyleSheet::AddRule: {
+      //Unpassed/-1 means append. Since insertRule is picky (throws exceptions)
+      //we adjust it to the desired length
+      unsigned long index  = args[2].toInteger(exec);
+      unsigned long length = styleSheet.cssRules().length();
+      if (args[2].type() == UndefinedType) index = length;
+      if (index > length)                  index = length;
       DOM::DOMString str = args[0].toString(exec).string() + " { " + args[1].toString(exec).string() + " } ";
-      return Number(styleSheet.insertRule(str,(long unsigned int)args[2].toInteger(exec)));
+      return Number(styleSheet.insertRule(str,index));
     }
     case DOMCSSStyleSheet::RemoveRule: {
       int index = args.size() > 0 ? args[0].toInteger(exec) : 0 /*first one*/;
Comment 5 Maksim Orlovich 2006-03-01 05:48:12 UTC
*** Bug 96743 has been marked as a duplicate of this bug. ***
Comment 6 Maksim Orlovich 2006-03-03 23:30:16 UTC
SVN commit 515499 by orlovich:

Free up some "future reserved keywords" for use as identifiers to 
match IE + mozilla. Fixes #120925
Oh, and it's cool when we render sites mozilla can't :-)
BUG:120925



 M  +27 -23    keywords.table  


--- branches/KDE/3.5/kdelibs/kjs/keywords.table #515498:515499
@@ -32,35 +32,39 @@
 typeof		TYPEOF
 with		WITH
 # reserved for future use
-abstract	RESERVED
-boolean		RESERVED
-byte		RESERVED
-char		RESERVED
 class		RESERVED
 debugger	RESERVED
-double		RESERVED
 enum		RESERVED
 export		RESERVED
 extends		RESERVED
-final		RESERVED
-float		RESERVED
-goto		RESERVED
-implements	RESERVED
 import		RESERVED
-int		RESERVED
-interface	RESERVED
-long		RESERVED
-native		RESERVED
-package		RESERVED
-private		RESERVED
-protected	RESERVED
-public		RESERVED
-short		RESERVED
-static		RESERVED
 super		RESERVED
-synchronized	RESERVED
-throws		RESERVED
-transient	RESERVED
-volatile	RESERVED
+# All of the following are reserved for future use as per 
+# ECMA-262, but are permitted as identifiers by both of 
+# the widespread browsers. 
+#
+#abstract	RESERVED
+#boolean		RESERVED
+#byte		RESERVED
+#char		RESERVED
+#double		RESERVED
+#final		RESERVED
+#float		RESERVED
+#goto		RESERVED
+#implements	RESERVED
+#int		RESERVED
+#interface	RESERVED
+#long		RESERVED
+#native		RESERVED
+#package		RESERVED
+#private		RESERVED
+#protected	RESERVED
+#public		RESERVED
+#short		RESERVED
+#static		RESERVED
+#synchronized	RESERVED
+#throws		RESERVED
+#transient	RESERVED
+#volatile	RESERVED
 @end