Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(365)

Side by Side Diff: Source/core/frame/LocalDOMWindow.cpp

Issue 1043903003: rAF: Introduce FrameRequestCallbackCollection for managing rAF callbacks. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: . Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/frame/LocalDOMWindow.h ('k') | Source/core/frame/RemoteDOMWindow.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 18 matching lines...) Expand all
29 29
30 #include "bindings/core/v8/ScriptController.h" 30 #include "bindings/core/v8/ScriptController.h"
31 #include "core/css/CSSComputedStyleDeclaration.h" 31 #include "core/css/CSSComputedStyleDeclaration.h"
32 #include "core/css/CSSRuleList.h" 32 #include "core/css/CSSRuleList.h"
33 #include "core/css/DOMWindowCSS.h" 33 #include "core/css/DOMWindowCSS.h"
34 #include "core/css/MediaQueryList.h" 34 #include "core/css/MediaQueryList.h"
35 #include "core/css/MediaQueryMatcher.h" 35 #include "core/css/MediaQueryMatcher.h"
36 #include "core/css/StyleMedia.h" 36 #include "core/css/StyleMedia.h"
37 #include "core/css/resolver/StyleResolver.h" 37 #include "core/css/resolver/StyleResolver.h"
38 #include "core/dom/DOMImplementation.h" 38 #include "core/dom/DOMImplementation.h"
39 #include "core/dom/RequestAnimationFrameCallback.h" 39 #include "core/dom/FrameRequestCallback.h"
40 #include "core/editing/Editor.h" 40 #include "core/editing/Editor.h"
41 #include "core/events/DOMWindowEventQueue.h" 41 #include "core/events/DOMWindowEventQueue.h"
42 #include "core/events/HashChangeEvent.h" 42 #include "core/events/HashChangeEvent.h"
43 #include "core/events/MessageEvent.h" 43 #include "core/events/MessageEvent.h"
44 #include "core/events/PageTransitionEvent.h" 44 #include "core/events/PageTransitionEvent.h"
45 #include "core/events/PopStateEvent.h" 45 #include "core/events/PopStateEvent.h"
46 #include "core/frame/BarProp.h" 46 #include "core/frame/BarProp.h"
47 #include "core/frame/Console.h" 47 #include "core/frame/Console.h"
48 #include "core/frame/EventHandlerRegistry.h" 48 #include "core/frame/EventHandlerRegistry.h"
49 #include "core/frame/FrameConsole.h" 49 #include "core/frame/FrameConsole.h"
(...skipping 1283 matching lines...) Expand 10 before | Expand all | Expand 10 after
1333 FrameHost* host = frame()->host(); 1333 FrameHost* host = frame()->host();
1334 if (!host) 1334 if (!host)
1335 return; 1335 return;
1336 1336
1337 IntRect fr = host->chrome().windowRect(); 1337 IntRect fr = host->chrome().windowRect();
1338 IntSize dest = IntSize(hasWidth ? width : fr.width(), hasHeight ? height : f r.height()); 1338 IntSize dest = IntSize(hasWidth ? width : fr.width(), hasHeight ? height : f r.height());
1339 IntRect update(fr.location(), dest); 1339 IntRect update(fr.location(), dest);
1340 host->chrome().setWindowRect(adjustWindowRect(*frame(), update)); 1340 host->chrome().setWindowRect(adjustWindowRect(*frame(), update));
1341 } 1341 }
1342 1342
1343 int LocalDOMWindow::requestAnimationFrame(RequestAnimationFrameCallback* callbac k) 1343 int LocalDOMWindow::requestAnimationFrame(FrameRequestCallback* callback)
1344 { 1344 {
1345 callback->m_useLegacyTimeBase = false; 1345 callback->m_useLegacyTimeBase = false;
1346 if (Document* d = document()) 1346 if (Document* d = document())
1347 return d->requestAnimationFrame(callback); 1347 return d->requestAnimationFrame(callback);
1348 return 0; 1348 return 0;
1349 } 1349 }
1350 1350
1351 int LocalDOMWindow::webkitRequestAnimationFrame(RequestAnimationFrameCallback* c allback) 1351 int LocalDOMWindow::webkitRequestAnimationFrame(FrameRequestCallback* callback)
1352 { 1352 {
1353 callback->m_useLegacyTimeBase = true; 1353 callback->m_useLegacyTimeBase = true;
1354 if (Document* d = document()) 1354 if (Document* d = document())
1355 return d->requestAnimationFrame(callback); 1355 return d->requestAnimationFrame(callback);
1356 return 0; 1356 return 0;
1357 } 1357 }
1358 1358
1359 void LocalDOMWindow::cancelAnimationFrame(int id) 1359 void LocalDOMWindow::cancelAnimationFrame(int id)
1360 { 1360 {
1361 if (Document* d = document()) 1361 if (Document* d = document())
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
1659 return m_frameObserver->frame(); 1659 return m_frameObserver->frame();
1660 } 1660 }
1661 1661
1662 v8::Handle<v8::Object> LocalDOMWindow::wrap(v8::Handle<v8::Object> creationConte xt, v8::Isolate* isolate) 1662 v8::Handle<v8::Object> LocalDOMWindow::wrap(v8::Handle<v8::Object> creationConte xt, v8::Isolate* isolate)
1663 { 1663 {
1664 ASSERT_NOT_REACHED(); // LocalDOMWindow has [Custom=ToV8]. 1664 ASSERT_NOT_REACHED(); // LocalDOMWindow has [Custom=ToV8].
1665 return v8::Handle<v8::Object>(); 1665 return v8::Handle<v8::Object>();
1666 } 1666 }
1667 1667
1668 } // namespace blink 1668 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/frame/LocalDOMWindow.h ('k') | Source/core/frame/RemoteDOMWindow.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698