Changeset 25373 in webkit
- Timestamp:
- Sep 5, 2007 1:46:41 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r25367 r25373 1 2007-09-05 David Harrison <harrison@apple.com> 2 3 Reviewed by Kevin Decker. 4 5 Testcase for: 6 <rdar://problem/5306171> Mail: The first return after an attachment in multipart/mixed message is lost 7 8 * editing/selection/toString-1-expected.txt: Added. 9 * editing/selection/toString-1.html: Added. 10 1 11 2007-09-04 Oliver Hunt <oliver@apple.com> 2 12 -
trunk/WebCore/ChangeLog
r25368 r25373 1 2007-09-05 David Harrison <harrison@apple.com> 2 3 Reviewed by Kevin Decker. 4 5 <rdar://problem/5306171> Mail: The first return after an attachment in multipart/mixed message is lost 6 7 Test added: editing/selection/toString-1.html 8 9 Source changes: 10 * editing/TextIterator.cpp: 11 (WebCore::TextIterator::shouldRepresentNodeOffsetZero): 12 - Remove outdated and erroneous check for m_lastTextNode. 13 - Fix VisiblePosition check to look for line diff. Simple position diff gives the 14 wrong answer when the start is table/0 and the current is the first position 15 inside the content of the table. 16 1 17 2007-09-04 Marvin Decker <marv.decker@gmail.com> 2 18 -
trunk/WebCore/editing/TextIterator.cpp
r25319 r25373 509 509 bool TextIterator::shouldRepresentNodeOffsetZero() 510 510 { 511 // Can't represent the position without m_lastTextNode512 if (!m_lastTextNode)513 return false;514 515 511 // Leave element positioned flush with start of a paragraph 516 512 // (e.g. do not insert tab before a table cell at the start of a paragraph) … … 523 519 524 520 // We've not emitted anything yet. Generally, there is no need for any positioning then. 525 // The only exception is when the element is visually not in the same positionas521 // The only exception is when the element is visually not in the same line as 526 522 // the start of the range (e.g. the range starts at the end of the previous paragraph). 527 523 // NOTE: Creating VisiblePositions and comparing them is relatively expensive, so we … … 537 533 VisiblePosition startPos = VisiblePosition(m_startContainer, m_startOffset, DOWNSTREAM); 538 534 VisiblePosition currPos = VisiblePosition(m_node, 0, DOWNSTREAM); 539 return startPos != currPos;535 return !inSameLine(startPos, currPos); 540 536 } 541 537
Note: See TracChangeset
for help on using the changeset viewer.