Changeset 67618 in webkit
- Timestamp:
- Sep 16, 2010 8:05:58 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r67617 r67618 1 2010-09-16 Alexey Proskuryakov <ap@apple.com> 2 3 Reviewed by Adam Barth. 4 5 https://bugs.webkit.org/show_bug.cgi?id=45852 6 Range::selectNode and selectNodeContents misbehave when argument is in another document 7 8 * fast/dom/Range/select-node-different-document-expected.txt: Added. 9 * fast/dom/Range/select-node-different-document.html: Added. 10 1 11 2010-09-16 Satish Sampath <satish@chromium.org> 2 12 -
trunk/WebCore/ChangeLog
r67615 r67618 1 2010-09-16 Alexey Proskuryakov <ap@apple.com> 2 3 Reviewed by Adam Barth. 4 5 https://bugs.webkit.org/show_bug.cgi?id=45852 6 Range::selectNode and selectNodeContents misbehave when argument is in another document 7 8 Test: fast/dom/Range/select-node-different-document.html 9 10 There is nothing in DOM Traversal spec that says this shouldn't work, and it does work in 11 Firefox. 12 13 * dom/Range.cpp: 14 (WebCore::Range::setDocument): 15 (WebCore::Range::selectNode): 16 (WebCore::Range::selectNodeContents): 17 * dom/Range.h: 18 1 19 2010-09-16 Andrey Kosyakov <caseq@chromium.org> 2 20 -
trunk/WebCore/dom/Range.cpp
r65372 r67618 106 106 rangeCounter.decrement(); 107 107 #endif 108 } 109 110 void Range::setDocument(Document* document) 111 { 112 ASSERT(m_ownerDocument != document); 113 if (m_ownerDocument) 114 m_ownerDocument->detachRange(this); 115 m_ownerDocument = document; 116 m_start.setToStartOfNode(document); 117 m_end.setToStartOfNode(document); 118 m_ownerDocument->attachRange(this); 108 119 } 109 120 … … 1317 1328 } 1318 1329 1330 if (m_ownerDocument != refNode->document()) 1331 setDocument(refNode->document()); 1332 1319 1333 ec = 0; 1320 1334 setStartBefore(refNode, ec); … … 1359 1373 } 1360 1374 1375 if (m_ownerDocument != refNode->document()) 1376 setDocument(refNode->document()); 1377 1361 1378 m_start.setToStartOfNode(refNode); 1362 1379 m_end.setToEndOfNode(refNode); -
trunk/WebCore/dom/Range.h
r59098 r67618 136 136 Range(PassRefPtr<Document>, PassRefPtr<Node> startContainer, int startOffset, PassRefPtr<Node> endContainer, int endOffset); 137 137 138 void setDocument(Document*); 139 138 140 Node* checkNodeWOffset(Node*, int offset, ExceptionCode&) const; 139 141 void checkNodeBA(Node*, ExceptionCode&) const;
Note: See TracChangeset
for help on using the changeset viewer.