OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * Copyright (C) 2013 Apple Inc. All rights reserved. | 3 * Copyright (C) 2013 Apple Inc. All rights reserved. |
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 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 es.throwUninformativeAndGenericDOMException(InvalidAccessError); | 403 es.throwUninformativeAndGenericDOMException(InvalidAccessError); |
404 return 0; | 404 return 0; |
405 } | 405 } |
406 return treeScope1->comparePosition(*treeScope2); | 406 return treeScope1->comparePosition(*treeScope2); |
407 } | 407 } |
408 | 408 |
409 unsigned Internals::numberOfActiveAnimations() const | 409 unsigned Internals::numberOfActiveAnimations() const |
410 { | 410 { |
411 Frame* contextFrame = frame(); | 411 Frame* contextFrame = frame(); |
412 if (RuntimeEnabledFeatures::webAnimationsCSSEnabled()) | 412 if (RuntimeEnabledFeatures::webAnimationsCSSEnabled()) |
413 return frame()->document()->timeline()->numberOfActiveAnimationsForTesti
ng(); | 413 return contextFrame->document()->timeline()->numberOfActiveAnimationsFor
Testing(); |
414 if (AnimationController* controller = contextFrame->animation()) | 414 return contextFrame->animation().numberOfActiveAnimations(contextFrame->docu
ment()); |
415 return controller->numberOfActiveAnimations(contextFrame->document()); | |
416 return 0; | |
417 } | 415 } |
418 | 416 |
419 void Internals::pauseAnimations(double pauseTime, ExceptionState& es) | 417 void Internals::pauseAnimations(double pauseTime, ExceptionState& es) |
420 { | 418 { |
421 if (pauseTime < 0) { | 419 if (pauseTime < 0) { |
422 es.throwUninformativeAndGenericDOMException(InvalidAccessError); | 420 es.throwUninformativeAndGenericDOMException(InvalidAccessError); |
423 return; | 421 return; |
424 } | 422 } |
425 | 423 |
426 if (RuntimeEnabledFeatures::webAnimationsCSSEnabled()) | 424 if (RuntimeEnabledFeatures::webAnimationsCSSEnabled()) |
427 frame()->document()->timeline()->pauseAnimationsForTesting(pauseTime); | 425 frame()->document()->timeline()->pauseAnimationsForTesting(pauseTime); |
428 else | 426 else |
429 frame()->animation()->pauseAnimationsForTesting(pauseTime); | 427 frame()->animation().pauseAnimationsForTesting(pauseTime); |
430 } | 428 } |
431 | 429 |
432 bool Internals::hasShadowInsertionPoint(const Node* root, ExceptionState& es) co
nst | 430 bool Internals::hasShadowInsertionPoint(const Node* root, ExceptionState& es) co
nst |
433 { | 431 { |
434 if (root && root->isShadowRoot()) | 432 if (root && root->isShadowRoot()) |
435 return toShadowRoot(root)->containsShadowElements(); | 433 return toShadowRoot(root)->containsShadowElements(); |
436 | 434 |
437 es.throwUninformativeAndGenericDOMException(InvalidAccessError); | 435 es.throwUninformativeAndGenericDOMException(InvalidAccessError); |
438 return 0; | 436 return 0; |
439 } | 437 } |
(...skipping 1833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2273 } | 2271 } |
2274 | 2272 |
2275 document->updateLayout(); | 2273 document->updateLayout(); |
2276 | 2274 |
2277 RenderView* view = document->renderView(); | 2275 RenderView* view = document->renderView(); |
2278 if (view->compositor()) | 2276 if (view->compositor()) |
2279 view->compositor()->updateCompositingLayers(CompositingUpdateFinishAllDe
ferredWork); | 2277 view->compositor()->updateCompositingLayers(CompositingUpdateFinishAllDe
ferredWork); |
2280 } | 2278 } |
2281 | 2279 |
2282 } | 2280 } |
OLD | NEW |