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 981 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
992 Element* focusedElement = frame().document()->focusedElement(); | 992 Element* focusedElement = frame().document()->focusedElement(); |
993 if (isHTMLTextFormControlElement(focusedElement)) { | 993 if (isHTMLTextFormControlElement(focusedElement)) { |
994 if (direction == NaturalWritingDirection) | 994 if (direction == NaturalWritingDirection) |
995 return; | 995 return; |
996 focusedElement->setAttribute(dirAttr, direction == LeftToRightWritingDir
ection ? "ltr" : "rtl"); | 996 focusedElement->setAttribute(dirAttr, direction == LeftToRightWritingDir
ection ? "ltr" : "rtl"); |
997 focusedElement->dispatchInputEvent(); | 997 focusedElement->dispatchInputEvent(); |
998 frame().document()->updateLayoutTreeIfNeeded(); | 998 frame().document()->updateLayoutTreeIfNeeded(); |
999 return; | 999 return; |
1000 } | 1000 } |
1001 | 1001 |
1002 RefPtrWillBeRawPtr<MutableStylePropertySet> style = MutableStylePropertySet:
:create(); | 1002 RefPtrWillBeRawPtr<MutableStylePropertySet> style = MutableStylePropertySet:
:create(HTMLQuirksMode); |
1003 style->setProperty(CSSPropertyDirection, direction == LeftToRightWritingDire
ction ? "ltr" : direction == RightToLeftWritingDirection ? "rtl" : "inherit", fa
lse); | 1003 style->setProperty(CSSPropertyDirection, direction == LeftToRightWritingDire
ction ? "ltr" : direction == RightToLeftWritingDirection ? "rtl" : "inherit", fa
lse); |
1004 applyParagraphStyleToSelection(style.get(), EditActionSetWritingDirection); | 1004 applyParagraphStyleToSelection(style.get(), EditActionSetWritingDirection); |
1005 } | 1005 } |
1006 | 1006 |
1007 void Editor::revealSelectionAfterEditingOperation(const ScrollAlignment& alignme
nt, RevealExtentOption revealExtentOption) | 1007 void Editor::revealSelectionAfterEditingOperation(const ScrollAlignment& alignme
nt, RevealExtentOption revealExtentOption) |
1008 { | 1008 { |
1009 if (m_preventRevealSelection) | 1009 if (m_preventRevealSelection) |
1010 return; | 1010 return; |
1011 | 1011 |
1012 frame().selection().revealSelection(alignment, revealExtentOption); | 1012 frame().selection().revealSelection(alignment, revealExtentOption); |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1296 } | 1296 } |
1297 | 1297 |
1298 DEFINE_TRACE(Editor) | 1298 DEFINE_TRACE(Editor) |
1299 { | 1299 { |
1300 visitor->trace(m_frame); | 1300 visitor->trace(m_frame); |
1301 visitor->trace(m_lastEditCommand); | 1301 visitor->trace(m_lastEditCommand); |
1302 visitor->trace(m_mark); | 1302 visitor->trace(m_mark); |
1303 } | 1303 } |
1304 | 1304 |
1305 } // namespace blink | 1305 } // namespace blink |
OLD | NEW |