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 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
525 return representation; | 525 return representation; |
526 } | 526 } |
527 | 527 |
528 PassRefPtrWillBeRawPtr<CSSStyleDeclaration> Internals::computedStyleIncludingVis
itedInfo(Node* node) const | 528 PassRefPtrWillBeRawPtr<CSSStyleDeclaration> Internals::computedStyleIncludingVis
itedInfo(Node* node) const |
529 { | 529 { |
530 ASSERT(node); | 530 ASSERT(node); |
531 bool allowVisitedStyle = true; | 531 bool allowVisitedStyle = true; |
532 return CSSComputedStyleDeclaration::create(node, allowVisitedStyle); | 532 return CSSComputedStyleDeclaration::create(node, allowVisitedStyle); |
533 } | 533 } |
534 | 534 |
535 PassRefPtrWillBeRawPtr<ShadowRoot> Internals::createUserAgentShadowRoot(Element*
host) | 535 PassRefPtrWillBeRawPtr<ShadowRoot> Internals::createClosedShadowRoot(Element* ho
st) |
536 { | 536 { |
537 ASSERT(host); | 537 ASSERT(host); |
538 return PassRefPtrWillBeRawPtr<ShadowRoot>(host->ensureUserAgentShadowRoot())
; | 538 return PassRefPtrWillBeRawPtr<ShadowRoot>(host->ensureClosedShadowRoot()); |
539 } | 539 } |
540 | 540 |
541 ShadowRoot* Internals::shadowRoot(Element* host) | 541 ShadowRoot* Internals::shadowRoot(Element* host) |
542 { | 542 { |
543 // FIXME: Internals::shadowRoot() in tests should be converted to youngestSh
adowRoot() or oldestShadowRoot(). | 543 // FIXME: Internals::shadowRoot() in tests should be converted to youngestSh
adowRoot() or oldestShadowRoot(). |
544 // https://bugs.webkit.org/show_bug.cgi?id=78465 | 544 // https://bugs.webkit.org/show_bug.cgi?id=78465 |
545 return youngestShadowRoot(host); | 545 return youngestShadowRoot(host); |
546 } | 546 } |
547 | 547 |
548 ShadowRoot* Internals::youngestShadowRoot(Element* host) | 548 ShadowRoot* Internals::youngestShadowRoot(Element* host) |
(...skipping 25 matching lines...) Expand all Loading... |
574 | 574 |
575 String Internals::shadowRootType(const Node* root, ExceptionState& exceptionStat
e) const | 575 String Internals::shadowRootType(const Node* root, ExceptionState& exceptionStat
e) const |
576 { | 576 { |
577 ASSERT(root); | 577 ASSERT(root); |
578 if (!root->isShadowRoot()) { | 578 if (!root->isShadowRoot()) { |
579 exceptionState.throwDOMException(InvalidAccessError, "The node provided
is not a shadow root."); | 579 exceptionState.throwDOMException(InvalidAccessError, "The node provided
is not a shadow root."); |
580 return String(); | 580 return String(); |
581 } | 581 } |
582 | 582 |
583 switch (toShadowRoot(root)->type()) { | 583 switch (toShadowRoot(root)->type()) { |
584 case ShadowRoot::UserAgentShadowRoot: | 584 case ShadowRoot::ClosedShadowRoot: |
585 return String("UserAgentShadowRoot"); | 585 return String("ClosedShadowRoot"); |
586 case ShadowRoot::AuthorShadowRoot: | 586 case ShadowRoot::OpenShadowRoot: |
587 return String("AuthorShadowRoot"); | 587 return String("OpenShadowRoot"); |
588 default: | 588 default: |
589 ASSERT_NOT_REACHED(); | 589 ASSERT_NOT_REACHED(); |
590 return String("Unknown"); | 590 return String("Unknown"); |
591 } | 591 } |
592 } | 592 } |
593 | 593 |
594 const AtomicString& Internals::shadowPseudoId(Element* element) | 594 const AtomicString& Internals::shadowPseudoId(Element* element) |
595 { | 595 { |
596 ASSERT(element); | 596 ASSERT(element); |
597 return element->shadowPseudoId(); | 597 return element->shadowPseudoId(); |
(...skipping 1738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2336 { | 2336 { |
2337 ThreadState::current()->schedulePreciseGC(); | 2337 ThreadState::current()->schedulePreciseGC(); |
2338 } | 2338 } |
2339 | 2339 |
2340 ValueIterable<int>::IterationSource* Internals::startIteration(ScriptState*, Exc
eptionState&) | 2340 ValueIterable<int>::IterationSource* Internals::startIteration(ScriptState*, Exc
eptionState&) |
2341 { | 2341 { |
2342 return new InternalsIterationSource(); | 2342 return new InternalsIterationSource(); |
2343 } | 2343 } |
2344 | 2344 |
2345 } // namespace blink | 2345 } // namespace blink |
OLD | NEW |