Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(384)

Side by Side Diff: Source/core/editing/Editor.cpp

Issue 211773002: Rename updateStyle to updateRenderTree (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix tracing test Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/editing/Caret.cpp ('k') | Source/core/editing/FrameSelection.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 941 matching lines...) Expand 10 before | Expand all | Expand 10 after
952 } 952 }
953 953
954 void Editor::setBaseWritingDirection(WritingDirection direction) 954 void Editor::setBaseWritingDirection(WritingDirection direction)
955 { 955 {
956 Element* focusedElement = frame().document()->focusedElement(); 956 Element* focusedElement = frame().document()->focusedElement();
957 if (isHTMLTextFormControlElement(focusedElement)) { 957 if (isHTMLTextFormControlElement(focusedElement)) {
958 if (direction == NaturalWritingDirection) 958 if (direction == NaturalWritingDirection)
959 return; 959 return;
960 focusedElement->setAttribute(dirAttr, direction == LeftToRightWritingDir ection ? "ltr" : "rtl"); 960 focusedElement->setAttribute(dirAttr, direction == LeftToRightWritingDir ection ? "ltr" : "rtl");
961 focusedElement->dispatchInputEvent(); 961 focusedElement->dispatchInputEvent();
962 frame().document()->updateStyleIfNeeded(); 962 frame().document()->updateRenderTreeIfNeeded();
963 return; 963 return;
964 } 964 }
965 965
966 RefPtrWillBeRawPtr<MutableStylePropertySet> style = MutableStylePropertySet: :create(); 966 RefPtrWillBeRawPtr<MutableStylePropertySet> style = MutableStylePropertySet: :create();
967 style->setProperty(CSSPropertyDirection, direction == LeftToRightWritingDire ction ? "ltr" : direction == RightToLeftWritingDirection ? "rtl" : "inherit", fa lse); 967 style->setProperty(CSSPropertyDirection, direction == LeftToRightWritingDire ction ? "ltr" : direction == RightToLeftWritingDirection ? "rtl" : "inherit", fa lse);
968 applyParagraphStyleToSelection(style.get(), EditActionSetWritingDirection); 968 applyParagraphStyleToSelection(style.get(), EditActionSetWritingDirection);
969 } 969 }
970 970
971 void Editor::revealSelectionAfterEditingOperation(const ScrollAlignment& alignme nt, RevealExtentOption revealExtentOption) 971 void Editor::revealSelectionAfterEditingOperation(const ScrollAlignment& alignme nt, RevealExtentOption revealExtentOption)
972 { 972 {
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
1229 return m_frame.spellChecker(); 1229 return m_frame.spellChecker();
1230 } 1230 }
1231 1231
1232 void Editor::toggleOverwriteModeEnabled() 1232 void Editor::toggleOverwriteModeEnabled()
1233 { 1233 {
1234 m_overwriteModeEnabled = !m_overwriteModeEnabled; 1234 m_overwriteModeEnabled = !m_overwriteModeEnabled;
1235 frame().selection().setShouldShowBlockCursor(m_overwriteModeEnabled); 1235 frame().selection().setShouldShowBlockCursor(m_overwriteModeEnabled);
1236 } 1236 }
1237 1237
1238 } // namespace WebCore 1238 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/editing/Caret.cpp ('k') | Source/core/editing/FrameSelection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698