| 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 1070 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1081 Node* focusedNode = frame()->document()->focusedNode(); | 1081 Node* focusedNode = frame()->document()->focusedNode(); |
| 1082 if (focusedNode && isHTMLTextFormControlElement(focusedNode)) { | 1082 if (focusedNode && isHTMLTextFormControlElement(focusedNode)) { |
| 1083 if (direction == NaturalWritingDirection) | 1083 if (direction == NaturalWritingDirection) |
| 1084 return; | 1084 return; |
| 1085 toHTMLElement(focusedNode)->setAttribute(dirAttr, direction == LeftToRig
htWritingDirection ? "ltr" : "rtl"); | 1085 toHTMLElement(focusedNode)->setAttribute(dirAttr, direction == LeftToRig
htWritingDirection ? "ltr" : "rtl"); |
| 1086 focusedNode->dispatchInputEvent(); | 1086 focusedNode->dispatchInputEvent(); |
| 1087 frame()->document()->updateStyleIfNeeded(); | 1087 frame()->document()->updateStyleIfNeeded(); |
| 1088 return; | 1088 return; |
| 1089 } | 1089 } |
| 1090 | 1090 |
| 1091 RefPtr<StylePropertySet> style = StylePropertySet::create(); | 1091 RefPtr<MutableStylePropertySet> style = MutableStylePropertySet::create(); |
| 1092 style->setProperty(CSSPropertyDirection, direction == LeftToRightWritingDire
ction ? "ltr" : direction == RightToLeftWritingDirection ? "rtl" : "inherit", fa
lse); | 1092 style->setProperty(CSSPropertyDirection, direction == LeftToRightWritingDire
ction ? "ltr" : direction == RightToLeftWritingDirection ? "rtl" : "inherit", fa
lse); |
| 1093 applyParagraphStyleToSelection(style.get(), EditActionSetWritingDirection); | 1093 applyParagraphStyleToSelection(style.get(), EditActionSetWritingDirection); |
| 1094 } | 1094 } |
| 1095 | 1095 |
| 1096 WritingDirection Editor::baseWritingDirectionForSelectionStart() const | 1096 WritingDirection Editor::baseWritingDirectionForSelectionStart() const |
| 1097 { | 1097 { |
| 1098 WritingDirection result = LeftToRightWritingDirection; | 1098 WritingDirection result = LeftToRightWritingDirection; |
| 1099 | 1099 |
| 1100 Position pos = m_frame->selection()->selection().visibleStart().deepEquivale
nt(); | 1100 Position pos = m_frame->selection()->selection().visibleStart().deepEquivale
nt(); |
| 1101 Node* node = pos.deprecatedNode(); | 1101 Node* node = pos.deprecatedNode(); |
| (...skipping 1246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2348 | 2348 |
| 2349 return checkingTypes; | 2349 return checkingTypes; |
| 2350 } | 2350 } |
| 2351 | 2351 |
| 2352 bool Editor::unifiedTextCheckerEnabled() const | 2352 bool Editor::unifiedTextCheckerEnabled() const |
| 2353 { | 2353 { |
| 2354 return WebCore::unifiedTextCheckerEnabled(m_frame); | 2354 return WebCore::unifiedTextCheckerEnabled(m_frame); |
| 2355 } | 2355 } |
| 2356 | 2356 |
| 2357 } // namespace WebCore | 2357 } // namespace WebCore |
| OLD | NEW |