| 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 703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 714 m_frame.selection().revealSelection(); | 714 m_frame.selection().revealSelection(); |
| 715 return true; | 715 return true; |
| 716 } | 716 } |
| 717 | 717 |
| 718 PassRefPtr<Range> Editor::findStringAndScrollToVisible(const String& target, Ran
ge* previousMatch, FindOptions options) | 718 PassRefPtr<Range> Editor::findStringAndScrollToVisible(const String& target, Ran
ge* previousMatch, FindOptions options) |
| 719 { | 719 { |
| 720 RefPtr<Range> nextMatch = rangeOfString(target, previousMatch, options); | 720 RefPtr<Range> nextMatch = rangeOfString(target, previousMatch, options); |
| 721 if (!nextMatch) | 721 if (!nextMatch) |
| 722 return nullptr; | 722 return nullptr; |
| 723 | 723 |
| 724 nextMatch->firstNode()->renderer()->scrollRectToVisible(nextMatch->boundingB
ox(), | 724 // FIXME(sky): Scroll to visible. |
| 725 ScrollAlignment::alignCenterIfNeeded, ScrollAlignment::alignCenterIfNeed
ed); | |
| 726 | 725 |
| 727 return nextMatch.release(); | 726 return nextMatch.release(); |
| 728 } | 727 } |
| 729 | 728 |
| 730 static PassRefPtr<Range> findStringBetweenPositions(const String& target, const
Position& start, const Position& end, FindOptions options) | 729 static PassRefPtr<Range> findStringBetweenPositions(const String& target, const
Position& start, const Position& end, FindOptions options) |
| 731 { | 730 { |
| 732 Position searchStart(start); | 731 Position searchStart(start); |
| 733 Position searchEnd(end); | 732 Position searchEnd(end); |
| 734 | 733 |
| 735 bool forward = !(options & Backwards); | 734 bool forward = !(options & Backwards); |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 816 return m_frame.spellChecker(); | 815 return m_frame.spellChecker(); |
| 817 } | 816 } |
| 818 | 817 |
| 819 void Editor::toggleOverwriteModeEnabled() | 818 void Editor::toggleOverwriteModeEnabled() |
| 820 { | 819 { |
| 821 m_overwriteModeEnabled = !m_overwriteModeEnabled; | 820 m_overwriteModeEnabled = !m_overwriteModeEnabled; |
| 822 frame().selection().setShouldShowBlockCursor(m_overwriteModeEnabled); | 821 frame().selection().setShouldShowBlockCursor(m_overwriteModeEnabled); |
| 823 } | 822 } |
| 824 | 823 |
| 825 } // namespace blink | 824 } // namespace blink |
| OLD | NEW |