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; | |
kochi
2015/12/09 08:57:34
nit: could you convert all other instances of "ret
hayato
2015/12/09 10:25:40
Acknowledged. That can be done later.
| |
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 1916 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2548 mediaElement->setNetworkState(static_cast<WebMediaPlayer::NetworkState>(stat e)); | 2558 mediaElement->setNetworkState(static_cast<WebMediaPlayer::NetworkState>(stat e)); |
2549 } | 2559 } |
2550 | 2560 |
2551 // TODO(liberato): remove once autoplay gesture override experiment concludes. | 2561 // TODO(liberato): remove once autoplay gesture override experiment concludes. |
2552 void Internals::triggerAutoplayViewportCheck(HTMLMediaElement* element) | 2562 void Internals::triggerAutoplayViewportCheck(HTMLMediaElement* element) |
2553 { | 2563 { |
2554 element->triggerAutoplayViewportCheckForTesting(); | 2564 element->triggerAutoplayViewportCheckForTesting(); |
2555 } | 2565 } |
2556 | 2566 |
2557 } // namespace blink | 2567 } // namespace blink |
OLD | NEW |