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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2008, 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2008, 2009, 2010 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 updateAppearance(ResetCaretBlink); 261 updateAppearance(ResetCaretBlink);
262 } 262 }
263 263
264 // Always clear the x position used for vertical arrow navigation. 264 // Always clear the x position used for vertical arrow navigation.
265 // It will be restored by the vertical arrow navigation code if necessary. 265 // It will be restored by the vertical arrow navigation code if necessary.
266 m_xPosForVerticalArrowNavigation = NoXPosForVerticalArrowNavigation(); 266 m_xPosForVerticalArrowNavigation = NoXPosForVerticalArrowNavigation();
267 selectFrameElementInParentIfFullySelected(); 267 selectFrameElementInParentIfFullySelected();
268 notifyRendererOfSelectionChange(userTriggered); 268 notifyRendererOfSelectionChange(userTriggered);
269 m_frame->editor().respondToChangedSelection(oldSelection, options); 269 m_frame->editor().respondToChangedSelection(oldSelection, options);
270 if (userTriggered == UserTriggered) { 270 if (userTriggered == UserTriggered) {
271 ScrollAlignment alignment; 271 ScrollAlignment alignment = (align == AlignCursorOnScrollAlways) ? Scrol lAlignment::alignTopAlways : ScrollAlignment::alignToEdgeIfNeeded;
272
273 if (m_frame->editor().behavior().shouldCenterAlignWhenSelectionIsReveale d())
274 alignment = (align == AlignCursorOnScrollAlways) ? ScrollAlignment:: alignCenterAlways : ScrollAlignment::alignCenterIfNeeded;
275 else
276 alignment = (align == AlignCursorOnScrollAlways) ? ScrollAlignment:: alignTopAlways : ScrollAlignment::alignToEdgeIfNeeded;
277
278 revealSelection(alignment, RevealExtent); 272 revealSelection(alignment, RevealExtent);
279 } 273 }
280 274
281 notifyAccessibilityForSelectionChange(); 275 notifyAccessibilityForSelectionChange();
282 notifyCompositorForSelectionChange(); 276 notifyCompositorForSelectionChange();
283 m_frame->domWindow()->enqueueDocumentEvent(Event::create(EventTypeNames::sel ectionchange)); 277 m_frame->domWindow()->enqueueDocumentEvent(Event::create(EventTypeNames::sel ectionchange));
284 } 278 }
285 279
286 static bool removingNodeRemovesPosition(Node& node, const Position& position) 280 static bool removingNodeRemovesPosition(Node& node, const Position& position)
287 { 281 {
(...skipping 1385 matching lines...) Expand 10 before | Expand all | Expand 10 after
1673 sel.showTreeForThis(); 1667 sel.showTreeForThis();
1674 } 1668 }
1675 1669
1676 void showTree(const blink::FrameSelection* sel) 1670 void showTree(const blink::FrameSelection* sel)
1677 { 1671 {
1678 if (sel) 1672 if (sel)
1679 sel->showTreeForThis(); 1673 sel->showTreeForThis();
1680 } 1674 }
1681 1675
1682 #endif 1676 #endif
OLDNEW
« 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