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

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

Issue 2706013005: Expand FrameSeleciton::getSelectionType() to increase chances of hoisting update layout (Closed)
Patch Set: 2017-02-22T21:26:37 rebase 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/FrameSelection.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 cf8b08e6be8a9e8d57e49f3f2e3bce5ae88e5995..8db85385837d2b5d012c1d13cbed6a7897e8960a 100644
--- a/third_party/WebKit/Source/core/editing/Editor.cpp
+++ b/third_party/WebKit/Source/core/editing/Editor.cpp
@@ -773,7 +773,10 @@ Element* Editor::findEventTargetFromSelection() const {
void Editor::applyStyle(StylePropertySet* style,
InputEvent::InputType inputType) {
- switch (frame().selection().getSelectionType()) {
+ switch (frame()
+ .selection()
+ .computeVisibleSelectionInDOMTreeDeprecated()
+ .getSelectionType()) {
case NoSelection:
// do nothing
break;
@@ -1428,9 +1431,14 @@ void Editor::changeSelectionAfterCommand(
// call does not call EditorClient::respondToChangedSelection(), which, on the
// Mac, sends selection change notifications and starts a new kill ring
// sequence, but we want to do these things (matches AppKit).
- if (selectionDidNotChangeDOMPosition)
- client().respondToChangedSelection(m_frame,
- frame().selection().getSelectionType());
+ if (selectionDidNotChangeDOMPosition) {
+ client().respondToChangedSelection(
+ m_frame,
+ frame()
+ .selection()
+ .computeVisibleSelectionInDOMTreeDeprecated()
+ .getSelectionType());
+ }
}
IntRect Editor::firstRectForRange(const EphemeralRange& range) const {
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/FrameSelection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698