Changeset 32497 in webkit
- Timestamp:
- Apr 24, 2008, 10:41:11 AM (17 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r32456 r32497 1 2008-04-24 Justin Garcia <justin.garcia@apple.com> 2 3 Reviewed by Darin Adler. 4 5 <rdar://problem/5604313> FormatBlock leaves first letter incorrectly styled (16004) 6 7 * editing/execCommand/5604313-expected.txt: Added. 8 * editing/execCommand/5604313.html: Added. 9 1 10 r2008-04-23 Dan Bernstein <mitz@apple.com> 2 11 -
trunk/WebCore/ChangeLog
r32496 r32497 1 2008-04-24 Justin Garcia <justin.garcia@apple.com> 2 3 Reviewed by Darin Adler. 4 5 <rdar://problem/5604313> FormatBlock to apply an h1 also inserts a style span around the first letter (16004) 6 7 * editing/TextIterator.cpp: 8 (WebCore::TextIterator::advance): We emit an extra newline when leaving a 9 block element that has atypical margin/padding. When we emit the extra newline, 10 it needs to be positioned after that block's contents, not after the block. 11 This is how we position the first newline, too, since the range for emitted newlines 12 should start where the line break begins visually. 13 1 14 2008-04-24 Anders Carlsson <andersca@apple.com> 2 15 -
trunk/WebCore/editing/TextIterator.cpp
r30973 r32497 146 146 // handle remembered node that needed a newline after the text node's newline 147 147 if (m_needAnotherNewline) { 148 // emit the newline, with position a collapsed range at the end of current node. 149 emitCharacter('\n', m_node->parentNode(), m_node, 1, 1); 148 // Emit the extra newline, and position it *inside* m_node, after m_node's 149 // contents, in case it's a block, in the same way that we position the first 150 // newline. The range for the emitted newline should start where the line 151 // break begins. 152 // FIXME: It would be cleaner if we emitted two newlines during the last 153 // iteration, instead of using m_needAnotherNewline. 154 Node* baseNode = m_node->lastChild() ? m_node->lastChild() : m_node; 155 emitCharacter('\n', baseNode->parentNode(), baseNode, 1, 1); 150 156 m_needAnotherNewline = false; 151 157 return;
Note:
See TracChangeset
for help on using the changeset viewer.