| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2005 Frerich Raabe <raabe@kde.org> | 2 * Copyright (C) 2005 Frerich Raabe <raabe@kde.org> |
| 3 * Copyright (C) 2006, 2009 Apple Inc. | 3 * Copyright (C) 2006, 2009 Apple Inc. |
| 4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * | 9 * |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 | 357 |
| 358 result->markSorted(false); | 358 result->markSorted(false); |
| 359 | 359 |
| 360 return Value(result, Value::adopt); | 360 return Value(result, Value::adopt); |
| 361 } | 361 } |
| 362 | 362 |
| 363 static inline String expandedNameLocalPart(Node* node) | 363 static inline String expandedNameLocalPart(Node* node) |
| 364 { | 364 { |
| 365 // The local part of an XPath expanded-name matches DOM local name for most
node types, except for namespace nodes and processing instruction nodes. | 365 // The local part of an XPath expanded-name matches DOM local name for most
node types, except for namespace nodes and processing instruction nodes. |
| 366 // But note that Blink does not support namespace nodes. | 366 // But note that Blink does not support namespace nodes. |
| 367 switch (node->nodeType()) { | 367 switch (node->getNodeType()) { |
| 368 case Node::ELEMENT_NODE: | 368 case Node::ELEMENT_NODE: |
| 369 return toElement(node)->localName(); | 369 return toElement(node)->localName(); |
| 370 case Node::ATTRIBUTE_NODE: | 370 case Node::ATTRIBUTE_NODE: |
| 371 return toAttr(node)->localName(); | 371 return toAttr(node)->localName(); |
| 372 case Node::PROCESSING_INSTRUCTION_NODE: | 372 case Node::PROCESSING_INSTRUCTION_NODE: |
| 373 return toProcessingInstruction(node)->target(); | 373 return toProcessingInstruction(node)->target(); |
| 374 default: | 374 default: |
| 375 return String(); | 375 return String(); |
| 376 } | 376 } |
| 377 } | 377 } |
| 378 | 378 |
| 379 static inline String expandedNamespaceURI(Node* node) | 379 static inline String expandedNamespaceURI(Node* node) |
| 380 { | 380 { |
| 381 switch (node->nodeType()) { | 381 switch (node->getNodeType()) { |
| 382 case Node::ELEMENT_NODE: | 382 case Node::ELEMENT_NODE: |
| 383 return toElement(node)->namespaceURI(); | 383 return toElement(node)->namespaceURI(); |
| 384 case Node::ATTRIBUTE_NODE: | 384 case Node::ATTRIBUTE_NODE: |
| 385 return toAttr(node)->namespaceURI(); | 385 return toAttr(node)->namespaceURI(); |
| 386 default: | 386 default: |
| 387 return String(); | 387 return String(); |
| 388 } | 388 } |
| 389 } | 389 } |
| 390 | 390 |
| 391 static inline String expandedName(Node* node) | 391 static inline String expandedName(Node* node) |
| 392 { | 392 { |
| 393 AtomicString prefix; | 393 AtomicString prefix; |
| 394 | 394 |
| 395 switch (node->nodeType()) { | 395 switch (node->getNodeType()) { |
| 396 case Node::ELEMENT_NODE: | 396 case Node::ELEMENT_NODE: |
| 397 prefix = toElement(node)->prefix(); | 397 prefix = toElement(node)->prefix(); |
| 398 break; | 398 break; |
| 399 case Node::ATTRIBUTE_NODE: | 399 case Node::ATTRIBUTE_NODE: |
| 400 prefix = toAttr(node)->prefix(); | 400 prefix = toAttr(node)->prefix(); |
| 401 break; | 401 break; |
| 402 default: | 402 default: |
| 403 break; | 403 break; |
| 404 } | 404 } |
| 405 | 405 |
| (...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 761 return nullptr; | 761 return nullptr; |
| 762 | 762 |
| 763 Function* function = functionRec->factoryFn(); | 763 Function* function = functionRec->factoryFn(); |
| 764 function->setArguments(args); | 764 function->setArguments(args); |
| 765 function->setName(name); | 765 function->setName(name); |
| 766 return function; | 766 return function; |
| 767 } | 767 } |
| 768 | 768 |
| 769 } // namespace XPath | 769 } // namespace XPath |
| 770 } // namespace blink | 770 } // namespace blink |
| OLD | NEW |