[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

darin darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:17:47 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 45f3481021738cee15e9ba172b98cc2567117afe
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sun Dec 29 20:15:54 2002 +0000

            Reviewed by Maciej.
    
    	- fixed 3136391 -- PianoNanny.com screens turn to garbage when resized
    
    	Turns out browsers pass open calls to the window object if they show up at the document
    	with parameters. We now emulate that too.
    
            * khtml/ecma/kjs_html.cpp: (KJS::HTMLDocFunction::tryCall): If we get an open call with
    	parameters, pass it on to the window.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3205 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index e22de7c..78e557d 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,5 +1,17 @@
 2002-12-29  Darin Adler  <darin at apple.com>
 
+        Reviewed by Maciej.
+
+	- fixed 3136391 -- PianoNanny.com screens turn to garbage when resized
+
+	Turns out browsers pass open calls to the window object if they show up at the document
+	with parameters. We now emulate that too.
+
+        * khtml/ecma/kjs_html.cpp: (KJS::HTMLDocFunction::tryCall): If we get an open call with
+	parameters, pass it on to the window.
+
+2002-12-29  Darin Adler  <darin at apple.com>
+
         Reviewed by Ken.
 
 	- fixed 3134560 -- Lord of the Rings desktops don't load
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index e22de7c..78e557d 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,5 +1,17 @@
 2002-12-29  Darin Adler  <darin at apple.com>
 
+        Reviewed by Maciej.
+
+	- fixed 3136391 -- PianoNanny.com screens turn to garbage when resized
+
+	Turns out browsers pass open calls to the window object if they show up at the document
+	with parameters. We now emulate that too.
+
+        * khtml/ecma/kjs_html.cpp: (KJS::HTMLDocFunction::tryCall): If we get an open call with
+	parameters, pass it on to the window.
+
+2002-12-29  Darin Adler  <darin at apple.com>
+
         Reviewed by Ken.
 
 	- fixed 3134560 -- Lord of the Rings desktops don't load
diff --git a/WebCore/khtml/ecma/kjs_html.cpp b/WebCore/khtml/ecma/kjs_html.cpp
index 7a5a5a0..92c2377 100644
--- a/WebCore/khtml/ecma/kjs_html.cpp
+++ b/WebCore/khtml/ecma/kjs_html.cpp
@@ -57,16 +57,34 @@ Value KJS::HTMLDocFunction::tryCall(ExecState *exec, Object &thisObj, const List
     return err;
   }
   DOM::HTMLDocument doc = static_cast<KJS::HTMLDocument *>(thisObj.imp())->toDocument();
-  String s;
-  DOM::HTMLElement element;
-
-  Value v = args[0];
 
   switch (id) {
   case HTMLDocument::Clear: // even IE doesn't support that one...
     //doc.clear(); // TODO
     return Undefined();
   case HTMLDocument::Open:
+    // For compatibility with other browsers, pass open calls with parameters to the window.
+    if (args.size() != 0) {
+      KHTMLView *view = static_cast<DOM::DocumentImpl *>(doc.handle())->view();
+      if (view) {
+        KHTMLPart *part = view->part();
+        if (part) {
+          Window *window = Window::retrieveWindow(part);
+          if (window) {
+            Object functionObject = Object::dynamicCast(window->get(exec, "open"));
+            if (functionObject.isNull() || !functionObject.implementsCall()) {
+                Object exception = Error::create(exec, TypeError);
+                exec->setException(exception);
+                return exception;
+            }
+            Object windowObject(window);
+            return functionObject.call(exec, windowObject, args);
+          }
+        }
+      }
+      return Undefined();
+    }
+    // In the case of no prameters, do a normal document open.
     doc.open();
     return Undefined();
   case HTMLDocument::Close:
@@ -87,7 +105,7 @@ Value KJS::HTMLDocFunction::tryCall(ExecState *exec, Object &thisObj, const List
     return Undefined();
   }
   case HTMLDocument::GetElementsByName:
-    return getDOMNodeList(exec,doc.getElementsByName(v.toString(exec).string()));
+    return getDOMNodeList(exec,doc.getElementsByName(args[0].toString(exec).string()));
   case HTMLDocument::CaptureEvents:
   case HTMLDocument::ReleaseEvents:
     // Do nothing for now. These are NS-specific legacy calls.

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list