Changeset 27729 in webkit


Ignore:
Timestamp:
Nov 12, 2007 2:28:01 PM (16 years ago)
Author:
Darin Adler
Message:

Reviewed by Tim.

  • 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.
Location:
trunk/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r27721 r27729  
     12007-11-12  Darin Adler  <darin@apple.com>
     2
     3        Reviewed by Tim.
     4
     5        - http://bugs.webkit.org/show_bug.cgi?id=15947
     6          speed up page loading a bit by inlining
     7
     8        * loader/FrameLoader.cpp: (WebCore::FrameLoader::isLocationChange):
     9        Factored out the slow case of isScheduledLocationChangePending into this.
     10
     11        * loader/FrameLoader.h:
     12        (WebCore::FrameLoader::isScheduledLocationChangePending): Added an
     13        inline check of the far and away most common case, where m_scheduledRedirection
     14        is 0; the rest is in the isLocationChange function.
     15
    1162007-11-12  George Staikos  <staikos@kde.org>
    217
  • trunk/WebCore/loader/FrameLoader.cpp

    r27452 r27729  
    13771377}
    13781378
    1379 bool FrameLoader::isScheduledLocationChangePending() const
    1380 {
    1381     if (!m_scheduledRedirection)
    1382         return false;
    1383     switch (m_scheduledRedirection->type) {
     1379bool FrameLoader::isLocationChange(const ScheduledRedirection& redirection)
     1380{
     1381    switch (redirection.type) {
    13841382        case ScheduledRedirection::redirection:
    13851383            return false;
  • trunk/WebCore/loader/FrameLoader.h

    r27598 r27729  
    299299        KURL dataURLBaseFromRequest(const ResourceRequest& request) const;
    300300
    301         bool isScheduledLocationChangePending() const;
     301        bool isScheduledLocationChangePending() const { return m_scheduledRedirection && isLocationChange(*m_scheduledRedirection); }
    302302        void scheduleHTTPRedirection(double delay, const String& URL);
    303303        void scheduleLocationChange(const String& URL, const String& referrer, bool lockHistory = true, bool userGesture = false);
     
    561561        bool dispatchDidLoadResourceFromMemoryCache(DocumentLoader*, const ResourceRequest&, const ResourceResponse&, int length);
    562562
     563        static bool isLocationChange(const ScheduledRedirection&);
     564
    563565        Frame* m_frame;
    564566        FrameLoaderClient* m_client;
Note: See TracChangeset for help on using the changeset viewer.