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

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

Issue 873963003: Remove more mouse-specific code (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Build fixes 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/FrameSelection.h ('k') | sky/engine/core/events/Event.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 33dc6de3b588a44c31d2816bdb3638fa84a47503..635ee77db8ee989bd3ecb7c9cd2b5ba23d9d2d62 100644
--- a/sky/engine/core/editing/FrameSelection.cpp
+++ b/sky/engine/core/editing/FrameSelection.cpp
@@ -264,7 +264,6 @@ void FrameSelection::setSelection(const VisibleSelection& newSelection, SetSelec
// Always clear the x position used for vertical arrow navigation.
// It will be restored by the vertical arrow navigation code if necessary.
m_xPosForVerticalArrowNavigation = NoXPosForVerticalArrowNavigation();
- selectFrameElementInParentIfFullySelected();
notifyRendererOfSelectionChange(userTriggered);
m_frame->editor().respondToChangedSelection(oldSelection, options);
if (userTriggered == UserTriggered) {
@@ -1239,16 +1238,6 @@ bool FrameSelection::contains(const LayoutPoint& point)
return comparePositions(start, p) <= 0 && comparePositions(p, end) <= 0;
}
-// Workaround for the fact that it's hard to delete a frame.
-// Call this after doing user-triggered selections to make it easy to delete the frame you entirely selected.
-// Can't do this implicitly as part of every setSelection call because in some contexts it might not be good
-// for the focus to move to another frame. So instead we call it from places where we are selecting with the
-// mouse or the keyboard after setting the selection.
-void FrameSelection::selectFrameElementInParentIfFullySelected()
-{
-
-}
-
void FrameSelection::selectAll()
{
Document* document = m_frame->document();
@@ -1496,7 +1485,7 @@ void FrameSelection::setFocusedNodeIfNeeded()
// We don't want to set focus on a subframe when selecting in a parent frame,
// so add the !isFrameElement check here. There's probably a better way to make this
// work in the long term, but this is the safest fix at this time.
- if (target->isMouseFocusable() && !isFrameElement(target)) {
+ if (target->isFocusable() && !isFrameElement(target)) {
m_frame->page()->focusController().setFocusedElement(target, m_frame);
return;
}
« no previous file with comments | « sky/engine/core/editing/FrameSelection.h ('k') | sky/engine/core/events/Event.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698