Closed Bug 1166570 Opened 9 years ago Closed 9 years ago

The time which is the argument of requestAnimationFrameCallback seems to be wrong in frame

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: hiro, Unassigned)

Details

I can not provide valid test here but I cloud confirm it with below diff. diff --git a/layout/base/nsRefreshDriver.cpp b/layout/base/nsRefreshDriver.cpp --- a/layout/base/nsRefreshDriver.cpp +++ b/layout/base/nsRefreshDriver.cpp @@ -1530,16 +1547,20 @@ nsRefreshDriver::RunFrameRequestCallback // window in some cases. nsPIDOMWindow* innerWindow = docCallbacks.mDocument->GetInnerWindow(); DOMHighResTimeStamp timeStamp = 0; if (innerWindow && innerWindow->IsInnerWindow()) { nsPerformance* perf = innerWindow->GetPerformance(); if (perf) { timeStamp = perf->GetDOMTiming()->TimeStampToDOMHighRes(aNowTime); } + nsIURI *uri = innerWindow->GetDocumentURI(); + nsAutoCString spec; + uri->GetSpec(spec); + printf("raf = %f on %s\n", (float)timeStamp, spec.get()); // else window is partially torn down already } for (uint32_t j = 0; j < docCallbacks.mCallbacks.Length(); ++j) { const nsIDocument::FrameRequestCallbackHolder& holder = docCallbacks.mCallbacks[j]; nsAutoMicroTask mt; if (holder.HasWebIDLCallback()) { ErrorResult ignored; In iframe, the document URI is not the iframe one, is the parent of the iframe.
Oops! I am very sorry. I was confused that the HTML file names. I named: The parent is frame_timing_main_test_in_iframe.html The child in iframe is frame_timing_main_test.html So the time of requestAnimationFrameCallback is totally fine!
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → INVALID
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.