OLD | NEW |
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 * Portions Copyright (c) 2011 Motorola Mobility, Inc. All rights reserved. | 3 * Portions Copyright (c) 2011 Motorola Mobility, Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
561 | 561 |
562 // FIXME (9535): Canonicalizing to the leftmost candidate means that if we'
re at a line wrap, we will | 562 // FIXME (9535): Canonicalizing to the leftmost candidate means that if we'
re at a line wrap, we will |
563 // ask renderers to paint downstream carets for other renderers. | 563 // ask renderers to paint downstream carets for other renderers. |
564 // To fix this, we need to either a) add code to all paintCarets to pass the
responsibility off to | 564 // To fix this, we need to either a) add code to all paintCarets to pass the
responsibility off to |
565 // the appropriate renderer for VisiblePosition's like these, or b) canonica
lize to the rightmost candidate | 565 // the appropriate renderer for VisiblePosition's like these, or b) canonica
lize to the rightmost candidate |
566 // unless the affinity is upstream. | 566 // unless the affinity is upstream. |
567 if (position.isNull()) | 567 if (position.isNull()) |
568 return Position(); | 568 return Position(); |
569 | 569 |
570 ASSERT(position.document()); | 570 ASSERT(position.document()); |
571 position.document()->updateLayoutIgnorePendingStylesheets(); | 571 position.document()->updateLayout(); |
572 | 572 |
573 Node* node = position.containerNode(); | 573 Node* node = position.containerNode(); |
574 | 574 |
575 Position candidate = position.upstream(); | 575 Position candidate = position.upstream(); |
576 if (candidate.isCandidate()) | 576 if (candidate.isCandidate()) |
577 return candidate; | 577 return candidate; |
578 candidate = position.downstream(); | 578 candidate = position.downstream(); |
579 if (candidate.isCandidate()) | 579 if (candidate.isCandidate()) |
580 return candidate; | 580 return candidate; |
581 | 581 |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
776 if (vpos) | 776 if (vpos) |
777 vpos->showTreeForThis(); | 777 vpos->showTreeForThis(); |
778 } | 778 } |
779 | 779 |
780 void showTree(const blink::VisiblePosition& vpos) | 780 void showTree(const blink::VisiblePosition& vpos) |
781 { | 781 { |
782 vpos.showTreeForThis(); | 782 vpos.showTreeForThis(); |
783 } | 783 } |
784 | 784 |
785 #endif | 785 #endif |
OLD | NEW |