| OLD | NEW |
| 1 /* | 1 /* |
| 2 * (C) 1999 Lars Knoll (knoll@kde.org) | 2 * (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 2000 Gunnstein Lye (gunnstein@netcom.no) | 3 * (C) 2000 Gunnstein Lye (gunnstein@netcom.no) |
| 4 * (C) 2000 Frederik Holljen (frederik.holljen@hig.no) | 4 * (C) 2000 Frederik Holljen (frederik.holljen@hig.no) |
| 5 * (C) 2001 Peter Kelly (pmk@post.com) | 5 * (C) 2001 Peter Kelly (pmk@post.com) |
| 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. |
| 7 * Copyright (C) 2011 Motorola Mobility. All rights reserved. | 7 * Copyright (C) 2011 Motorola Mobility. All rights reserved. |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 851 int end = (n == m_end.container()) ? std::min(std::max(start, m_end.
offset()), length) : length; | 851 int end = (n == m_end.container()) ? std::min(std::max(start, m_end.
offset()), length) : length; |
| 852 builder.append(data, start, end - start); | 852 builder.append(data, start, end - start); |
| 853 } | 853 } |
| 854 } | 854 } |
| 855 | 855 |
| 856 return builder.toString(); | 856 return builder.toString(); |
| 857 } | 857 } |
| 858 | 858 |
| 859 String Range::text() const | 859 String Range::text() const |
| 860 { | 860 { |
| 861 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets
needs to be audited. |
| 862 // see http://crbug.com/590369 for more details. |
| 863 ownerDocument().updateStyleAndLayoutIgnorePendingStylesheets(); |
| 864 |
| 861 return plainText(EphemeralRange(this), TextIteratorEmitsObjectReplacementCha
racter); | 865 return plainText(EphemeralRange(this), TextIteratorEmitsObjectReplacementCha
racter); |
| 862 } | 866 } |
| 863 | 867 |
| 864 DocumentFragment* Range::createContextualFragment(const String& markup, Exceptio
nState& exceptionState) | 868 DocumentFragment* Range::createContextualFragment(const String& markup, Exceptio
nState& exceptionState) |
| 865 { | 869 { |
| 866 // Algorithm: http://domparsing.spec.whatwg.org/#extensions-to-the-range-int
erface | 870 // Algorithm: http://domparsing.spec.whatwg.org/#extensions-to-the-range-int
erface |
| 867 | 871 |
| 868 Node* node = m_start.container(); | 872 Node* node = m_start.container(); |
| 869 | 873 |
| 870 // Step 1. | 874 // Step 1. |
| (...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1570 if (range && range->boundaryPointsValid()) { | 1574 if (range && range->boundaryPointsValid()) { |
| 1571 LOG(INFO) << "\n" | 1575 LOG(INFO) << "\n" |
| 1572 << range->startContainer()->toMarkedTreeString(range->startContainer
(), "S", range->endContainer(), "E").utf8().data() | 1576 << range->startContainer()->toMarkedTreeString(range->startContainer
(), "S", range->endContainer(), "E").utf8().data() |
| 1573 << "start offset: " << range->startOffset() << ", end offset: " << r
ange->endOffset(); | 1577 << "start offset: " << range->startOffset() << ", end offset: " << r
ange->endOffset(); |
| 1574 } else { | 1578 } else { |
| 1575 LOG(INFO) << "Cannot show tree if range is null, or if boundary points a
re invalid."; | 1579 LOG(INFO) << "Cannot show tree if range is null, or if boundary points a
re invalid."; |
| 1576 } | 1580 } |
| 1577 } | 1581 } |
| 1578 | 1582 |
| 1579 #endif | 1583 #endif |
| OLD | NEW |