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 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
586 | 586 |
587 String representation = externalRepresentation(element); | 587 String representation = externalRepresentation(element); |
588 if (representation.isEmpty()) { | 588 if (representation.isEmpty()) { |
589 exceptionState.throwDOMException(InvalidAccessError, "The element provid
ed has no external representation."); | 589 exceptionState.throwDOMException(InvalidAccessError, "The element provid
ed has no external representation."); |
590 return String(); | 590 return String(); |
591 } | 591 } |
592 | 592 |
593 return representation; | 593 return representation; |
594 } | 594 } |
595 | 595 |
596 size_t Internals::numberOfScopedHTMLStyleChildren(const Node* scope, ExceptionSt
ate& exceptionState) const | |
597 { | |
598 if (scope && (scope->isElementNode() || scope->isShadowRoot())) | |
599 return scope->numberOfScopedHTMLStyleChildren(); | |
600 | |
601 exceptionState.throwDOMException(InvalidAccessError, ExceptionMessages::argu
mentNullOrIncorrectType(1, "Node")); | |
602 return 0; | |
603 } | |
604 | |
605 PassRefPtr<CSSComputedStyleDeclaration> Internals::computedStyleIncludingVisited
Info(Node* node, ExceptionState& exceptionState) const | 596 PassRefPtr<CSSComputedStyleDeclaration> Internals::computedStyleIncludingVisited
Info(Node* node, ExceptionState& exceptionState) const |
606 { | 597 { |
607 if (!node) { | 598 if (!node) { |
608 exceptionState.throwDOMException(InvalidAccessError, ExceptionMessages::
argumentNullOrIncorrectType(1, "Node")); | 599 exceptionState.throwDOMException(InvalidAccessError, ExceptionMessages::
argumentNullOrIncorrectType(1, "Node")); |
609 return nullptr; | 600 return nullptr; |
610 } | 601 } |
611 | 602 |
612 bool allowVisitedStyle = true; | 603 bool allowVisitedStyle = true; |
613 return CSSComputedStyleDeclaration::create(node, allowVisitedStyle); | 604 return CSSComputedStyleDeclaration::create(node, allowVisitedStyle); |
614 } | 605 } |
(...skipping 1837 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2452 String Internals::textSurroundingNode(Node* node, int x, int y, unsigned long ma
xLength) | 2443 String Internals::textSurroundingNode(Node* node, int x, int y, unsigned long ma
xLength) |
2453 { | 2444 { |
2454 if (!node) | 2445 if (!node) |
2455 return String(); | 2446 return String(); |
2456 blink::WebPoint point(x, y); | 2447 blink::WebPoint point(x, y); |
2457 SurroundingText surroundingText(VisiblePosition(node->renderer()->positionFo
rPoint(static_cast<IntPoint>(point))), maxLength); | 2448 SurroundingText surroundingText(VisiblePosition(node->renderer()->positionFo
rPoint(static_cast<IntPoint>(point))), maxLength); |
2458 return surroundingText.content(); | 2449 return surroundingText.content(); |
2459 } | 2450 } |
2460 | 2451 |
2461 } | 2452 } |
OLD | NEW |