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 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
594 | 594 |
595 size_t Internals::numberOfScopedHTMLStyleChildren(const Node* scope, ExceptionSt
ate& exceptionState) const | 595 size_t Internals::numberOfScopedHTMLStyleChildren(const Node* scope, ExceptionSt
ate& exceptionState) const |
596 { | 596 { |
597 if (scope && (scope->isElementNode() || scope->isShadowRoot())) | 597 if (scope && (scope->isElementNode() || scope->isShadowRoot())) |
598 return scope->numberOfScopedHTMLStyleChildren(); | 598 return scope->numberOfScopedHTMLStyleChildren(); |
599 | 599 |
600 exceptionState.throwDOMException(InvalidAccessError, ExceptionMessages::argu
mentNullOrIncorrectType(1, "Node")); | 600 exceptionState.throwDOMException(InvalidAccessError, ExceptionMessages::argu
mentNullOrIncorrectType(1, "Node")); |
601 return 0; | 601 return 0; |
602 } | 602 } |
603 | 603 |
604 PassRefPtrWillBeRawPtr<CSSComputedStyleDeclaration> Internals::computedStyleIncl
udingVisitedInfo(Node* node, ExceptionState& exceptionState) const | 604 PassRefPtr<CSSComputedStyleDeclaration> Internals::computedStyleIncludingVisited
Info(Node* node, ExceptionState& exceptionState) const |
605 { | 605 { |
606 if (!node) { | 606 if (!node) { |
607 exceptionState.throwDOMException(InvalidAccessError, ExceptionMessages::
argumentNullOrIncorrectType(1, "Node")); | 607 exceptionState.throwDOMException(InvalidAccessError, ExceptionMessages::
argumentNullOrIncorrectType(1, "Node")); |
608 return nullptr; | 608 return nullptr; |
609 } | 609 } |
610 | 610 |
611 bool allowVisitedStyle = true; | 611 bool allowVisitedStyle = true; |
612 return CSSComputedStyleDeclaration::create(node, allowVisitedStyle); | 612 return CSSComputedStyleDeclaration::create(node, allowVisitedStyle); |
613 } | 613 } |
614 | 614 |
(...skipping 1828 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2443 } | 2443 } |
2444 | 2444 |
2445 String Internals::textSurroundingNode(Node* node, int x, int y, unsigned long ma
xLength) | 2445 String Internals::textSurroundingNode(Node* node, int x, int y, unsigned long ma
xLength) |
2446 { | 2446 { |
2447 blink::WebPoint point(x, y); | 2447 blink::WebPoint point(x, y); |
2448 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); |
2449 return surroundingText.content(); | 2449 return surroundingText.content(); |
2450 } | 2450 } |
2451 | 2451 |
2452 } | 2452 } |
OLD | NEW |