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

Unified Diff: sky/engine/core/editing/FrameSelection.cpp

Issue 796623004: Delete some dead ScrollAlignment code. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/engine/core/editing/EditingBehavior.h ('k') | sky/engine/core/rendering/ScrollAlignment.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/editing/FrameSelection.cpp
diff --git a/sky/engine/core/editing/FrameSelection.cpp b/sky/engine/core/editing/FrameSelection.cpp
index 1d747894ef278758797bf1d319a6166b6d999de9..2540b10b1c3e4593d0ca58ef8d4c5b2327d405cc 100644
--- a/sky/engine/core/editing/FrameSelection.cpp
+++ b/sky/engine/core/editing/FrameSelection.cpp
@@ -268,13 +268,7 @@ void FrameSelection::setSelection(const VisibleSelection& newSelection, SetSelec
notifyRendererOfSelectionChange(userTriggered);
m_frame->editor().respondToChangedSelection(oldSelection, options);
if (userTriggered == UserTriggered) {
- ScrollAlignment alignment;
-
- if (m_frame->editor().behavior().shouldCenterAlignWhenSelectionIsRevealed())
- alignment = (align == AlignCursorOnScrollAlways) ? ScrollAlignment::alignCenterAlways : ScrollAlignment::alignCenterIfNeeded;
- else
- alignment = (align == AlignCursorOnScrollAlways) ? ScrollAlignment::alignTopAlways : ScrollAlignment::alignToEdgeIfNeeded;
-
+ ScrollAlignment alignment = (align == AlignCursorOnScrollAlways) ? ScrollAlignment::alignTopAlways : ScrollAlignment::alignToEdgeIfNeeded;
revealSelection(alignment, RevealExtent);
}
« no previous file with comments | « sky/engine/core/editing/EditingBehavior.h ('k') | sky/engine/core/rendering/ScrollAlignment.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698