Changeset 62947 in webkit


Ignore:
Timestamp:
Jul 9, 2010 6:58:31 AM (14 years ago)
Author:
tonyg@chromium.org
Message:

2010-07-09 Tony Gentilcore <tonyg@chromium.org>

Reviewed by Dimitri Glazkov.

Implement performance.navigation.type
https://bugs.webkit.org/show_bug.cgi?id=41564

Expectations set to FAIL because disabled by default. Tests pass with --web-timing.

  • fast/dom/navigation-type-back-forward-expected.txt: Added.
  • fast/dom/navigation-type-back-forward.html: Added.
  • fast/dom/navigation-type-navigate-expected.txt: Added.
  • fast/dom/navigation-type-navigate.html: Added.
  • fast/dom/navigation-type-reload-expected.txt: Added.
  • fast/dom/navigation-type-reload.html: Added.
  • fast/dom/resources/navigation-type-matches-querystring.html: Added.

2010-07-09 Tony Gentilcore <tonyg@chromium.org>

Reviewed by Dimitri Glazkov.

Implement performance.navigation.type
https://bugs.webkit.org/show_bug.cgi?id=41564

Tests: fast/dom/navigation-type-back-forward.html

fast/dom/navigation-type-navigate.html
fast/dom/navigation-type-reload.html

  • page/Navigation.cpp: (WebCore::Navigation::type):
  • page/Navigation.h: (WebCore::Navigation::):
  • page/Navigation.idl:
Location:
trunk
Files:
7 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r62945 r62947  
     12010-07-09  Tony Gentilcore  <tonyg@chromium.org>
     2
     3        Reviewed by Dimitri Glazkov.
     4
     5        Implement performance.navigation.type
     6        https://bugs.webkit.org/show_bug.cgi?id=41564
     7
     8        Expectations set to FAIL because disabled by default. Tests pass with --web-timing.
     9
     10        * fast/dom/navigation-type-back-forward-expected.txt: Added.
     11        * fast/dom/navigation-type-back-forward.html: Added.
     12        * fast/dom/navigation-type-navigate-expected.txt: Added.
     13        * fast/dom/navigation-type-navigate.html: Added.
     14        * fast/dom/navigation-type-reload-expected.txt: Added.
     15        * fast/dom/navigation-type-reload.html: Added.
     16        * fast/dom/resources/navigation-type-matches-querystring.html: Added.
     17
    1182010-07-09  François Sausset  <sausset@gmail.com>
    219
  • trunk/WebCore/ChangeLog

    r62946 r62947  
     12010-07-09  Tony Gentilcore  <tonyg@chromium.org>
     2
     3        Reviewed by Dimitri Glazkov.
     4
     5        Implement performance.navigation.type
     6        https://bugs.webkit.org/show_bug.cgi?id=41564
     7
     8        Tests: fast/dom/navigation-type-back-forward.html
     9               fast/dom/navigation-type-navigate.html
     10               fast/dom/navigation-type-reload.html
     11
     12        * page/Navigation.cpp:
     13        (WebCore::Navigation::type):
     14        * page/Navigation.h:
     15        (WebCore::Navigation::):
     16        * page/Navigation.idl:
     17
    1182010-07-09  Pavel Feldman  <pfeldman@chromium.org>
    219
  • trunk/WebCore/page/Navigation.cpp

    r62357 r62947  
    3434#if ENABLE(WEB_TIMING)
    3535
     36#include "DocumentLoader.h"
    3637#include "Frame.h"
     38#include "FrameLoaderTypes.h"
    3739
    3840namespace WebCore {
     
    5658{
    5759    if (!m_frame)
    58         return 0;
     60        return Navigate;
    5961
    60     return 0; // FIXME
     62    DocumentLoader* documentLoader = m_frame->loader()->documentLoader();
     63    if (!documentLoader)
     64        return Navigate;
     65
     66    WebCore::NavigationType navigationType = documentLoader->triggeringAction().type();
     67    switch (navigationType) {
     68    case NavigationTypeReload:
     69        return Reload;
     70    case NavigationTypeBackForward:
     71        return BackForward;
     72    default:
     73        return Navigate;
     74    }
    6175}
    6276
  • trunk/WebCore/page/Navigation.h

    r62357 r62947  
    5252
    5353private:
     54    // Keep in sync with what's in the .idl file.
     55    enum NavigationType {
     56        Navigate = 0,
     57        Reload = 1,
     58        BackForward = 2,
     59    };
     60
    5461    Navigation(Frame*);
    5562
  • trunk/WebCore/page/Navigation.idl

    r62357 r62947  
    3333    // See: http://dev.w3.org/2006/webapi/WebTiming/
    3434    interface [Conditional=WEB_TIMING, OmitConstructor] Navigation {
    35         const unsigned short NAVIGATION_OTHER = 0;
    36         const unsigned short NAVIGATION_LINK = 1;
    37         const unsigned short NAVIGATION_FORWARD_BACK = 2;
    38         const unsigned short NAVIGATION_BROWSER = 3;
    39         const unsigned short NAVIGATION_NEW_WINDOW = 4;
    40         const unsigned short NAVIGATION_RELOAD = 5;
    41         const unsigned short NAVIGATION_FRAME = 6;
     35        const unsigned short NAVIGATE = 0;
     36        const unsigned short RELOAD = 1;
     37        const unsigned short BACK_FORWARD = 2;
    4238        readonly attribute unsigned short type;
    4339
Note: See TracChangeset for help on using the changeset viewer.