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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 #include "core/loader/HistoryItem.h" | 97 #include "core/loader/HistoryItem.h" |
98 #include "core/page/Chrome.h" | 98 #include "core/page/Chrome.h" |
99 #include "core/page/ChromeClient.h" | 99 #include "core/page/ChromeClient.h" |
100 #include "core/frame/DOMWindow.h" | 100 #include "core/frame/DOMWindow.h" |
101 #include "core/page/EventHandler.h" | 101 #include "core/page/EventHandler.h" |
102 #include "core/frame/FrameView.h" | 102 #include "core/frame/FrameView.h" |
103 #include "core/page/Page.h" | 103 #include "core/page/Page.h" |
104 #include "core/page/PagePopupController.h" | 104 #include "core/page/PagePopupController.h" |
105 #include "core/page/PrintContext.h" | 105 #include "core/page/PrintContext.h" |
106 #include "core/frame/Settings.h" | 106 #include "core/frame/Settings.h" |
107 #include "core/frame/animation/AnimationController.h" | |
108 #include "core/rendering/CompositedLayerMapping.h" | 107 #include "core/rendering/CompositedLayerMapping.h" |
109 #include "core/rendering/RenderLayer.h" | 108 #include "core/rendering/RenderLayer.h" |
110 #include "core/rendering/RenderLayerCompositor.h" | 109 #include "core/rendering/RenderLayerCompositor.h" |
111 #include "core/rendering/RenderMenuList.h" | 110 #include "core/rendering/RenderMenuList.h" |
112 #include "core/rendering/RenderObject.h" | 111 #include "core/rendering/RenderObject.h" |
113 #include "core/rendering/RenderTreeAsText.h" | 112 #include "core/rendering/RenderTreeAsText.h" |
114 #include "core/rendering/RenderView.h" | 113 #include "core/rendering/RenderView.h" |
115 #include "core/testing/GCObservation.h" | 114 #include "core/testing/GCObservation.h" |
116 #include "core/workers/WorkerThread.h" | 115 #include "core/workers/WorkerThread.h" |
117 #include "platform/ColorChooser.h" | 116 #include "platform/ColorChooser.h" |
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
470 } | 469 } |
471 return treeScope1->comparePosition(*treeScope2); | 470 return treeScope1->comparePosition(*treeScope2); |
472 } | 471 } |
473 | 472 |
474 unsigned Internals::numberOfActiveAnimations() const | 473 unsigned Internals::numberOfActiveAnimations() const |
475 { | 474 { |
476 Frame* contextFrame = frame(); | 475 Frame* contextFrame = frame(); |
477 Document* document = contextFrame->document(); | 476 Document* document = contextFrame->document(); |
478 if (RuntimeEnabledFeatures::webAnimationsCSSEnabled()) | 477 if (RuntimeEnabledFeatures::webAnimationsCSSEnabled()) |
479 return document->timeline()->numberOfActiveAnimationsForTesting() + docu
ment->transitionTimeline()->numberOfActiveAnimationsForTesting(); | 478 return document->timeline()->numberOfActiveAnimationsForTesting() + docu
ment->transitionTimeline()->numberOfActiveAnimationsForTesting(); |
480 return contextFrame->animation().numberOfActiveAnimations(document); | 479 return 0; |
481 } | 480 } |
482 | 481 |
483 void Internals::pauseAnimations(double pauseTime, ExceptionState& exceptionState
) | 482 void Internals::pauseAnimations(double pauseTime, ExceptionState& exceptionState
) |
484 { | 483 { |
485 if (pauseTime < 0) { | 484 if (pauseTime < 0) { |
486 exceptionState.throwDOMException(InvalidAccessError, "The pauseTime prov
ided is negative."); | 485 exceptionState.throwDOMException(InvalidAccessError, "The pauseTime prov
ided is negative."); |
487 return; | 486 return; |
488 } | 487 } |
489 | 488 |
490 if (RuntimeEnabledFeatures::webAnimationsCSSEnabled()) { | 489 if (RuntimeEnabledFeatures::webAnimationsCSSEnabled()) { |
491 frame()->document()->timeline()->pauseAnimationsForTesting(pauseTime); | 490 frame()->document()->timeline()->pauseAnimationsForTesting(pauseTime); |
492 frame()->document()->transitionTimeline()->pauseAnimationsForTesting(pau
seTime); | 491 frame()->document()->transitionTimeline()->pauseAnimationsForTesting(pau
seTime); |
493 } else { | |
494 frame()->animation().pauseAnimationsForTesting(pauseTime); | |
495 } | 492 } |
496 } | 493 } |
497 | 494 |
498 bool Internals::hasShadowInsertionPoint(const Node* root, ExceptionState& except
ionState) const | 495 bool Internals::hasShadowInsertionPoint(const Node* root, ExceptionState& except
ionState) const |
499 { | 496 { |
500 if (root && root->isShadowRoot()) | 497 if (root && root->isShadowRoot()) |
501 return toShadowRoot(root)->containsShadowElements(); | 498 return toShadowRoot(root)->containsShadowElements(); |
502 | 499 |
503 exceptionState.throwDOMException(InvalidAccessError, "The root node provided
is invalid."); | 500 exceptionState.throwDOMException(InvalidAccessError, "The root node provided
is invalid."); |
504 return 0; | 501 return 0; |
(...skipping 1864 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2369 }; | 2366 }; |
2370 | 2367 |
2371 } // namespace | 2368 } // namespace |
2372 | 2369 |
2373 ScriptPromise Internals::addOneToPromise(ExecutionContext* context, ScriptPromis
e promise) | 2370 ScriptPromise Internals::addOneToPromise(ExecutionContext* context, ScriptPromis
e promise) |
2374 { | 2371 { |
2375 return promise.then(AddOneFunction::create(context)); | 2372 return promise.then(AddOneFunction::create(context)); |
2376 } | 2373 } |
2377 | 2374 |
2378 } | 2375 } |
OLD | NEW |