| 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 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 455 } | 455 } |
| 456 | 456 |
| 457 bool Range::boundaryPointsValid() const | 457 bool Range::boundaryPointsValid() const |
| 458 { | 458 { |
| 459 TrackExceptionState exceptionState; | 459 TrackExceptionState exceptionState; |
| 460 return compareBoundaryPoints(m_start, m_end, exceptionState) <= 0 && !except
ionState.hadException(); | 460 return compareBoundaryPoints(m_start, m_end, exceptionState) <= 0 && !except
ionState.hadException(); |
| 461 } | 461 } |
| 462 | 462 |
| 463 void Range::deleteContents(ExceptionState& exceptionState) | 463 void Range::deleteContents(ExceptionState& exceptionState) |
| 464 { | 464 { |
| 465 checkDeleteExtract(exceptionState); | 465 ASSERT(boundaryPointsValid()); |
| 466 if (exceptionState.hadException()) | |
| 467 return; | |
| 468 | 466 |
| 469 { | 467 { |
| 470 EventQueueScope eventQueueScope; | 468 EventQueueScope eventQueueScope; |
| 471 processContents(DELETE_CONTENTS, exceptionState); | 469 processContents(DELETE_CONTENTS, exceptionState); |
| 472 } | 470 } |
| 473 } | 471 } |
| 474 | 472 |
| 475 bool Range::intersectsNode(Node* refNode, ExceptionState& exceptionState) | 473 bool Range::intersectsNode(Node* refNode, ExceptionState& exceptionState) |
| 476 { | 474 { |
| 477 // http://developer.mozilla.org/en/docs/DOM:range.intersectsNode | 475 // http://developer.mozilla.org/en/docs/DOM:range.intersectsNode |
| (...skipping 1232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1710 | 1708 |
| 1711 void showTree(const blink::Range* range) | 1709 void showTree(const blink::Range* range) |
| 1712 { | 1710 { |
| 1713 if (range && range->boundaryPointsValid()) { | 1711 if (range && range->boundaryPointsValid()) { |
| 1714 range->startContainer()->showTreeAndMark(range->startContainer(), "S", r
ange->endContainer(), "E"); | 1712 range->startContainer()->showTreeAndMark(range->startContainer(), "S", r
ange->endContainer(), "E"); |
| 1715 fprintf(stderr, "start offset: %d, end offset: %d\n", range->startOffset
(), range->endOffset()); | 1713 fprintf(stderr, "start offset: %d, end offset: %d\n", range->startOffset
(), range->endOffset()); |
| 1716 } | 1714 } |
| 1717 } | 1715 } |
| 1718 | 1716 |
| 1719 #endif | 1717 #endif |
| OLD | NEW |