OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2011 Apple Inc. All rights reserved. |
3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
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 1470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1481 // WebCore inserts <div><br></div> *before* the current block, which correctly | 1481 // WebCore inserts <div><br></div> *before* the current block, which correctly |
1482 // moves the paragraph down but which doesn't change the caret's DOM position | 1482 // moves the paragraph down but which doesn't change the caret's DOM position |
1483 // (["hello", 0]). In these situations the above FrameSelection::setSelection | 1483 // (["hello", 0]). In these situations the above FrameSelection::setSelection |
1484 // call does not call EditorClient::respondToChangedSelection(), which, on the | 1484 // call does not call EditorClient::respondToChangedSelection(), which, on the |
1485 // Mac, sends selection change notifications and starts a new kill ring | 1485 // Mac, sends selection change notifications and starts a new kill ring |
1486 // sequence, but we want to do these things (matches AppKit). | 1486 // sequence, but we want to do these things (matches AppKit). |
1487 if (selection_did_not_change_dom_position) { | 1487 if (selection_did_not_change_dom_position) { |
1488 Client().RespondToChangedSelection( | 1488 Client().RespondToChangedSelection( |
1489 frame_, GetFrame() | 1489 frame_, GetFrame() |
1490 .Selection() | 1490 .Selection() |
1491 .ComputeVisibleSelectionInDOMTreeDeprecated() | 1491 .GetSelectionInDOMTree() |
1492 .GetSelectionType()); | 1492 .SelectionTypeWithLegacyGranularity()); |
1493 } | 1493 } |
1494 } | 1494 } |
1495 | 1495 |
1496 IntRect Editor::FirstRectForRange(const EphemeralRange& range) const { | 1496 IntRect Editor::FirstRectForRange(const EphemeralRange& range) const { |
1497 DCHECK(!GetFrame().GetDocument()->NeedsLayoutTreeUpdate()); | 1497 DCHECK(!GetFrame().GetDocument()->NeedsLayoutTreeUpdate()); |
1498 DocumentLifecycle::DisallowTransitionScope disallow_transition( | 1498 DocumentLifecycle::DisallowTransitionScope disallow_transition( |
1499 GetFrame().GetDocument()->Lifecycle()); | 1499 GetFrame().GetDocument()->Lifecycle()); |
1500 | 1500 |
1501 LayoutUnit extra_width_to_end_of_line; | 1501 LayoutUnit extra_width_to_end_of_line; |
1502 DCHECK(range.IsNotNull()); | 1502 DCHECK(range.IsNotNull()); |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1820 | 1820 |
1821 DEFINE_TRACE(Editor) { | 1821 DEFINE_TRACE(Editor) { |
1822 visitor->Trace(frame_); | 1822 visitor->Trace(frame_); |
1823 visitor->Trace(last_edit_command_); | 1823 visitor->Trace(last_edit_command_); |
1824 visitor->Trace(undo_stack_); | 1824 visitor->Trace(undo_stack_); |
1825 visitor->Trace(mark_); | 1825 visitor->Trace(mark_); |
1826 visitor->Trace(typing_style_); | 1826 visitor->Trace(typing_style_); |
1827 } | 1827 } |
1828 | 1828 |
1829 } // namespace blink | 1829 } // namespace blink |
OLD | NEW |