Changeset 55613 in webkit
- Timestamp:
- Mar 5, 2010 11:28:29 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r55611 r55613 1 2010-03-05 Tony Chang <tony@chromium.org> 2 3 Reviewed by Eric Seidel. 4 5 https://bugs.webkit.org/show_bug.cgi?id=33247 6 Backwards cursor movement incorrect when previous block ends with <br>. 7 8 If the cursor is trying to move into a node that has a height of 0, 9 skip over it. 10 11 * editing/execCommand/move-selection-back-line-expected.txt: Added. 12 * editing/execCommand/move-selection-back-line.html: Added. 13 1 14 2010-03-05 Chris Fleizach <cfleizach@apple.com> 2 15 -
trunk/WebCore/ChangeLog
r55612 r55613 1 2010-03-05 Tony Chang <tony@chromium.org> 2 3 Reviewed by Eric Seidel. 4 5 https://bugs.webkit.org/show_bug.cgi?id=33247 6 Backwards cursor movement incorrect when previous block ends with <br>. 7 8 If the cursor is trying to move into a node that has a height of 0, 9 skip over it. 10 11 Test: editing/execCommand/move-selection-back-line.html 12 13 * editing/visible_units.cpp: 14 (WebCore::previousLinePosition): 15 1 16 2010-03-05 Andrey Kosyakov <caseq@chromium.org> 2 17 -
trunk/WebCore/editing/visible_units.cpp
r55098 r55613 32 32 #include "RenderBlock.h" 33 33 #include "RenderLayer.h" 34 #include "RenderObject.h" 34 35 #include "TextBoundaries.h" 35 36 #include "TextBreakIterator.h" … … 254 255 } 255 256 257 static bool canHaveCursor(RenderObject* o) 258 { 259 return (o->isText() && toRenderText(o)->linesBoundingBox().height()) 260 || (o->isBox() && toRenderBox(o)->borderBoundingBox().height()); 261 } 262 256 263 // --------- 257 264 … … 591 598 Position pos(n, caretMinOffset(n)); 592 599 if (pos.isCandidate()) { 593 ASSERT(n->renderer()); 594 Position maxPos(n, caretMaxOffset(n)); 595 maxPos.getInlineBoxAndOffset(DOWNSTREAM, box, ignoredCaretOffset); 596 if (box) { 597 // previous root line box found 598 root = box->root(); 599 containingBlock = n->renderer()->containingBlock(); 600 break; 600 RenderObject* o = n->renderer(); 601 ASSERT(o); 602 if (canHaveCursor(o)) { 603 Position maxPos(n, caretMaxOffset(n)); 604 maxPos.getInlineBoxAndOffset(DOWNSTREAM, box, ignoredCaretOffset); 605 if (box) { 606 // previous root line box found 607 root = box->root(); 608 containingBlock = n->renderer()->containingBlock(); 609 break; 610 } 611 612 return VisiblePosition(pos, DOWNSTREAM); 601 613 } 602 603 return VisiblePosition(pos, DOWNSTREAM);604 614 } 605 615 n = previousLeafWithSameEditability(n);
Note: See TracChangeset
for help on using the changeset viewer.