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 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
469 exceptionState.throwDOMException(InvalidAccessError, String::format("The
%s node is neither a document node, nor a shadow root.", treeScope1 ? "second"
: "first")); | 469 exceptionState.throwDOMException(InvalidAccessError, String::format("The
%s node is neither a document node, nor a shadow root.", treeScope1 ? "second"
: "first")); |
470 return 0; | 470 return 0; |
471 } | 471 } |
472 return treeScope1->comparePosition(*treeScope2); | 472 return treeScope1->comparePosition(*treeScope2); |
473 } | 473 } |
474 | 474 |
475 unsigned Internals::numberOfActiveAnimations() const | 475 unsigned Internals::numberOfActiveAnimations() const |
476 { | 476 { |
477 LocalFrame* contextFrame = frame(); | 477 LocalFrame* contextFrame = frame(); |
478 Document* document = contextFrame->document(); | 478 Document* document = contextFrame->document(); |
479 return document->timeline()->numberOfActiveAnimationsForTesting() + document
->transitionTimeline()->numberOfActiveAnimationsForTesting(); | 479 return document->timeline().numberOfActiveAnimationsForTesting() + document-
>transitionTimeline().numberOfActiveAnimationsForTesting(); |
480 } | 480 } |
481 | 481 |
482 void Internals::pauseAnimations(double pauseTime, ExceptionState& exceptionState
) | 482 void Internals::pauseAnimations(double pauseTime, ExceptionState& exceptionState
) |
483 { | 483 { |
484 if (pauseTime < 0) { | 484 if (pauseTime < 0) { |
485 exceptionState.throwDOMException(InvalidAccessError, ExceptionMessages::
indexExceedsMinimumBound("pauseTime", pauseTime, 0.0)); | 485 exceptionState.throwDOMException(InvalidAccessError, ExceptionMessages::
indexExceedsMinimumBound("pauseTime", pauseTime, 0.0)); |
486 return; | 486 return; |
487 } | 487 } |
488 | 488 |
489 frame()->view()->updateLayoutAndStyleForPainting(); | 489 frame()->view()->updateLayoutAndStyleForPainting(); |
490 frame()->document()->timeline()->pauseAnimationsForTesting(pauseTime); | 490 frame()->document()->timeline().pauseAnimationsForTesting(pauseTime); |
491 frame()->document()->transitionTimeline()->pauseAnimationsForTesting(pauseTi
me); | 491 frame()->document()->transitionTimeline().pauseAnimationsForTesting(pauseTim
e); |
492 } | 492 } |
493 | 493 |
494 bool Internals::hasShadowInsertionPoint(const Node* root, ExceptionState& except
ionState) const | 494 bool Internals::hasShadowInsertionPoint(const Node* root, ExceptionState& except
ionState) const |
495 { | 495 { |
496 if (root && root->isShadowRoot()) | 496 if (root && root->isShadowRoot()) |
497 return toShadowRoot(root)->containsShadowElements(); | 497 return toShadowRoot(root)->containsShadowElements(); |
498 | 498 |
499 exceptionState.throwDOMException(InvalidAccessError, ExceptionMessages::argu
mentNullOrIncorrectType(1, "Node")); | 499 exceptionState.throwDOMException(InvalidAccessError, ExceptionMessages::argu
mentNullOrIncorrectType(1, "Node")); |
500 return 0; | 500 return 0; |
501 } | 501 } |
(...skipping 1869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2371 return promise.then(AddOneFunction::create(context)); | 2371 return promise.then(AddOneFunction::create(context)); |
2372 } | 2372 } |
2373 | 2373 |
2374 void Internals::trace(Visitor* visitor) | 2374 void Internals::trace(Visitor* visitor) |
2375 { | 2375 { |
2376 visitor->trace(m_runtimeFlags); | 2376 visitor->trace(m_runtimeFlags); |
2377 visitor->trace(m_profilers); | 2377 visitor->trace(m_profilers); |
2378 } | 2378 } |
2379 | 2379 |
2380 } | 2380 } |
OLD | NEW |