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