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

Unified Diff: Source/WebCore/editing/FrameSelection.cpp

Issue 8133029: Merge 96628 - REGRESSION(r94274): setting input.value erroneously triggers focus event (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/874/
Patch Set: Created 9 years, 2 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
Index: Source/WebCore/editing/FrameSelection.cpp
===================================================================
--- Source/WebCore/editing/FrameSelection.cpp (revision 96732)
+++ Source/WebCore/editing/FrameSelection.cpp (working copy)
@@ -220,7 +220,7 @@
m_selection = s;
setCaretRectNeedsUpdate();
- if (!s.isNone())
+ if (!s.isNone() && !(options & DoNotSetFocus))
setFocusedNodeIfNeeded();
updateAppearance();
@@ -326,7 +326,7 @@
clearRenderViewSelection(m_selection.start());
if (clearDOMTreeSelection)
- setSelection(VisibleSelection(), 0);
+ setSelection(VisibleSelection(), DoNotSetFocus);
}
enum EndPointType { EndPointIsStart, EndPointIsEnd };
@@ -377,7 +377,7 @@
newSelection.setWithoutValidation(end, start);
}
m_frame->document()->updateLayout();
- setSelection(newSelection, 0);
+ setSelection(newSelection, DoNotSetFocus);
return;
}
« no previous file with comments | « Source/WebCore/editing/FrameSelection.h ('k') | Source/WebCore/manual-tests/mutate-unfocused-text-with-selection.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698