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 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
428 return; | 428 return; |
429 } | 429 } |
430 | 430 |
431 AnimationController* controller = document->frame()->animation(); | 431 AnimationController* controller = document->frame()->animation(); |
432 if (!controller) | 432 if (!controller) |
433 return; | 433 return; |
434 | 434 |
435 controller->resumeAnimations(); | 435 controller->resumeAnimations(); |
436 } | 436 } |
437 | 437 |
438 bool Internals::pauseAnimationAtTimeOnElement(const String& animationName, doubl
e pauseTime, Element* element, ExceptionCode& ec) | 438 void Internals::pauseAnimations(double pauseTime, ExceptionCode& ec) |
439 { | 439 { |
440 if (!element || pauseTime < 0) { | 440 if (pauseTime < 0) { |
441 ec = INVALID_ACCESS_ERR; | 441 ec = INVALID_ACCESS_ERR; |
442 return false; | 442 return; |
443 } | |
444 AnimationController* controller = frame()->animation(); | |
445 return controller->pauseAnimationAtTime(element->renderer(), AtomicString(an
imationName), pauseTime); | |
446 } | |
447 | |
448 bool Internals::pauseAnimationAtTimeOnPseudoElement(const String& animationName,
double pauseTime, Element* element, const String& pseudoId, ExceptionCode& ec) | |
449 { | |
450 if (!element || pauseTime < 0) { | |
451 ec = INVALID_ACCESS_ERR; | |
452 return false; | |
453 } | 443 } |
454 | 444 |
455 if (pseudoId != "before" && pseudoId != "after") { | 445 frame()->animation()->pauseAnimationsForTesting(pauseTime); |
456 ec = INVALID_ACCESS_ERR; | |
457 return false; | |
458 } | |
459 | |
460 PseudoElement* pseudoElement = element->pseudoElement(pseudoId == "before" ?
BEFORE : AFTER); | |
461 if (!pseudoElement) { | |
462 ec = INVALID_ACCESS_ERR; | |
463 return false; | |
464 } | |
465 | |
466 return frame()->animation()->pauseAnimationAtTime(pseudoElement->renderer(),
AtomicString(animationName), pauseTime); | |
467 } | |
468 | |
469 bool Internals::pauseTransitionAtTimeOnElement(const String& propertyName, doubl
e pauseTime, Element* element, ExceptionCode& ec) | |
470 { | |
471 if (!element || pauseTime < 0) { | |
472 ec = INVALID_ACCESS_ERR; | |
473 return false; | |
474 } | |
475 AnimationController* controller = frame()->animation(); | |
476 return controller->pauseTransitionAtTime(element->renderer(), propertyName,
pauseTime); | |
477 } | |
478 | |
479 bool Internals::pauseTransitionAtTimeOnPseudoElement(const String& property, dou
ble pauseTime, Element* element, const String& pseudoId, ExceptionCode& ec) | |
480 { | |
481 if (!element || pauseTime < 0) { | |
482 ec = INVALID_ACCESS_ERR; | |
483 return false; | |
484 } | |
485 | |
486 if (pseudoId != "before" && pseudoId != "after") { | |
487 ec = INVALID_ACCESS_ERR; | |
488 return false; | |
489 } | |
490 | |
491 PseudoElement* pseudoElement = element->pseudoElement(pseudoId == "before" ?
BEFORE : AFTER); | |
492 if (!pseudoElement) { | |
493 ec = INVALID_ACCESS_ERR; | |
494 return false; | |
495 } | |
496 | |
497 return frame()->animation()->pauseTransitionAtTime(pseudoElement->renderer()
, property, pauseTime); | |
498 } | 446 } |
499 | 447 |
500 bool Internals::hasShadowInsertionPoint(const Node* root, ExceptionCode& ec) con
st | 448 bool Internals::hasShadowInsertionPoint(const Node* root, ExceptionCode& ec) con
st |
501 { | 449 { |
502 if (root && root->isShadowRoot()) | 450 if (root && root->isShadowRoot()) |
503 return ScopeContentDistribution::hasShadowElement(toShadowRoot(root)); | 451 return ScopeContentDistribution::hasShadowElement(toShadowRoot(root)); |
504 | 452 |
505 ec = INVALID_ACCESS_ERR; | 453 ec = INVALID_ACCESS_ERR; |
506 return 0; | 454 return 0; |
507 } | 455 } |
(...skipping 1492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2000 | 1948 |
2001 RenderObject* renderer = select->renderer(); | 1949 RenderObject* renderer = select->renderer(); |
2002 if (!renderer->isMenuList()) | 1950 if (!renderer->isMenuList()) |
2003 return false; | 1951 return false; |
2004 | 1952 |
2005 RenderMenuList* menuList = toRenderMenuList(renderer); | 1953 RenderMenuList* menuList = toRenderMenuList(renderer); |
2006 return menuList->popupIsVisible(); | 1954 return menuList->popupIsVisible(); |
2007 } | 1955 } |
2008 | 1956 |
2009 } | 1957 } |
OLD | NEW |