[Webkit-unassigned] [Bug 62669] [Qt] Add storage tracker WK1 API for QtWebKit port
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Jun 27 16:37:01 PDT 2011
https://bugs.webkit.org/show_bug.cgi?id=62669
Keith Kyzivat <keith.kyzivat at nokia.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |keith.kyzivat at nokia.com
--- Comment #10 from Keith Kyzivat <keith.kyzivat at nokia.com> 2011-06-27 16:37:01 PST ---
NOTE: I am not a reviewer, but had some comments.
> Source/WebKit/qt/Api/qwebpage.cpp:402
> + delete m_localStorageTracker;
Wrap in #if ENABLE(DOM_STORAGE) or make sure that m_localStorageTracker is NULL if !DOM_STORAGE.
> Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp:1163
> + QVariantList res;
This needs a more descriptive name than 'res'.
> Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp:1164
> + QString originDelimeter = QString(QLatin1Char('_'));
Does this really need to be in a var?
> Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp:1165
> + QList<QWebSecurityOrigin> ret;
Needs a more descriptive name - you used webOrigins in an above function - I'd use that.
> Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp:1167
> + ret = QWebSecurityOrigin::allLocalStorageOrigins();
As Caio mentioned - you could define format here something like this:
QString localStorageOriginFormat("%1_%2_%3");
>> Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp:1169
>> + res.append(ret[i].scheme() + originDelimeter + ret[i].host() + originDelimeter + QString(ret[i].port()));
>
> Maybe use a formating QString and the QString::arg() method can help the construction of this string.
>
> Somethin like: res.append(QString::fromLatin1("%1_%2_%3").arg(ret[i].scheme(), ret[i].host(), ret[i].port())); // untested
>
> I think you could even create one QString with the format and reuse it inside the loop.
I would agree. Formatting string as shown above would be a more clean way to do this, and would be more efficient.
> LayoutTests/platform/qt/Skipped:147
> # StorageTracker is not enabled.
Update comment
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list