+

Attachment #494409: Draft implementation of the web timing spec for bug #570341

View | Details | Raw Unified | Return to bug 570341
Collapse All | Expand All

(-)a/docshell/base/Makefile.in (+1 lines)
Line     Link Here 
 Lines 110-113    Link Here 
110
110
111
LOCAL_INCLUDES += -I$(srcdir)/../shistory/src \
111
LOCAL_INCLUDES += -I$(srcdir)/../shistory/src \
112
		-I$(srcdir)/../../layout/base \
112
		-I$(srcdir)/../../layout/base \
113
		-I$(srcdir)/../../dom/base \
113
		$(NULL)
114
		$(NULL)
(-)a/docshell/base/nsDocShell.cpp (-8 / +99 lines)
Line     Link Here 
 Lines 234-239    Link Here 
234
#include "nsXULAppAPI.h"
234
#include "nsXULAppAPI.h"
235
#endif
235
#endif
236
236
237
#include "nsDOMNavigationTiming.h"
238
237
using namespace mozilla;
239
using namespace mozilla;
238
240
239
// Number of documents currently loading
241
// Number of documents currently loading
 Lines 675-680    Link Here 
675
  ForEachPing(content, SendPing, &info);
677
  ForEachPing(content, SendPing, &info);
676
}
678
}
677
679
680
static nsDOMNavigationTimingType
681
ConvertLoadTypeToNavigationType(PRUint32 aLoadType)
682
{
683
    nsDOMNavigationTimingType result = nsIDOMNavigationTiming::NAVIGATION_OTHER;
684
    switch (aLoadType) {
685
    case LOAD_NORMAL:
686
    case LOAD_NORMAL_EXTERNAL:
687
    case LOAD_NORMAL_BYPASS_CACHE:
688
    case LOAD_NORMAL_BYPASS_PROXY:
689
    case LOAD_NORMAL_BYPASS_PROXY_AND_CACHE:
690
        result = nsIDOMNavigationTiming::NAVIGATION_BROWSER;
691
        break;
692
    case LOAD_HISTORY:
693
        result = nsIDOMNavigationTiming::NAVIGATION_FORWARD_BACK;
694
        break;
695
    case LOAD_RELOAD_NORMAL:
696
    case LOAD_RELOAD_CHARSET_CHANGE:
697
    case LOAD_RELOAD_BYPASS_CACHE:
698
    case LOAD_RELOAD_BYPASS_PROXY:
699
    case LOAD_RELOAD_BYPASS_PROXY_AND_CACHE:
700
        result = nsIDOMNavigationTiming::NAVIGATION_RELOAD;
701
        break;
702
    case LOAD_LINK:
703
        result = nsIDOMNavigationTiming::NAVIGATION_LINK;
704
        break;
705
    case LOAD_NORMAL_REPLACE:
706
    case LOAD_STOP_CONTENT:
707
    case LOAD_STOP_CONTENT_AND_REPLACE:
708
    case LOAD_REFRESH:
709
    case LOAD_BYPASS_HISTORY:
710
    case LOAD_ERROR_PAGE:
711
    case LOAD_PUSHSTATE:
712
        result = nsIDOMNavigationTiming::NAVIGATION_OTHER;
713
        break;
714
    default:
715
        NS_NOTREACHED("Unexpected load type value");
716
    }
717
718
    return result;
719
}
720
678
static nsISHEntry* GetRootSHEntry(nsISHEntry *entry);
721
static nsISHEntry* GetRootSHEntry(nsISHEntry *entry);
679
722
680
//*****************************************************************************
723
//*****************************************************************************
 Lines 1534-1543    Link Here 
1534
        // Now make sure our editor, if any, is detached before we go
1577
        // Now make sure our editor, if any, is detached before we go
1535
        // any farther.
1578
        // any farther.
1536
        DetachEditorFromWindow();
1579
        DetachEditorFromWindow();
1537
    }
1580
        // Make sure timing is created. mCurrentURI is out of date.
1538
1581
        nsresult rv = initTiming(mLoadingURI);
1539
    return NS_OK;
1582
        NS_ENSURE_SUCCESS(rv, rv);
1540
}
1583
        mTiming->NotifyLastUnload(mCurrentURI);
1584
    }
1585
1586
    return NS_OK;
1587
}
1588
1589
nsresult 
1590
nsDocShell::initTiming(nsIURI* aCurrentURI) 
1591
{
1592
    if (mTiming) {
1593
        return NS_OK;
1594
    }
1595
    mTiming = new nsDOMNavigationTiming();
1596
    NS_ENSURE_TRUE(mTiming, NS_ERROR_OUT_OF_MEMORY);
1597
1598
    // Is this a new window or a frame?
1599
    nsDOMNavigationTimingType navType =
1600
        nsIDOMNavigationTiming::NAVIGATION_NEW_WINDOW;
1601
    nsCOMPtr<nsIDocShellTreeItem> root;
1602
    GetSameTypeParent(getter_AddRefs(root));
1603
    if (root && root != this) {
1604
      navType = nsIDOMNavigationTiming::NAVIGATION_FRAME;
1605
    }
1606
1607
    mTiming->NotifyNavigationStart(aCurrentURI, navType);
1608
    return NS_OK;
1609
}
1610
1541
1611
1542
//
1612
//
1543
// Bug 13871: Prevent frameset spoofing
1613
// Bug 13871: Prevent frameset spoofing
 Lines 5789-5803    Link Here 
5789
    nsresult rv;
5859
    nsresult rv;
5790
5860
5791
    if ((~aStateFlags & (STATE_START | STATE_IS_NETWORK)) == 0) {
5861
    if ((~aStateFlags & (STATE_START | STATE_IS_NETWORK)) == 0) {
5862
        // Save timing statistics.
5863
        nsCOMPtr<nsIChannel> channel(do_QueryInterface(aRequest));
5864
        nsCOMPtr<nsIURI> uri;
5865
        channel->GetURI(getter_AddRefs(uri));
5866
        if (mTiming) {
5867
            mTiming->NotifyNavigationStart(uri,
5868
                    ConvertLoadTypeToNavigationType(mLoadType));
5869
        }
5870
        else {
5871
            // Create and notify about the navigation start
5872
            rv = initTiming(uri);
5873
            NS_ENSURE_SUCCESS(rv, rv);
5874
        }
5875
5792
        nsCOMPtr<nsIWyciwygChannel>  wcwgChannel(do_QueryInterface(aRequest));
5876
        nsCOMPtr<nsIWyciwygChannel>  wcwgChannel(do_QueryInterface(aRequest));
5793
        nsCOMPtr<nsIWebProgress> webProgress =
5877
        nsCOMPtr<nsIWebProgress> webProgress =
5794
            do_QueryInterface(GetAsSupports(this));
5878
            do_QueryInterface(GetAsSupports(this));
5795
5879
5796
        // Was the wyciwyg document loaded on this docshell?
5880
        // Was the wyciwyg document loaded on this docshell?
5797
        if (wcwgChannel && !mLSHE && (mItemType == typeContent) && aProgress == webProgress.get()) {
5881
        if (wcwgChannel && !mLSHE && (mItemType == typeContent) && aProgress == webProgress.get()) {
5798
            nsCOMPtr<nsIURI> uri;
5799
            wcwgChannel->GetURI(getter_AddRefs(uri));
5800
        
5801
            PRBool equalUri = PR_TRUE;
5882
            PRBool equalUri = PR_TRUE;
5802
            // Store the wyciwyg url in session history, only if it is
5883
            // Store the wyciwyg url in session history, only if it is
5803
            // being loaded fresh for the first time. We don't want 
5884
            // being loaded fresh for the first time. We don't want 
 Lines 5915-5920    Link Here 
5915
    nsCOMPtr<nsIURI> oldURI, newURI;
5996
    nsCOMPtr<nsIURI> oldURI, newURI;
5916
    aOldChannel->GetURI(getter_AddRefs(oldURI));
5997
    aOldChannel->GetURI(getter_AddRefs(oldURI));
5917
    aNewChannel->GetURI(getter_AddRefs(newURI));
5998
    aNewChannel->GetURI(getter_AddRefs(newURI));
5999
    mTiming->NotifyRedirectStart(newURI);
5918
    if (!oldURI || !newURI) {
6000
    if (!oldURI || !newURI) {
5919
        return;
6001
        return;
5920
    }
6002
    }
 Lines 6003-6009    Link Here 
6003
    nsCOMPtr<nsIURI> url;
6085
    nsCOMPtr<nsIURI> url;
6004
    nsresult rv = aChannel->GetURI(getter_AddRefs(url));
6086
    nsresult rv = aChannel->GetURI(getter_AddRefs(url));
6005
    if (NS_FAILED(rv)) return rv;
6087
    if (NS_FAILED(rv)) return rv;
6006
  
6088
6089
    mTiming->NotifyNavigationEnd(url);
6090
6007
    // clean up reload state for meta charset
6091
    // clean up reload state for meta charset
6008
    if (eCharsetReloadRequested == mCharsetReloadState)
6092
    if (eCharsetReloadRequested == mCharsetReloadState)
6009
        mCharsetReloadState = eCharsetReloadStopOrigional;
6093
        mCharsetReloadState = eCharsetReloadStopOrigional;
 Lines 11583-11588    Link Here 
11583
#endif
11667
#endif
11584
}
11668
}
11585
11669
11670
NS_IMETHODIMP
11671
nsDocShell::GetNavigationTiming(nsIDOMNavigationTiming** aNavigationTiming)
11672
{
11673
  NS_IF_ADDREF(*aNavigationTiming = mTiming);
11674
  return NS_OK;
11675
}
11676
11586
11677
11587
#ifdef DEBUG
11678
#ifdef DEBUG
11588
unsigned long nsDocShell::gNumberOfDocShells = 0;
11679
unsigned long nsDocShell::gNumberOfDocShells = 0;
(-)a/docshell/base/nsDocShell.h (+5 lines)
Line     Link Here 
 Lines 120-125    Link Here 
120
class nsIController;
120
class nsIController;
121
class OnLinkClickEvent;
121
class OnLinkClickEvent;
122
class nsIScrollableFrame;
122
class nsIScrollableFrame;
123
class nsDOMNavigationTiming;
123
124
124
/* load commands were moved to nsIDocShell.h */
125
/* load commands were moved to nsIDocShell.h */
125
/* load types were moved to nsDocShellLoadTypes.h */
126
/* load types were moved to nsDocShellLoadTypes.h */
 Lines 673-678    Link Here 
673
674
674
    void ClearFrameHistory(nsISHEntry* aEntry);
675
    void ClearFrameHistory(nsISHEntry* aEntry);
675
676
677
    nsresult initTiming(nsIURI* aCurrentURI);
678
676
    // Event type dispatched by RestorePresentation
679
    // Event type dispatched by RestorePresentation
677
    class RestorePresentationEvent : public nsRunnable {
680
    class RestorePresentationEvent : public nsRunnable {
678
    public:
681
    public:
 Lines 825-830    Link Here 
825
828
826
    static nsIURIFixup *sURIFixup;
829
    static nsIURIFixup *sURIFixup;
827
830
831
    nsCOMPtr<nsDOMNavigationTiming> mTiming;
832
828
#ifdef DEBUG
833
#ifdef DEBUG
829
private:
834
private:
830
    // We're counting the number of |nsDocShells| to help find leaks
835
    // We're counting the number of |nsDocShells| to help find leaks
(-)a/docshell/base/nsIDocShell.idl (+6 lines)
Line     Link Here 
 Lines 70-75    Link Here 
70
interface nsIPrincipal;
70
interface nsIPrincipal;
71
interface nsIWebBrowserPrint;
71
interface nsIWebBrowserPrint;
72
interface nsIVariant;
72
interface nsIVariant;
73
interface nsIDOMNavigationTiming;
73
74
74
[scriptable, uuid(98cdbcc4-2d81-4191-a63f-b6c52085edbc)]
75
[scriptable, uuid(98cdbcc4-2d81-4191-a63f-b6c52085edbc)]
75
interface nsIDocShell : nsISupports
76
interface nsIDocShell : nsISupports
 Lines 540-545    Link Here 
540
   * handling link clicks. Docshells are not app tabs unless told otherwise.
541
   * handling link clicks. Docshells are not app tabs unless told otherwise.
541
   */
542
   */
542
  attribute boolean isAppTab;
543
  attribute boolean isAppTab;
544
545
  /**
546
   * Time statistics been collected during last navigations.
547
   */
548
  readonly attribute nsIDOMNavigationTiming navigationTiming;
543
};
549
};
544
550
545
[uuid(5f7a2184-31b6-4d67-9c75-0c17477766e2)]
551
[uuid(5f7a2184-31b6-4d67-9c75-0c17477766e2)]
(-)a/dom/base/Makefile.in (+2 lines)
Line     Link Here 
 Lines 106-111    Link Here 
106
	nsScriptNameSpaceManager.cpp \
106
	nsScriptNameSpaceManager.cpp \
107
	nsDOMScriptObjectFactory.cpp \
107
	nsDOMScriptObjectFactory.cpp \
108
	nsQueryContentEventResult.cpp \
108
	nsQueryContentEventResult.cpp \
109
	nsDOMNavigationTiming.cpp \
110
	nsPerformance.cpp	\
109
	$(NULL)
111
	$(NULL)
110
112
111
ifdef MOZ_IPC
113
ifdef MOZ_IPC
(-)a/dom/base/nsDOMClassInfo.cpp (+14 lines)
Line     Link Here 
 Lines 118-123    Link Here 
118
#include "nsIDOMMediaList.h"
118
#include "nsIDOMMediaList.h"
119
#include "nsIDOMChromeWindow.h"
119
#include "nsIDOMChromeWindow.h"
120
#include "nsIDOMConstructor.h"
120
#include "nsIDOMConstructor.h"
121
#include "nsIDOMNavigationTiming.h"
122
#include "nsIDOMPerformance.h"
121
#include "nsClientRect.h"
123
#include "nsClientRect.h"
122
124
123
// DOM core includes
125
// DOM core includes
 Lines 666-671    Link Here 
666
  NS_DEFINE_CLASSINFO_DATA(History, nsHistorySH,
668
  NS_DEFINE_CLASSINFO_DATA(History, nsHistorySH,
667
                           ARRAY_SCRIPTABLE_FLAGS |
669
                           ARRAY_SCRIPTABLE_FLAGS |
668
                           nsIXPCScriptable::WANT_PRECREATE)
670
                           nsIXPCScriptable::WANT_PRECREATE)
671
  NS_DEFINE_CLASSINFO_DATA(NavigationTiming, nsDOMGenericSH,
672
                           DOM_DEFAULT_SCRIPTABLE_FLAGS)
673
  NS_DEFINE_CLASSINFO_DATA(Performance, nsDOMGenericSH,
674
                           DOM_DEFAULT_SCRIPTABLE_FLAGS)
669
  NS_DEFINE_CLASSINFO_DATA(Screen, nsDOMGenericSH,
675
  NS_DEFINE_CLASSINFO_DATA(Screen, nsDOMGenericSH,
670
                           DOM_DEFAULT_SCRIPTABLE_FLAGS)
676
                           DOM_DEFAULT_SCRIPTABLE_FLAGS)
671
  NS_DEFINE_CLASSINFO_DATA(DOMPrototype, nsDOMConstructorSH,
677
  NS_DEFINE_CLASSINFO_DATA(DOMPrototype, nsDOMConstructorSH,
 Lines 2291-2296    Link Here 
2291
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHistory)
2297
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHistory)
2292
  DOM_CLASSINFO_MAP_END
2298
  DOM_CLASSINFO_MAP_END
2293
2299
2300
  DOM_CLASSINFO_MAP_BEGIN(NavigationTiming, nsIDOMNavigationTiming)
2301
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMNavigationTiming)
2302
  DOM_CLASSINFO_MAP_END
2303
2304
  DOM_CLASSINFO_MAP_BEGIN(Performance, nsIDOMPerformance)
2305
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMPerformance)
2306
  DOM_CLASSINFO_MAP_END
2307
2294
  DOM_CLASSINFO_MAP_BEGIN(Screen, nsIDOMScreen)
2308
  DOM_CLASSINFO_MAP_BEGIN(Screen, nsIDOMScreen)
2295
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMScreen)
2309
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMScreen)
2296
  DOM_CLASSINFO_MAP_END
2310
  DOM_CLASSINFO_MAP_END
(-)a/dom/base/nsDOMClassInfoClasses.h (+2 lines)
Line     Link Here 
 Lines 45-50    Link Here 
45
DOMCI_CLASS(MimeTypeArray)
45
DOMCI_CLASS(MimeTypeArray)
46
DOMCI_CLASS(BarProp)
46
DOMCI_CLASS(BarProp)
47
DOMCI_CLASS(History)
47
DOMCI_CLASS(History)
48
DOMCI_CLASS(NavigationTiming)
49
DOMCI_CLASS(Performance)
48
DOMCI_CLASS(Screen)
50
DOMCI_CLASS(Screen)
49
DOMCI_CLASS(DOMPrototype)
51
DOMCI_CLASS(DOMPrototype)
50
DOMCI_CLASS(DOMConstructor)
52
DOMCI_CLASS(DOMConstructor)
(-)e1983b9db75d (+205 lines)
Added Link Here 
Added Link Here 
1
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2
/* ***** BEGIN LICENSE BLOCK *****
3
 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
4
 *
5
 * The contents of this file are subject to the Mozilla Public License Version
6
 * 1.1 (the "License"); you may not use this file except in compliance with
7
 * the License. You may obtain a copy of the License at
8
 * http://www.mozilla.org/MPL/
9
 *
10
 * Software distributed under the License is distributed on an "AS IS" basis,
11
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12
 * for the specific language governing rights and limitations under the
13
 * License.
14
 *
15
 * The Original Code is implementation of Web Timing draft specification
16
 * http://dev.w3.org/2006/webapi/WebTiming/
17
 *
18
 * The Initial Developer of the Original Code is Google Inc.
19
 * Portions created by the Initial Developer are Copyright (C) 2010
20
 * the Initial Developer. All Rights Reserved.
21
 *
22
 * Contributor(s):
23
 *   Sergey Novikov <sergeyn@google.com> (original author)
24
 *
25
 * Alternatively, the contents of this file may be used under the terms of
26
 * either of the GNU General Public License Version 2 or later (the "GPL"),
27
 * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
28
 * in which case the provisions of the GPL or the LGPL are applicable instead
29
 * of those above. If you wish to allow use of your version of this file only
30
 * under the terms of either the GPL or the LGPL, and not to allow others to
31
 * use your version of this file under the terms of the MPL, indicate your
32
 * decision by deleting the provisions above and replace them with the notice
33
 * and other provisions required by the GPL or the LGPL. If you do not delete
34
 * the provisions above, a recipient may use your version of this file under
35
 * the terms of any one of the MPL, the GPL or the LGPL.
36
 *
37
 * ***** END LICENSE BLOCK ***** */
38
39
#include "nsDOMNavigationTiming.h"
40
#include "nsCOMPtr.h"
41
#include "nscore.h"
42
#include "prinrval.h"
43
#include "nsContentUtils.h"
44
45
#define _IMPL_NS_LAYOUT 1
46
#include "nsDOMClassInfo.h"
47
48
// Helper class.
49
class nsDOMNavigationTimingClock
50
{
51
public:
52
  nsDOMNavigationTimingClock() { Reset(); }
53
54
  void Reset()
55
  {
56
    mStartMilliSec = PR_Now()/PR_USEC_PER_MSEC;
57
    mIntervalEpoch = PR_IntervalNow();
58
  }
59
60
  PRUint64 GetTimeMilliSec()
61
  {
62
    return mStartMilliSec +
63
           PR_IntervalToMilliseconds(PR_IntervalNow() - mIntervalEpoch);
64
  }
65
private:
66
  PRUint64 mStartMilliSec;
67
  PRIntervalTime mIntervalEpoch;
68
};
69
  
70
71
nsDOMNavigationTiming::nsDOMNavigationTiming() : mClock(new nsDOMNavigationTimingClock)
72
{
73
  Clear();
74
}
75
76
nsDOMNavigationTiming::~nsDOMNavigationTiming()
77
{
78
  delete mClock;
79
}
80
81
void
82
nsDOMNavigationTiming::Clear()
83
{
84
  mClock->Reset();
85
  mNavigationType = nsIDOMNavigationTiming::NAVIGATION_OTHER;
86
  mNavigationStart = 0;
87
  mRedirectStart = 0;
88
  mRedirectCount = 0;
89
  mLastUnload = 0;
90
  mNavigationEnd = 0;
91
}
92
93
void
94
nsDOMNavigationTiming::NotifyNavigationStart(nsIURI* aURI,
95
    nsDOMNavigationTimingType aNavigationType)
96
{
97
  Clear();
98
  mNavigationType = aNavigationType;
99
  mNavigationStart = mClock->GetTimeMilliSec();
100
  mCurrentURI = aURI;
101
}
102
103
void
104
nsDOMNavigationTiming::NotifyRedirectStart(nsIURI* aURI)
105
{
106
  if (mRedirectCount == 0)
107
    mRedirectStart = mNavigationStart;
108
109
  mNavigationStart = mClock->GetTimeMilliSec();
110
  ++mRedirectCount;
111
  mCurrentURI = aURI;
112
}
113
114
void
115
nsDOMNavigationTiming::NotifyLastUnload(nsIURI* aURI)
116
{
117
  mLastUnload = mClock->GetTimeMilliSec();
118
  mUnloadedURI = aURI;
119
}
120
121
void
122
nsDOMNavigationTiming::NotifyNavigationEnd(nsIURI* aURI)
123
{
124
  mNavigationEnd = mClock->GetTimeMilliSec();
125
  mCurrentURI = aURI;
126
}
127
128
void
129
nsDOMNavigationTiming::SetRequestorURI(nsIURI* aURI)
130
{
131
  mRequestorURI = aURI;
132
}
133
134
DOMCI_DATA(NavigationTiming, nsDOMNavigationTiming)
135
136
NS_IMPL_ADDREF(nsDOMNavigationTiming)
137
NS_IMPL_RELEASE(nsDOMNavigationTiming)
138
139
// QueryInterface implementation for nsDOMNavigationTiming
140
NS_INTERFACE_MAP_BEGIN(nsDOMNavigationTiming)
141
  NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIDOMNavigationTiming)
142
  NS_INTERFACE_MAP_ENTRY(nsIDOMNavigationTiming)
143
  NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(NavigationTiming)
144
NS_INTERFACE_MAP_END
145
146
NS_IMETHODIMP
147
nsDOMNavigationTiming::GetUserNavigationType(
148
    nsDOMNavigationTimingType* aNavigationType)
149
{
150
  nsIScriptSecurityManager* ssm = nsContentUtils::GetSecurityManager();
151
  // TODO: Do we want a trace in the error console?
152
  nsresult rv =
153
       ssm->CheckSameOriginURI(mRequestorURI, mCurrentURI, PR_TRUE);
154
  NS_ENSURE_SUCCESS(rv, rv);
155
  *aNavigationType = mNavigationType;
156
  return NS_OK;
157
}
158
159
NS_IMETHODIMP
160
nsDOMNavigationTiming::GetNavigationStart(DOMTimeMilliSec* aNavigationStart)
161
{
162
  nsIScriptSecurityManager* ssm = nsContentUtils::GetSecurityManager();
163
  // TODO: Do we want a trace in the error console?
164
  nsresult rv =
165
       ssm->CheckSameOriginURI(mRequestorURI, mCurrentURI, PR_TRUE);
166
  NS_ENSURE_SUCCESS(rv, rv);
167
  *aNavigationStart = mNavigationStart;
168
  return NS_OK;
169
}
170
171
NS_IMETHODIMP
172
nsDOMNavigationTiming::GetRedirectStart(DOMTimeMilliSec* aRedirectStart)
173
{
174
  // TODO: Security check accorting to spec (urls before and after redirect).
175
  *aRedirectStart = mRedirectStart;
176
  return NS_OK;
177
}
178
179
NS_IMETHODIMP
180
nsDOMNavigationTiming::GetRedirectCount(PRUint16* aRedirectCount)
181
{
182
  // TODO: Security check accorting to spec (urls before and after redirect).
183
  *aRedirectCount = mRedirectCount;
184
  return NS_OK;
185
}
186
187
NS_IMETHODIMP
188
nsDOMNavigationTiming::GetLastUnload(DOMTimeMilliSec* aLastUnload)
189
{
190
  // TODO: Security check accorting to spec (unloades vs requestor).
191
  *aLastUnload = mLastUnload;
192
  return NS_OK;
193
}
194
195
NS_IMETHODIMP
196
nsDOMNavigationTiming::GetNavigationEnd(DOMTimeMilliSec* aNavigationEnd)
197
{
198
  nsIScriptSecurityManager* ssm = nsContentUtils::GetSecurityManager();
199
  // TODO: Do we want a trace in the error console?
200
  nsresult rv =
201
       ssm->CheckSameOriginURI(mRequestorURI, mCurrentURI, PR_TRUE);
202
  NS_ENSURE_SUCCESS(rv, rv);
203
  *aNavigationEnd = mNavigationEnd;
204
  return NS_OK;
205
}
(-)e1983b9db75d (+84 lines)
Added Link Here 
Added Link Here 
1
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2
/* ***** BEGIN LICENSE BLOCK *****
3
 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
4
 *
5
 * The contents of this file are subject to the Mozilla Public License Version
6
 * 1.1 (the "License"); you may not use this file except in compliance with
7
 * the License. You may obtain a copy of the License at
8
 * http://www.mozilla.org/MPL/
9
 *
10
 * Software distributed under the License is distributed on an "AS IS" basis,
11
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12
 * for the specific language governing rights and limitations under the
13
 * License.
14
 *
15
 * The Original Code is implementation of Web Timing draft specification
16
 * http://dev.w3.org/2006/webapi/WebTiming/
17
 *
18
 * The Initial Developer of the Original Code is Google Inc.
19
 * Portions created by the Initial Developer are Copyright (C) 2010
20
 * the Initial Developer. All Rights Reserved.
21
 *
22
 * Contributor(s):
23
 *   Sergey Novikov <sergeyn@google.com> (original author)
24
 *
25
 * Alternatively, the contents of this file may be used under the terms of
26
 * either of the GNU General Public License Version 2 or later (the "GPL"),
27
 * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
28
 * in which case the provisions of the GPL or the LGPL are applicable instead
29
 * of those above. If you wish to allow use of your version of this file only
30
 * under the terms of either the GPL or the LGPL, and not to allow others to
31
 * use your version of this file under the terms of the MPL, indicate your
32
 * decision by deleting the provisions above and replace them with the notice
33
 * and other provisions required by the GPL or the LGPL. If you do not delete
34
 * the provisions above, a recipient may use your version of this file under
35
 * the terms of any one of the MPL, the GPL or the LGPL.
36
 *
37
 * ***** END LICENSE BLOCK ***** */
38
39
#ifndef nsDOMNavigationTiming_h___
40
#define nsDOMNavigationTiming_h___
41
42
#include "nsIDOMNavigationTiming.h"
43
#include "nscore.h"
44
#include "nsCOMPtr.h"
45
46
class nsDOMNavigationTimingClock;
47
class nsIURI;
48
49
class nsDOMNavigationTiming : public nsIDOMNavigationTiming
50
{
51
public:
52
  nsDOMNavigationTiming();
53
54
  NS_DECL_ISUPPORTS
55
  NS_DECL_NSIDOMNAVIGATIONTIMING
56
57
  void NotifyNavigationStart(nsIURI* aURI, 
58
                             nsDOMNavigationTimingType aNavigationType);
59
  void NotifyRedirectStart(nsIURI* aURI);
60
  void NotifyLastUnload(nsIURI* aURI);
61
  void NotifyNavigationEnd(nsIURI* aURI);
62
  void SetRequestorURI(nsIURI* aURI);
63
64
private:
65
  nsDOMNavigationTiming(const nsDOMNavigationTiming &){};
66
  ~nsDOMNavigationTiming();
67
  void Clear();
68
69
  nsDOMNavigationTimingClock* mClock;
70
71
  nsCOMPtr<nsIURI> mUnloadedURI;
72
  nsCOMPtr<nsIURI> mCurrentURI;
73
  nsCOMPtr<nsIURI> mRequestorURI;
74
75
  nsDOMNavigationTimingType mNavigationType;
76
  DOMTimeMilliSec mNavigationStart;
77
  DOMTimeMilliSec mRedirectStart;
78
  PRUint16 mRedirectCount;
79
  DOMTimeMilliSec mLastUnload;
80
  DOMTimeMilliSec mNavigationEnd;
81
};
82
83
#endif /* nsDOMNavigationTiming_h___ */
84
(-)a/dom/base/nsGlobalWindow.cpp (+28 lines)
Line     Link Here 
 Lines 53-58    Link Here 
53
#include "nsGlobalWindow.h"
53
#include "nsGlobalWindow.h"
54
#include "nsScreen.h"
54
#include "nsScreen.h"
55
#include "nsHistory.h"
55
#include "nsHistory.h"
56
#include "nsPerformance.h"
56
#include "nsBarProps.h"
57
#include "nsBarProps.h"
57
#include "nsDOMStorage.h"
58
#include "nsDOMStorage.h"
58
#include "nsDOMOfflineResourceList.h"
59
#include "nsDOMOfflineResourceList.h"
 Lines 1089-1094    Link Here 
1089
  mFrames = nsnull;
1090
  mFrames = nsnull;
1090
  mApplicationCache = nsnull;
1091
  mApplicationCache = nsnull;
1091
  mIndexedDB = nsnull;
1092
  mIndexedDB = nsnull;
1093
  mPerformance = nsnull;
1092
1094
1093
  ClearControllers();
1095
  ClearControllers();
1094
1096
 Lines 2142-2147    Link Here 
2142
                                           html_doc);
2144
                                           html_doc);
2143
  }
2145
  }
2144
2146
2147
  // Force performance to be reinitialized if requested
2148
  if (newInnerWindow) {
2149
    newInnerWindow->mPerformance = nsnull;
2150
  }
2151
2145
  if (aDocument) {
2152
  if (aDocument) {
2146
    aDocument->SetScriptGlobalObject(newInnerWindow);
2153
    aDocument->SetScriptGlobalObject(newInnerWindow);
2147
  }
2154
  }
 Lines 2915-2920    Link Here 
2915
}
2922
}
2916
2923
2917
NS_IMETHODIMP
2924
NS_IMETHODIMP
2925
nsGlobalWindow::GetMozPerformance(nsIDOMPerformance** aPerformance)
2926
{
2927
  FORWARD_TO_INNER(GetMozPerformance, (aPerformance), NS_ERROR_NOT_INITIALIZED);
2928
2929
  *aPerformance = nsnull;
2930
2931
  nsIDocShell* docShell = GetDocShell();
2932
  if (!mPerformance && docShell) {
2933
    mPerformance = new nsPerformance(docShell);
2934
    if (!mPerformance) {
2935
      return NS_ERROR_OUT_OF_MEMORY;
2936
    }
2937
    // mPerformance is cleared in SetNewDocument()
2938
    mPerformance->SetRequestorURI(mDoc->GetDocumentURI());
2939
  }
2940
2941
  NS_IF_ADDREF(*aPerformance = mPerformance);
2942
  return NS_OK;
2943
}
2944
2945
NS_IMETHODIMP
2918
nsGlobalWindow::GetParent(nsIDOMWindow** aParent)
2946
nsGlobalWindow::GetParent(nsIDOMWindow** aParent)
2919
{
2947
{
2920
  FORWARD_TO_OUTER(GetParent, (aParent), NS_ERROR_NOT_INITIALIZED);
2948
  FORWARD_TO_OUTER(GetParent, (aParent), NS_ERROR_NOT_INITIALIZED);
(-)a/dom/base/nsGlobalWindow.h (+2 lines)
Line     Link Here 
 Lines 137-142    Link Here 
137
class nsNavigator;
137
class nsNavigator;
138
class nsScreen;
138
class nsScreen;
139
class nsHistory;
139
class nsHistory;
140
class nsPerformance;
140
class nsIDocShellLoadInfo;
141
class nsIDocShellLoadInfo;
141
class WindowStateHolder;
142
class WindowStateHolder;
142
class nsGlobalWindowObserver;
143
class nsGlobalWindowObserver;
 Lines 877-882    Link Here 
877
  nsRefPtr<nsNavigator>         mNavigator;
878
  nsRefPtr<nsNavigator>         mNavigator;
878
  nsRefPtr<nsScreen>            mScreen;
879
  nsRefPtr<nsScreen>            mScreen;
879
  nsRefPtr<nsHistory>           mHistory;
880
  nsRefPtr<nsHistory>           mHistory;
881
  nsRefPtr<nsPerformance>       mPerformance;
880
  nsRefPtr<nsDOMWindowList>     mFrames;
882
  nsRefPtr<nsDOMWindowList>     mFrames;
881
  nsRefPtr<nsBarProp>           mMenubar;
883
  nsRefPtr<nsBarProp>           mMenubar;
882
  nsRefPtr<nsBarProp>           mToolbar;
884
  nsRefPtr<nsBarProp>           mToolbar;
(-)e1983b9db75d (+96 lines)
Added Link Here 
Added Link Here 
1
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2
/* ***** BEGIN LICENSE BLOCK *****
3
 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
4
 *
5
 * The contents of this file are subject to the Mozilla Public License Version
6
 * 1.1 (the "License"); you may not use this file except in compliance with
7
 * the License. You may obtain a copy of the License at
8
 * http://www.mozilla.org/MPL/
9
 *
10
 * Software distributed under the License is distributed on an "AS IS" basis,
11
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12
 * for the specific language governing rights and limitations under the
13
 * License.
14
 *
15
 * The Original Code is implementation of Web Timing draft specification
16
 * http://dev.w3.org/2006/webapi/WebTiming/
17
 *
18
 * The Initial Developer of the Original Code is Google Inc.
19
 * Portions created by the Initial Developer are Copyright (C) 2010
20
 * the Initial Developer. All Rights Reserved.
21
 *
22
 * Contributor(s):
23
 *   Sergey Novikov <sergeyn@google.com> (original author)
24
 *
25
 * Alternatively, the contents of this file may be used under the terms of
26
 * either of the GNU General Public License Version 2 or later (the "GPL"),
27
 * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
28
 * in which case the provisions of the GPL or the LGPL are applicable instead
29
 * of those above. If you wish to allow use of your version of this file only
30
 * under the terms of either the GPL or the LGPL, and not to allow others to
31
 * use your version of this file under the terms of the MPL, indicate your
32
 * decision by deleting the provisions above and replace them with the notice
33
 * and other provisions required by the GPL or the LGPL. If you do not delete
34
 * the provisions above, a recipient may use your version of this file under
35
 * the terms of any one of the MPL, the GPL or the LGPL.
36
 *
37
 * ***** END LICENSE BLOCK ***** */
38
39
#include "nsPerformance.h"
40
#include "nsCOMPtr.h"
41
#include "nscore.h"
42
#include "nsIDocShell.h"
43
#include "nsDOMClassInfo.h"
44
#include "nsDOMNavigationTiming.h"
45
46
nsPerformance::nsPerformance(nsIDocShell* aDocShell)
47
{
48
  SetDocShell(aDocShell);
49
}
50
51
nsPerformance::~nsPerformance()
52
{
53
}
54
55
DOMCI_DATA(Performance, nsPerformance)
56
57
NS_IMPL_ADDREF(nsPerformance)
58
NS_IMPL_RELEASE(nsPerformance)
59
60
// QueryInterface implementation for nsPerformance
61
NS_INTERFACE_MAP_BEGIN(nsPerformance)
62
  NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIDOMPerformance)
63
  NS_INTERFACE_MAP_ENTRY(nsIDOMPerformance)
64
  NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(Performance)
65
NS_INTERFACE_MAP_END
66
67
void
68
nsPerformance::SetDocShell(nsIDocShell* aDocShell)
69
{
70
  mDocShell = do_GetWeakReference(aDocShell);
71
}
72
73
void
74
nsPerformance::SetRequestorURI(nsIURI* aURI)
75
{
76
  mRequestorURI = aURI;
77
}
78
79
//
80
// nsIDOMPerformance methods
81
//
82
NS_IMETHODIMP
83
nsPerformance::GetTiming(nsIDOMNavigationTiming** aNavigationTiming)
84
{
85
  *aNavigationTiming = nsnull;
86
87
  nsCOMPtr<nsIDocShell> docShell(do_QueryReferent(mDocShell));
88
  NS_ENSURE_TRUE(docShell, NS_ERROR_NOT_AVAILABLE);
89
90
  nsresult rv = docShell->GetNavigationTiming(aNavigationTiming);
91
  NS_ENSURE_SUCCESS(rv, rv);
92
  static_cast<nsDOMNavigationTiming*>(*aNavigationTiming)
93
      ->SetRequestorURI(mRequestorURI);
94
  return NS_OK; 
95
}
96
(-)e1983b9db75d (+68 lines)
Added Link Here 
Added Link Here 
1
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2
/* ***** BEGIN LICENSE BLOCK *****
3
 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
4
 *
5
 * The contents of this file are subject to the Mozilla Public License Version
6
 * 1.1 (the "License"); you may not use this file except in compliance with
7
 * the License. You may obtain a copy of the License at
8
 * http://www.mozilla.org/MPL/
9
 *
10
 * Software distributed under the License is distributed on an "AS IS" basis,
11
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12
 * for the specific language governing rights and limitations under the
13
 * License.
14
 *
15
 * The Original Code is implementation of Web Timing draft specification
16
 * http://dev.w3.org/2006/webapi/WebTiming/
17
 *
18
 * The Initial Developer of the Original Code is Google Inc.
19
 * Portions created by the Initial Developer are Copyright (C) 2010
20
 * the Initial Developer. All Rights Reserved.
21
 *
22
 * Contributor(s):
23
 *   Sergey Novikov <sergeyn@google.com> (original author)
24
 *
25
 * Alternatively, the contents of this file may be used under the terms of
26
 * either of the GNU General Public License Version 2 or later (the "GPL"),
27
 * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
28
 * in which case the provisions of the GPL or the LGPL are applicable instead
29
 * of those above. If you wish to allow use of your version of this file only
30
 * under the terms of either the GPL or the LGPL, and not to allow others to
31
 * use your version of this file under the terms of the MPL, indicate your
32
 * decision by deleting the provisions above and replace them with the notice
33
 * and other provisions required by the GPL or the LGPL. If you do not delete
34
 * the provisions above, a recipient may use your version of this file under
35
 * the terms of any one of the MPL, the GPL or the LGPL.
36
 *
37
 * ***** END LICENSE BLOCK ***** */
38
#ifndef nsPerformance_h___
39
#define nsPerformance_h___
40
41
#include "nsIDOMPerformance.h"
42
#include "nscore.h"
43
#include "nsWeakPtr.h"
44
45
class nsIDocShell;
46
class nsIURI;
47
48
// Script "performance" object
49
class nsPerformance : public nsIDOMPerformance
50
{
51
public:
52
  nsPerformance(nsIDocShell* aDocShell);
53
54
  NS_DECL_ISUPPORTS
55
  NS_DECL_NSIDOMPERFORMANCE
56
57
  void SetDocShell(nsIDocShell* aDocShell);
58
  void SetRequestorURI(nsIURI* aURI);
59
60
private:
61
  ~nsPerformance();
62
63
  nsWeakPtr mDocShell;
64
  nsCOMPtr<nsIURI> mRequestorURI;
65
};
66
67
#endif /* nsPerformance_h___ */
68
(-)a/dom/interfaces/base/Makefile.in (+2 lines)
Line     Link Here 
 Lines 86-91    Link Here 
86
	nsITabChild.idl				\
86
	nsITabChild.idl				\
87
	nsITabParent.idl			\
87
	nsITabParent.idl			\
88
	nsIDOMGlobalPropertyInitializer.idl	\
88
	nsIDOMGlobalPropertyInitializer.idl	\
89
	nsIDOMPerformance.idl			\
90
	nsIDOMNavigationTiming.idl		\
89
	$(NULL)
91
	$(NULL)
90
92
91
include $(topsrcdir)/config/rules.mk
93
include $(topsrcdir)/config/rules.mk
(-)a/dom/interfaces/base/domstubs.idl (+1 lines)
Line     Link Here 
 Lines 40-45    Link Here 
40
#include "nsISupports.idl"
40
#include "nsISupports.idl"
41
41
42
typedef unsigned long long DOMTimeStamp;
42
typedef unsigned long long DOMTimeStamp;
43
typedef unsigned long long DOMTimeMilliSec;
43
44
44
// Core
45
// Core
45
interface nsIDOMAttr;
46
interface nsIDOMAttr;
(-)e1983b9db75d (+73 lines)
Added Link Here 
Added Link Here 
1
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2
/* ***** BEGIN LICENSE BLOCK *****
3
 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
4
 *
5
 * The contents of this file are subject to the Mozilla Public License Version
6
 * 1.1 (the "License"); you may not use this file except in compliance with
7
 * the License. You may obtain a copy of the License at
8
 * http://www.mozilla.org/MPL/
9
 *
10
 * Software distributed under the License is distributed on an "AS IS" basis,
11
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12
 * for the specific language governing rights and limitations under the
13
 * License.
14
 *
15
 * The Original Code is implementation of Web Timing draft specification
16
 * http://dev.w3.org/2006/webapi/WebTiming/
17
 *
18
 * The Initial Developer of the Original Code is Google Inc.
19
 * Portions created by the Initial Developer are Copyright (C) 2010
20
 * the Initial Developer. All Rights Reserved.
21
 *
22
 * Contributor(s):
23
 *   Sergey Novikov <sergeyn@google.com> (original author)
24
 *
25
 * Alternatively, the contents of this file may be used under the terms of
26
 * either of the GNU General Public License Version 2 or later (the "GPL"),
27
 * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
28
 * in which case the provisions of the GPL or the LGPL are applicable instead
29
 * of those above. If you wish to allow use of your version of this file only
30
 * under the terms of either the GPL or the LGPL, and not to allow others to
31
 * use your version of this file under the terms of the MPL, indicate your
32
 * decision by deleting the provisions above and replace them with the notice
33
 * and other provisions required by the GPL or the LGPL. If you do not delete
34
 * the provisions above, a recipient may use your version of this file under
35
 * the terms of any one of the MPL, the GPL or the LGPL.
36
 *
37
 * ***** END LICENSE BLOCK ***** */
38
39
#include "domstubs.idl"
40
41
typedef unsigned short nsDOMNavigationTimingType;
42
43
[scriptable, uuid(2a630b50-61b6-41b3-996d-70be67fbbcb0)]
44
interface nsIDOMNavigationTiming : nsISupports
45
{
46
  const nsDOMNavigationTimingType NAVIGATION_OTHER = 0;
47
  const nsDOMNavigationTimingType NAVIGATION_LINK = 1;
48
  const nsDOMNavigationTimingType NAVIGATION_FORWARD_BACK = 2;
49
  const nsDOMNavigationTimingType NAVIGATION_BROWSER = 3;
50
  const nsDOMNavigationTimingType NAVIGATION_NEW_WINDOW = 4;
51
  const nsDOMNavigationTimingType NAVIGATION_RELOAD = 5;
52
  const nsDOMNavigationTimingType NAVIGATION_FRAME = 6;
53
  readonly attribute nsDOMNavigationTimingType userNavigationType;
54
55
  readonly attribute DOMTimeMilliSec redirectStart;
56
  readonly attribute unsigned short redirectCount;
57
  readonly attribute DOMTimeMilliSec navigationStart;
58
  readonly attribute DOMTimeMilliSec lastUnload;
59
  readonly attribute DOMTimeMilliSec navigationEnd;
60
61
  // TODO: Implement commented attributes.
62
  // readonly attribute DOMTimeMilliSec redirectEnd;
63
  // readonly attribute DOMTimeMilliSec fetchStart;
64
  // readonly attribute DOMTimeMilliSec domainLookupStart;
65
  // readonly attribute DOMTimeMilliSec domainLookupEnd;
66
  // readonly attribute DOMTimeMilliSec connectStart;
67
  // readonly attribute DOMTimeMilliSec connectEnd;
68
  // readonly attribute DOMTimeMilliSec requestStart;
69
  // readonly attribute DOMTimeMilliSec requestEnd;
70
  // readonly attribute DOMTimeMilliSec responseStart;
71
  // readonly attribute DOMTimeMilliSec responseEnd;
72
};
73
(-)e1983b9db75d (+48 lines)
Added Link Here 
Added Link Here 
1
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2
/* ***** BEGIN LICENSE BLOCK *****
3
 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
4
 *
5
 * The contents of this file are subject to the Mozilla Public License Version
6
 * 1.1 (the "License"); you may not use this file except in compliance with
7
 * the License. You may obtain a copy of the License at
8
 * http://www.mozilla.org/MPL/
9
 *
10
 * Software distributed under the License is distributed on an "AS IS" basis,
11
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12
 * for the specific language governing rights and limitations under the
13
 * License.
14
 *
15
 * The Original Code is implementation of Web Timing draft specification
16
 * http://dev.w3.org/2006/webapi/WebTiming/
17
 *
18
 * The Initial Developer of the Original Code is Google Inc.
19
 * Portions created by the Initial Developer are Copyright (C) 2010
20
 * the Initial Developer. All Rights Reserved.
21
 *
22
 * Contributor(s):
23
 *   Sergey Novikov <sergeyn@google.com> (original author)
24
 *
25
 * Alternatively, the contents of this file may be used under the terms of
26
 * either of the GNU General Public License Version 2 or later (the "GPL"),
27
 * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
28
 * in which case the provisions of the GPL or the LGPL are applicable instead
29
 * of those above. If you wish to allow use of your version of this file only
30
 * under the terms of either the GPL or the LGPL, and not to allow others to
31
 * use your version of this file under the terms of the MPL, indicate your
32
 * decision by deleting the provisions above and replace them with the notice
33
 * and other provisions required by the GPL or the LGPL. If you do not delete
34
 * the provisions above, a recipient may use your version of this file under
35
 * the terms of any one of the MPL, the GPL or the LGPL.
36
 *
37
 * ***** END LICENSE BLOCK ***** */
38
39
#include "nsISupports.idl"
40
interface nsIDOMNavigationTiming;
41
interface nsIURI;
42
43
[scriptable, uuid(446faf26-000b-4e66-a5fd-ae37c5ed6beb)]
44
interface nsIDOMPerformance : nsISupports
45
{
46
  readonly attribute nsIDOMNavigationTiming timing;
47
};
48
(-)a/dom/interfaces/base/nsIDOMWindowInternal.idl (-1 / +7 lines)
Line     Link Here 
 Lines 42-51    Link Here 
42
interface nsIPrompt;
42
interface nsIPrompt;
43
interface nsIControllers;
43
interface nsIControllers;
44
interface nsIDOMLocation;
44
interface nsIDOMLocation;
45
interface nsIDOMPerformance;
45
interface nsIVariant;
46
interface nsIVariant;
46
interface nsIAnimationFrameListener;
47
interface nsIAnimationFrameListener;
47
48
48
[scriptable, uuid(9d6a1157-0719-46a7-b49f-7ffeaa0b5c86)]
49
[scriptable, uuid(5930f197-259e-4f6b-aeca-c96a74518cc6)]
49
interface nsIDOMWindowInternal : nsIDOMWindow2
50
interface nsIDOMWindowInternal : nsIDOMWindow2
50
{
51
{
51
  readonly attribute nsIDOMWindowInternal        window;
52
  readonly attribute nsIDOMWindowInternal        window;
 Lines 232-237    Link Here 
232
   * The current animation start time in milliseconds since the epoch.
233
   * The current animation start time in milliseconds since the epoch.
233
   */
234
   */
234
  readonly attribute long long mozAnimationStartTime;
235
  readonly attribute long long mozAnimationStartTime;
236
237
  /**
238
   * A namespace to hold performance related data and statistics.
239
   */
240
  readonly attribute nsIDOMPerformance mozPerformance;
235
};
241
};
236
242
237
[scriptable, uuid(8fc58f56-f769-4368-a098-edd08550cf1a)]
243
[scriptable, uuid(8fc58f56-f769-4368-a098-edd08550cf1a)]

Return to bug 570341
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载