--Boundary-00=_2X16+hyIbjUNsL2
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Here's another small patch to improve the popup blocking. Now nested framesets
are also searched for the target frame.
I also wanted to make the special targets (_top, etc.) case-insensitive but it
doesn't work. Is this case-sensitive on purpose? Mozilla is case-insenstive.
The code in khtml_part.cpp calls lower() first, but it doesn't seem to work:
QString frameName = args.frameName.lower();
if ( !frameName.isEmpty() )
{
if ( frameName == QString::fromLatin1( "_top" ) )
{
emit d->m_extension->openURLRequest( url, args );
return;
}
...
but Test creates a new window.
regards,
Ralf
--Boundary-00=_2X16+hyIbjUNsL2
Content-Type: text/x-diff;
charset="us-ascii";
name="popup3.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="popup3.patch"
Index: ecma/kjs_html.cpp
===================================================================
RCS file: /home/kde/kdelibs/khtml/ecma/kjs_html.cpp,v
retrieving revision 1.249
diff -u -p -r1.249 kjs_html.cpp
--- ecma/kjs_html.cpp 12 Jun 2003 23:16:58 -0000 1.249
+++ ecma/kjs_html.cpp 14 Jun 2003 16:52:05 -0000
@@ -2131,9 +2131,13 @@ Value KJS::HTMLElementFunction::tryCall(
block = false;
// if there is a frame with the target name, don't block
- if ( (view && view->part() && view->part()->parentPart()) ) {
- if( view->part()->parentPart()->frameExists( form.target().string() ) ) {
- block = false;
+ if ( view && view->part() ) {
+ // search all (possibly nested) framesets
+ KHTMLPart *currentPart = view->part()->parentPart();
+ while( currentPart != 0L ) {
+ if( currentPart->frameExists( form.target().string() ) )
+ block = false;
+ currentPart = currentPart->parentPart();
}
}
--Boundary-00=_2X16+hyIbjUNsL2--