| 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 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 612 Node* Internals::previousInComposedTree(Node* node, ExceptionState& exceptionSta
te) | 612 Node* Internals::previousInComposedTree(Node* node, ExceptionState& exceptionSta
te) |
| 613 { | 613 { |
| 614 ASSERT(node); | 614 ASSERT(node); |
| 615 if (!node->canParticipateInComposedTree()) { | 615 if (!node->canParticipateInComposedTree()) { |
| 616 exceptionState.throwDOMException(InvalidAccessError, "The node argument
doesn't particite in the composed tree."); | 616 exceptionState.throwDOMException(InvalidAccessError, "The node argument
doesn't particite in the composed tree."); |
| 617 return 0; | 617 return 0; |
| 618 } | 618 } |
| 619 return ComposedTreeTraversal::previous(*node); | 619 return ComposedTreeTraversal::previous(*node); |
| 620 } | 620 } |
| 621 | 621 |
| 622 Node* Internals::parentInComposedTree(Node* node, ExceptionState& exceptionState
) |
| 623 { |
| 624 ASSERT(node); |
| 625 if (!node->canParticipateInComposedTree()) { |
| 626 exceptionState.throwDOMException(InvalidAccessError, "The node argument
doesn't particite in the composed tree."); |
| 627 return nullptr; |
| 628 } |
| 629 return ComposedTreeTraversal::parent(*node); |
| 630 } |
| 631 |
| 622 String Internals::elementLayoutTreeAsText(Element* element, ExceptionState& exce
ptionState) | 632 String Internals::elementLayoutTreeAsText(Element* element, ExceptionState& exce
ptionState) |
| 623 { | 633 { |
| 624 ASSERT(element); | 634 ASSERT(element); |
| 625 String representation = externalRepresentation(element); | 635 String representation = externalRepresentation(element); |
| 626 if (representation.isEmpty()) { | 636 if (representation.isEmpty()) { |
| 627 exceptionState.throwDOMException(InvalidAccessError, "The element provid
ed has no external representation."); | 637 exceptionState.throwDOMException(InvalidAccessError, "The element provid
ed has no external representation."); |
| 628 return String(); | 638 return String(); |
| 629 } | 639 } |
| 630 | 640 |
| 631 return representation; | 641 return representation; |
| (...skipping 1912 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2544 mediaElement->setNetworkState(static_cast<WebMediaPlayer::NetworkState>(stat
e)); | 2554 mediaElement->setNetworkState(static_cast<WebMediaPlayer::NetworkState>(stat
e)); |
| 2545 } | 2555 } |
| 2546 | 2556 |
| 2547 // TODO(liberato): remove once autoplay gesture override experiment concludes. | 2557 // TODO(liberato): remove once autoplay gesture override experiment concludes. |
| 2548 void Internals::triggerAutoplayViewportCheck(HTMLMediaElement* element) | 2558 void Internals::triggerAutoplayViewportCheck(HTMLMediaElement* element) |
| 2549 { | 2559 { |
| 2550 element->triggerAutoplayViewportCheckForTesting(); | 2560 element->triggerAutoplayViewportCheckForTesting(); |
| 2551 } | 2561 } |
| 2552 | 2562 |
| 2553 } // namespace blink | 2563 } // namespace blink |
| OLD | NEW |