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 674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
685 ASSERT(host); | 685 ASSERT(host); |
686 if (ElementShadow* shadow = host->shadow()) | 686 if (ElementShadow* shadow = host->shadow()) |
687 return &shadow->youngestShadowRoot(); | 687 return &shadow->youngestShadowRoot(); |
688 return 0; | 688 return 0; |
689 } | 689 } |
690 | 690 |
691 ShadowRoot* Internals::oldestShadowRoot(Element* host) | 691 ShadowRoot* Internals::oldestShadowRoot(Element* host) |
692 { | 692 { |
693 ASSERT(host); | 693 ASSERT(host); |
694 if (ElementShadow* shadow = host->shadow()) | 694 if (ElementShadow* shadow = host->shadow()) |
695 return shadow->oldestShadowRoot(); | 695 return &shadow->oldestShadowRoot(); |
696 return 0; | 696 return 0; |
697 } | 697 } |
698 | 698 |
699 ShadowRoot* Internals::youngerShadowRoot(Node* shadow, ExceptionState& exception
State) | 699 ShadowRoot* Internals::youngerShadowRoot(Node* shadow, ExceptionState& exception
State) |
700 { | 700 { |
701 ASSERT(shadow); | 701 ASSERT(shadow); |
702 if (!shadow->isShadowRoot()) { | 702 if (!shadow->isShadowRoot()) { |
703 exceptionState.throwDOMException(InvalidAccessError, "The node provided
is not a shadow root."); | 703 exceptionState.throwDOMException(InvalidAccessError, "The node provided
is not a shadow root."); |
704 return 0; | 704 return 0; |
705 } | 705 } |
(...skipping 1921 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2627 | 2627 |
2628 return ClientRect::create(FloatRect(node->layoutObject()->visualRect())); | 2628 return ClientRect::create(FloatRect(node->layoutObject()->visualRect())); |
2629 } | 2629 } |
2630 | 2630 |
2631 void Internals::crash() | 2631 void Internals::crash() |
2632 { | 2632 { |
2633 CHECK(false) << "Intentional crash"; | 2633 CHECK(false) << "Intentional crash"; |
2634 } | 2634 } |
2635 | 2635 |
2636 } // namespace blink | 2636 } // namespace blink |
OLD | NEW |