| Index: Source/core/dom/Range.cpp
|
| diff --git a/Source/core/dom/Range.cpp b/Source/core/dom/Range.cpp
|
| index 9189f403bbb65bda280a75d7fa493fb648135f57..8208db20b812596323b1bc7a981b61b45cfe07c0 100644
|
| --- a/Source/core/dom/Range.cpp
|
| +++ b/Source/core/dom/Range.cpp
|
| @@ -951,7 +951,8 @@ String Range::toString() const
|
|
|
| Node* pastLast = pastLastNode();
|
| for (Node* n = firstNode(); n != pastLast; n = NodeTraversal::next(*n)) {
|
| - if (n->nodeType() == Node::TEXT_NODE || n->nodeType() == Node::CDATA_SECTION_NODE) {
|
| + Node::NodeType type = n->nodeType();
|
| + if (type == Node::TEXT_NODE || type == Node::CDATA_SECTION_NODE) {
|
| String data = toCharacterData(n)->data();
|
| int length = data.length();
|
| int start = (n == m_start.container()) ? min(max(0, m_start.offset()), length) : 0;
|
|
|