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

Unified Diff: third_party/WebKit/Source/core/editing/Editor.cpp

Issue 2685723005: evaluating clipboard event target acording to w3c specification (Closed)
Patch Set: clipboard event target set to focused/active when selection not editable Created 3 years, 10 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: third_party/WebKit/Source/core/editing/Editor.cpp
diff --git a/third_party/WebKit/Source/core/editing/Editor.cpp b/third_party/WebKit/Source/core/editing/Editor.cpp
index 717611d8d5c58cdbcc74720eb9a8608349318525..4f643d36cbf5665f3d6ffa73fd512085c915e393 100644
--- a/third_party/WebKit/Source/core/editing/Editor.cpp
+++ b/third_party/WebKit/Source/core/editing/Editor.cpp
@@ -735,7 +735,9 @@ void Editor::clearLastEditCommand() {
}
Element* Editor::findEventTargetFrom(const VisibleSelection& selection) const {
- Element* target = associatedElementOf(selection.start());
+ Element* target = selection.hasEditableStyle()
+ ? associatedElementOf(selection.start())
+ : frame().document()->activeElement();
if (!target)
target = frame().document()->body();

Powered by Google App Engine
This is Rietveld 408576698