OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2009 Apple Inc. All rights reserved. |
3 * Copyright (C) 2012 Google Inc. All rights reserved. | 3 * Copyright (C) 2012 Google 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 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
498 setBaseAndExtent(n, 0, n, n->countChildren(), exceptionState); | 498 setBaseAndExtent(n, 0, n, n->countChildren(), exceptionState); |
499 } | 499 } |
500 | 500 |
501 String DOMSelection::toString() | 501 String DOMSelection::toString() |
502 { | 502 { |
503 if (!m_frame) | 503 if (!m_frame) |
504 return String(); | 504 return String(); |
505 | 505 |
506 Position start, end; | 506 Position start, end; |
507 if (m_frame->selection().selection().toNormalizedPositions(start, end)) | 507 if (m_frame->selection().selection().toNormalizedPositions(start, end)) |
508 return plainText(start, end); | 508 return plainText(start, end, TextIteratorForSelectionToString); |
509 return emptyString(); | 509 return emptyString(); |
510 } | 510 } |
511 | 511 |
512 Node* DOMSelection::shadowAdjustedNode(const Position& position) const | 512 Node* DOMSelection::shadowAdjustedNode(const Position& position) const |
513 { | 513 { |
514 if (position.isNull()) | 514 if (position.isNull()) |
515 return 0; | 515 return 0; |
516 | 516 |
517 Node* containerNode = position.containerNode(); | 517 Node* containerNode = position.containerNode(); |
518 Node* adjustedNode = m_treeScope->ancestorInThisScope(containerNode); | 518 Node* adjustedNode = m_treeScope->ancestorInThisScope(containerNode); |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
558 m_treeScope->document().addConsoleMessage(ConsoleMessage::create(JSMessa
geSource, ErrorMessageLevel, message)); | 558 m_treeScope->document().addConsoleMessage(ConsoleMessage::create(JSMessa
geSource, ErrorMessageLevel, message)); |
559 } | 559 } |
560 | 560 |
561 DEFINE_TRACE(DOMSelection) | 561 DEFINE_TRACE(DOMSelection) |
562 { | 562 { |
563 visitor->trace(m_treeScope); | 563 visitor->trace(m_treeScope); |
564 DOMWindowProperty::trace(visitor); | 564 DOMWindowProperty::trace(visitor); |
565 } | 565 } |
566 | 566 |
567 } // namespace blink | 567 } // namespace blink |
OLD | NEW |