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 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
566 | 566 |
567 String representation = externalRepresentation(element); | 567 String representation = externalRepresentation(element); |
568 if (representation.isEmpty()) { | 568 if (representation.isEmpty()) { |
569 exceptionState.throwDOMException(InvalidAccessError, "The element provid
ed has no external representation."); | 569 exceptionState.throwDOMException(InvalidAccessError, "The element provid
ed has no external representation."); |
570 return String(); | 570 return String(); |
571 } | 571 } |
572 | 572 |
573 return representation; | 573 return representation; |
574 } | 574 } |
575 | 575 |
576 size_t Internals::numberOfScopedHTMLStyleChildren(const Node* scope, ExceptionSt
ate& exceptionState) const | |
577 { | |
578 if (scope && (scope->isElementNode() || scope->isShadowRoot())) | |
579 return scope->numberOfScopedHTMLStyleChildren(); | |
580 | |
581 exceptionState.throwDOMException(InvalidAccessError, ExceptionMessages::argu
mentNullOrIncorrectType(1, "Node")); | |
582 return 0; | |
583 } | |
584 | |
585 PassRefPtrWillBeRawPtr<CSSComputedStyleDeclaration> Internals::computedStyleIncl
udingVisitedInfo(Node* node, ExceptionState& exceptionState) const | 576 PassRefPtrWillBeRawPtr<CSSComputedStyleDeclaration> Internals::computedStyleIncl
udingVisitedInfo(Node* node, ExceptionState& exceptionState) const |
586 { | 577 { |
587 if (!node) { | 578 if (!node) { |
588 exceptionState.throwDOMException(InvalidAccessError, ExceptionMessages::
argumentNullOrIncorrectType(1, "Node")); | 579 exceptionState.throwDOMException(InvalidAccessError, ExceptionMessages::
argumentNullOrIncorrectType(1, "Node")); |
589 return nullptr; | 580 return nullptr; |
590 } | 581 } |
591 | 582 |
592 bool allowVisitedStyle = true; | 583 bool allowVisitedStyle = true; |
593 return CSSComputedStyleDeclaration::create(node, allowVisitedStyle); | 584 return CSSComputedStyleDeclaration::create(node, allowVisitedStyle); |
594 } | 585 } |
(...skipping 1773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2368 } else if (type == "none") { | 2359 } else if (type == "none") { |
2369 webtype = blink::ConnectionTypeNone; | 2360 webtype = blink::ConnectionTypeNone; |
2370 } else { | 2361 } else { |
2371 exceptionState.throwDOMException(NotFoundError, ExceptionMessages::faile
dToEnumerate("connection type", type)); | 2362 exceptionState.throwDOMException(NotFoundError, ExceptionMessages::faile
dToEnumerate("connection type", type)); |
2372 return; | 2363 return; |
2373 } | 2364 } |
2374 networkStateNotifier().setWebConnectionTypeForTest(webtype); | 2365 networkStateNotifier().setWebConnectionTypeForTest(webtype); |
2375 } | 2366 } |
2376 | 2367 |
2377 } // namespace WebCore | 2368 } // namespace WebCore |
OLD | NEW |