Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(130)

Side by Side Diff: Source/WebCore/editing/visible_units.cpp

Issue 7878009: Merge 94988 - REGRESSION: Moving up doesn't work in some cases (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/874/
Patch Set: Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « LayoutTests/editing/selection/move-up-into-wrapped-line-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed. 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 // This containing editable block does not have a previous line. 526 // This containing editable block does not have a previous line.
527 // Need to move back to previous containing editable block in this root editable 527 // Need to move back to previous containing editable block in this root editable
528 // block and find the last root line box in that block. 528 // block and find the last root line box in that block.
529 Node* startBlock = enclosingNodeWithNonInlineRenderer(node); 529 Node* startBlock = enclosingNodeWithNonInlineRenderer(node);
530 Node* n = previousLeafWithSameEditability(node); 530 Node* n = previousLeafWithSameEditability(node);
531 while (n && startBlock == enclosingNodeWithNonInlineRenderer(n)) 531 while (n && startBlock == enclosingNodeWithNonInlineRenderer(n))
532 n = previousLeafWithSameEditability(n); 532 n = previousLeafWithSameEditability(n);
533 while (n) { 533 while (n) {
534 if (highestEditableRoot(firstPositionInOrBeforeNode(n)) != highestRo ot) 534 if (highestEditableRoot(firstPositionInOrBeforeNode(n)) != highestRo ot)
535 break; 535 break;
536 Position pos = createLegacyEditingPosition(n, caretMinOffset(n)); 536 Position pos = n->hasTagName(brTag) ? positionBeforeNode(n) : create LegacyEditingPosition(n, caretMaxOffset(n));
537 if (pos.isCandidate()) { 537 if (pos.isCandidate()) {
538 pos.getInlineBoxAndOffset(DOWNSTREAM, box, ignoredCaretOffset); 538 pos.getInlineBoxAndOffset(DOWNSTREAM, box, ignoredCaretOffset);
539 if (box) { 539 if (box) {
540 // previous root line box found 540 // previous root line box found
541 root = box->root(); 541 root = box->root();
542 break; 542 break;
543 } 543 }
544 544
545 return VisiblePosition(pos, DOWNSTREAM); 545 return VisiblePosition(pos, DOWNSTREAM);
546 } 546 }
(...skipping 1085 matching lines...) Expand 10 before | Expand all | Expand 10 after
1632 VisiblePosition rightWordPosition(const VisiblePosition& visiblePosition) 1632 VisiblePosition rightWordPosition(const VisiblePosition& visiblePosition)
1633 { 1633 {
1634 if (visiblePosition.isNull()) 1634 if (visiblePosition.isNull())
1635 return VisiblePosition(); 1635 return VisiblePosition();
1636 1636
1637 VisiblePosition rightWordBreak = rightWordPositionIgnoringEditingBoundary(vi siblePosition); 1637 VisiblePosition rightWordBreak = rightWordPositionIgnoringEditingBoundary(vi siblePosition);
1638 return visiblePosition.honorEditingBoundaryAtOrBefore(rightWordBreak); 1638 return visiblePosition.honorEditingBoundaryAtOrBefore(rightWordBreak);
1639 } 1639 }
1640 1640
1641 } 1641 }
OLDNEW
« no previous file with comments | « LayoutTests/editing/selection/move-up-into-wrapped-line-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698