| 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 946 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 957 Element* focusedElement = frame().document()->focusedElement(); | 957 Element* focusedElement = frame().document()->focusedElement(); |
| 958 if (isHTMLTextFormControlElement(focusedElement)) { | 958 if (isHTMLTextFormControlElement(focusedElement)) { |
| 959 if (direction == NaturalWritingDirection) | 959 if (direction == NaturalWritingDirection) |
| 960 return; | 960 return; |
| 961 focusedElement->setAttribute(dirAttr, direction == LeftToRightWritingDir
ection ? "ltr" : "rtl"); | 961 focusedElement->setAttribute(dirAttr, direction == LeftToRightWritingDir
ection ? "ltr" : "rtl"); |
| 962 focusedElement->dispatchInputEvent(); | 962 focusedElement->dispatchInputEvent(); |
| 963 frame().document()->updateStyleIfNeeded(); | 963 frame().document()->updateStyleIfNeeded(); |
| 964 return; | 964 return; |
| 965 } | 965 } |
| 966 | 966 |
| 967 RefPtr<MutableStylePropertySet> style = MutableStylePropertySet::create(); | 967 RefPtrWillBeRawPtr<MutableStylePropertySet> style = MutableStylePropertySet:
:create(); |
| 968 style->setProperty(CSSPropertyDirection, direction == LeftToRightWritingDire
ction ? "ltr" : direction == RightToLeftWritingDirection ? "rtl" : "inherit", fa
lse); | 968 style->setProperty(CSSPropertyDirection, direction == LeftToRightWritingDire
ction ? "ltr" : direction == RightToLeftWritingDirection ? "rtl" : "inherit", fa
lse); |
| 969 applyParagraphStyleToSelection(style.get(), EditActionSetWritingDirection); | 969 applyParagraphStyleToSelection(style.get(), EditActionSetWritingDirection); |
| 970 } | 970 } |
| 971 | 971 |
| 972 void Editor::revealSelectionAfterEditingOperation(const ScrollAlignment& alignme
nt, RevealExtentOption revealExtentOption) | 972 void Editor::revealSelectionAfterEditingOperation(const ScrollAlignment& alignme
nt, RevealExtentOption revealExtentOption) |
| 973 { | 973 { |
| 974 if (m_preventRevealSelection) | 974 if (m_preventRevealSelection) |
| 975 return; | 975 return; |
| 976 | 976 |
| 977 m_frame.selection().revealSelection(alignment, revealExtentOption); | 977 m_frame.selection().revealSelection(alignment, revealExtentOption); |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1230 return m_frame.spellChecker(); | 1230 return m_frame.spellChecker(); |
| 1231 } | 1231 } |
| 1232 | 1232 |
| 1233 void Editor::toggleOverwriteModeEnabled() | 1233 void Editor::toggleOverwriteModeEnabled() |
| 1234 { | 1234 { |
| 1235 m_overwriteModeEnabled = !m_overwriteModeEnabled; | 1235 m_overwriteModeEnabled = !m_overwriteModeEnabled; |
| 1236 frame().selection().setShouldShowBlockCursor(m_overwriteModeEnabled); | 1236 frame().selection().setShouldShowBlockCursor(m_overwriteModeEnabled); |
| 1237 } | 1237 } |
| 1238 | 1238 |
| 1239 } // namespace WebCore | 1239 } // namespace WebCore |
| OLD | NEW |