Commit 34fea3a8 authored by darin@apple.com's avatar darin@apple.com

Reviewed by Tim.

        - http://bugs.webkit.org/show_bug.cgi?id=15947
          speed up page loading a bit by inlining

        * loader/FrameLoader.cpp: (WebCore::FrameLoader::isLocationChange):
        Factored out the slow case of isScheduledLocationChangePending into this.

        * loader/FrameLoader.h:
        (WebCore::FrameLoader::isScheduledLocationChangePending): Added an
        inline check of the far and away most common case, where m_scheduledRedirection
        is 0; the rest is in the isLocationChange function.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27729 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 91ffc099
2007-11-12 Darin Adler <darin@apple.com>
Reviewed by Tim.
- http://bugs.webkit.org/show_bug.cgi?id=15947
speed up page loading a bit by inlining
* loader/FrameLoader.cpp: (WebCore::FrameLoader::isLocationChange):
Factored out the slow case of isScheduledLocationChangePending into this.
* loader/FrameLoader.h:
(WebCore::FrameLoader::isScheduledLocationChangePending): Added an
inline check of the far and away most common case, where m_scheduledRedirection
is 0; the rest is in the isLocationChange function.
2007-11-12 George Staikos <staikos@kde.org>
Reviewed by Tim.
......
......@@ -1376,11 +1376,9 @@ void FrameLoader::scheduleRefresh(bool wasUserGesture)
m_cachePolicy = CachePolicyRefresh;
}
bool FrameLoader::isScheduledLocationChangePending() const
bool FrameLoader::isLocationChange(const ScheduledRedirection& redirection)
{
if (!m_scheduledRedirection)
return false;
switch (m_scheduledRedirection->type) {
switch (redirection.type) {
case ScheduledRedirection::redirection:
return false;
case ScheduledRedirection::historyNavigation:
......
......@@ -298,7 +298,7 @@ namespace WebCore {
String baseTarget() const;
KURL dataURLBaseFromRequest(const ResourceRequest& request) const;
bool isScheduledLocationChangePending() const;
bool isScheduledLocationChangePending() const { return m_scheduledRedirection && isLocationChange(*m_scheduledRedirection); }
void scheduleHTTPRedirection(double delay, const String& URL);
void scheduleLocationChange(const String& URL, const String& referrer, bool lockHistory = true, bool userGesture = false);
void scheduleRefresh(bool userGesture = false);
......@@ -560,6 +560,8 @@ namespace WebCore {
void dispatchDidFinishLoading(DocumentLoader*, unsigned long identifier);
bool dispatchDidLoadResourceFromMemoryCache(DocumentLoader*, const ResourceRequest&, const ResourceResponse&, int length);
static bool isLocationChange(const ScheduledRedirection&);
Frame* m_frame;
FrameLoaderClient* m_client;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment