diff options
author | Feng Qian <fqian@google.com> | 2009-04-16 09:37:44 -0700 |
---|---|---|
committer | Feng Qian <fqian@google.com> | 2009-04-16 09:54:59 -0700 |
commit | 3ca42cd5be017b0bda805abd247fa7e7b2a168d9 (patch) | |
tree | be06751412c4cbd2ba00e3a978c18aee3aaacdc1 | |
parent | 826212099865d38f65f224768c3f5ee68b4b6661 (diff) | |
download | external_webkit-3ca42cd5be017b0bda805abd247fa7e7b2a168d9.zip external_webkit-3ca42cd5be017b0bda805abd247fa7e7b2a168d9.tar.gz external_webkit-3ca42cd5be017b0bda805abd247fa7e7b2a168d9.tar.bz2 |
Temporary fix bug 1792567.
editing/selection/selectNodeContents.html crashes after recent merge to webkit r42026. The trunk fixed the crashed already, we will pick up the fix in our next merge.
-rw-r--r-- | WebCore/dom/RangeBoundaryPoint.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/WebCore/dom/RangeBoundaryPoint.h b/WebCore/dom/RangeBoundaryPoint.h index e39454e..65abfcf 100644 --- a/WebCore/dom/RangeBoundaryPoint.h +++ b/WebCore/dom/RangeBoundaryPoint.h @@ -140,7 +140,18 @@ inline void RangeBoundaryPoint::setToEnd(PassRefPtr<Node> container) { ASSERT(container); if (container->offsetInCharacters()) { +#ifdef ANDROID_FIX + // Temporary fix of a crash where container becomes empty after + // assigning it to the first parameter of Position::moveToPosition, + // evaluating the second parameter expression, + // container->maxCharacterOffset(), causes NULL-pointer exception. + // This change can be removed after merge to a webkit revision + // after r42264. + int offset = container->maxCharacterOffset(); + m_position.moveToPosition(container, offset); +#else m_position.moveToPosition(container, container->maxCharacterOffset()); +#endif m_childBefore = 0; } else { m_childBefore = container->lastChild(); |