[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/khtml/ecma
From: Germain Garand <germain () ebooksfrance ! org>
Date: 2009-05-18 5:00:30
Message-ID: 1242622830.218148.20216.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 969349 by ggarand:
Window::open arguments may also be splitted on syntactically meaningful
whitespace - not just on commas.
Be compatible.
M +5 -1 kjs_window.cpp
--- trunk/KDE/kdelibs/khtml/ecma/kjs_window.cpp #969348:969349
@@ -1629,6 +1629,10 @@
KHTMLView *widget = p->view();
KParts::WindowArgs winargs;
+ // Split on commas and syntactic whitespace
+ // Testcase: 'height=600, width=950 left = 30,top = 50,statusbar=0'
+ static const QRegExp m(",|\\b\\s+(?!=)");
+
// scan feature argument
if (!features.isEmpty()) {
// specifying window params means false defaults
@@ -1636,7 +1640,7 @@
winargs.setToolBarsVisible(false);
winargs.setStatusBarVisible(false);
winargs.setScrollBarsVisible(false);
- const QStringList flist = features.split(',');
+ const QStringList flist = features.trimmed().split(m);
QStringList::ConstIterator it = flist.begin();
while (it != flist.end()) {
QString s = *it++;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic