Patch: LiveConnect broke normal prop lookup for applets

David Faure david at mandrakesoft.com
Sun Sep 22 13:32:29 BST 2002


Things like myApplet.alt didn't work anymore, because of the LiveConnect
stuff which intercepted the call.

Apparently elm->get() always works, so we need to do getValue and test
the result - is that correct?

Index: ecma/kjs_html.cpp
===================================================================
RCS file: /home/kde/kdelibs/khtml/ecma/kjs_html.cpp,v
retrieving revision 1.198
diff -u -p -r1.198 kjs_html.cpp
--- ecma/kjs_html.cpp   2002/09/18 16:39:52     1.198
+++ ecma/kjs_html.cpp   2002/09/22 12:25:30
@@ -1120,7 +1120,11 @@ Value KJS::HTMLElement::tryGet(ExecState
       KParts::LiveConnectExtension::Type rettype;
       unsigned long retobjid;
       if (elm && elm->get(0, propertyName.qstring(), rettype, retobjid, retvalue))
-          return EmbedLiveConnect::getValue(element, propertyName.qstring(), rettype, retvalue, retobjid);
+      {
+          Value val = EmbedLiveConnect::getValue(element, propertyName.qstring(), rettype, retvalue, retobjid);
+          if (val.type() != UndefinedType)
+            return val;
+      }
       break;
   }
   default:






More information about the kfm-devel mailing list